Created DaysOfWeek class
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- TODO: Use ColorStateLists for both the text and drawable resource to indicate checked state -->
|
||||
|
||||
<ToggleButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@android:drawable/ic_delete"
|
||||
android:drawablePadding="4dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:textOff="World Clock"
|
||||
android:textOn="World Clock"
|
||||
android:textAllCaps="false"
|
||||
android:checked="true"/>
|
||||
|
||||
<ToggleButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@android:drawable/ic_delete"
|
||||
android:drawablePadding="4dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:textOff="Alarms"
|
||||
android:textOn="Alarms"
|
||||
android:textAllCaps="false"
|
||||
android:checked="true"/>
|
||||
|
||||
<ToggleButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@android:drawable/ic_delete"
|
||||
android:drawablePadding="4dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:textOff="Timers"
|
||||
android:textOn="Timers"
|
||||
android:textAllCaps="false"
|
||||
android:checked="true"/>
|
||||
|
||||
<ToggleButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@android:drawable/ic_delete"
|
||||
android:drawablePadding="4dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:textOff="Stopwatch"
|
||||
android:textOn="Stopwatch"
|
||||
android:textAllCaps="false"
|
||||
android:checked="true"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,20 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/text_margin"
|
||||
android:textAppearance="?attr/textAppearanceListItem"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/text_margin"
|
||||
android:textAppearance="?attr/textAppearanceListItem"/>
|
||||
</LinearLayout>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:name="com.philliphsu.clock.alarms.AlarmsFragment"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
tools:context="com.philliphsu.clock2.alarms.AlarmsFragment"
|
||||
tools:listitem="@layout/item_alarm"/>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:name="com.philliphsu.clock.alarms.AlarmsFragment"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
app:layoutManager="LinearLayoutManager"
|
||||
tools:context="com.philliphsu.clock2.alarms.AlarmsFragment"
|
||||
tools:listitem="@layout/fragment_alarms"/>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/item_padding_top"
|
||||
android:paddingStart="@dimen/item_padding_start"
|
||||
android:paddingEnd="@dimen/item_padding_end"
|
||||
android:paddingBottom="@dimen/item_padding_bottom"
|
||||
android:background="?selectableItemBackground">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/time_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/item_margin_between_elements">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1:20"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:textSize="@dimen/alarm_time_text_size"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
android:id="@+id/on_off_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceListItem"
|
||||
android:textStyle="bold"
|
||||
android:text="Label"
|
||||
android:layout_below="@id/time_layout"
|
||||
android:layout_marginBottom="@dimen/item_margin_between_elements"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/countdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceListItem"
|
||||
android:text="in %dh %dm"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_below="@id/time_layout"
|
||||
android:layout_toEndOf="@id/label"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recurring_days"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Mon, Tue, Wed, Thu, Fri, Sat, Sun"
|
||||
android:layout_below="@id/label"
|
||||
android:layout_marginBottom="@dimen/item_margin_between_elements"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/dismiss"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/recurring_days"
|
||||
android:text="Dismiss now"
|
||||
style="@style/Widget.AppCompat.Button.Colored"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,10 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.philliphsu.clock2.editalarm.EditAlarmActivity">
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never"/>
|
||||
</menu>
|
||||
@@ -3,6 +3,10 @@
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
<dimen name="text_margin">16dp</dimen>
|
||||
<dimen name="item_padding_top">8dp</dimen>
|
||||
<dimen name="item_padding_bottom">8dp</dimen>
|
||||
<dimen name="item_padding_start">16dp</dimen>
|
||||
<dimen name="item_padding_end">16dp</dimen>
|
||||
<dimen name="item_margin_between_elements">4dp</dimen>
|
||||
<dimen name="alarm_time_text_size">48sp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -6,4 +6,14 @@
|
||||
<string name="title_activity_ringtone">Clock+</string>
|
||||
<string name="dummy_button">Dummy Button</string>
|
||||
<string name="dummy_content">DUMMY\nCONTENT</string>
|
||||
<string name="title_activity_edit_alarm">EditAlarmActivity</string>
|
||||
|
||||
<string name="sun">Sun</string>
|
||||
<string name="mon">Mon</string>
|
||||
<string name="tue">Tue</string>
|
||||
<string name="wed">Wed</string>
|
||||
<string name="thu">Thu</string>
|
||||
<string name="fri">Fri</string>
|
||||
<string name="sat">Sat</string>
|
||||
<string name="every_day">Every day</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user