Countdown chronometer implemented
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="Label"
|
||||
android:textSize="17sp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<com.philliphsu.clock2.timers.CountdownChronometer
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/label"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textSize="45sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:progress="90"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_below="@id/duration"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/add_one_minute"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_half_day_1_black_24dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_below="@id/progress_bar"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="8dp"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/start_pause"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_half_day_1_black_24dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_below="@id/progress_bar"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/stop"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_half_day_1_black_24dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_below="@id/progress_bar"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="8dp"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_below="@id/stop"/>
|
||||
|
||||
<!--<View style="@style/Divider.Horizontal"
|
||||
android:layout_below="@id/space"/>-->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
@@ -188,4 +188,7 @@
|
||||
"For example, position the FAB to one side of stream of a cards so the FAB won’t interfere "
|
||||
"when a user tries to pick up one of cards.\n\n"
|
||||
</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user