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>
|
||||
Reference in New Issue
Block a user