Layout changes to expanded alarm item. Create ColorStateList for day toggles in code.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@color/colorAccent" />
|
||||
<!-- Default state -->
|
||||
<item android:color="@android:color/secondary_text_dark"/>
|
||||
<!-- DEPRECATED -->
|
||||
</selector>
|
||||
@@ -11,6 +11,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextAppearance.AppCompat"
|
||||
android:text="12:00"
|
||||
android:textSize="@dimen/text_size_display_3"
|
||||
android:fontFamily="sans-serif-light"/>
|
||||
|
||||
|
||||
@@ -23,11 +23,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceListItem"
|
||||
style="@style/BaseLabel"
|
||||
android:textStyle="bold"
|
||||
android:text="Label"
|
||||
android:layout_below="@id/time_layout"
|
||||
android:layout_marginBottom="@dimen/item_margin_between_elements"/>
|
||||
|
||||
@@ -35,8 +32,7 @@
|
||||
android:id="@+id/countdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceListItem"
|
||||
android:text="in %dh %dm"
|
||||
android:textSize="@dimen/text_size_subhead"
|
||||
android:layout_marginStart="@dimen/item_margin_between_elements"
|
||||
android:layout_below="@id/time_layout"
|
||||
android:layout_toEndOf="@id/label"/>
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="2dp"
|
||||
app:cardElevation="@dimen/expanded_alarm_elevation"
|
||||
app:cardCornerRadius="0dp"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
android:layout_marginTop="@dimen/cardview_margin"
|
||||
android:layout_marginBottom="@dimen/cardview_margin">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -47,88 +47,40 @@
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/day0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/toggle_alarm_days"/>
|
||||
style="@style/AlarmDayToggle"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/day1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/toggle_alarm_days"
|
||||
/>
|
||||
style="@style/AlarmDayToggle"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/day2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/toggle_alarm_days"
|
||||
/>
|
||||
style="@style/AlarmDayToggle"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/day3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/toggle_alarm_days"
|
||||
/>
|
||||
style="@style/AlarmDayToggle"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/day4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/toggle_alarm_days"
|
||||
/>
|
||||
style="@style/AlarmDayToggle"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/day5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/toggle_alarm_days"
|
||||
/>
|
||||
style="@style/AlarmDayToggle"/>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/day6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:background="?selectableItemBackground"
|
||||
android:textColor="@color/toggle_alarm_days"
|
||||
/>
|
||||
style="@style/AlarmDayToggle"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
style="@style/BaseLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="Add label"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_height="@dimen/label_height"
|
||||
android:layout_marginBottom="@dimen/item_margin_between_elements"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
@@ -136,7 +88,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
android:layout_marginBottom="@dimen/item_margin_between_elements">
|
||||
|
||||
<Button
|
||||
android:id="@+id/ringtone"
|
||||
@@ -147,10 +99,11 @@
|
||||
android:text="Ringtone"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:textSize="18sp"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
android:drawableStart="@drawable/ic_ringtone_black_24dp"
|
||||
android:drawablePadding="@dimen/text_compound_drawable_padding"/>
|
||||
|
||||
<!--TODO: See CheckableImageButton-->
|
||||
<CheckBox
|
||||
android:id="@id/vibrate"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -60,6 +60,10 @@
|
||||
<!-- TimerViewHolder -->
|
||||
<dimen name="add_one_minute_text_size">18dp</dimen>
|
||||
|
||||
<!--ExpandedAlarmViewHolder-->
|
||||
<dimen name="expanded_alarm_elevation">2dp</dimen> <!--TODO: Increase for v21-->
|
||||
<dimen name="label_height">48dp</dimen>
|
||||
|
||||
<dimen name="text_size_body_1">14sp</dimen>
|
||||
<dimen name="text_size_body_2">14sp</dimen>
|
||||
<dimen name="text_size_button">14sp</dimen>
|
||||
|
||||
@@ -166,11 +166,12 @@
|
||||
</style>
|
||||
|
||||
<!--Style for a button that opens an AddLabelDialog-->
|
||||
<style name="BaseLabel" parent="TextAppearance.AppCompat.Subhead">
|
||||
<style name="BaseLabel" parent="TextAppearance.AppCompat">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:hint">@string/label</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:textSize">@dimen/text_size_subhead</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AlarmDayToggle">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:background">?selectableItemBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user