Clockplus/app/src/main/res/layout/item_timer.xml
2016-08-28 04:23:45 -07:00

86 lines
3.2 KiB
XML

<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
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"/>
<!--TODO: Consider removing this bottom margin, because the seekbar
is rendering with HUGE top and bottom padding already. -->
<!-- Cannot be touch controlled -->
<!--The default style has padding start and end, so we remove both-->
<SeekBar
android:id="@+id/seek_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/duration"
android:paddingStart="0dp"
android:paddingEnd="0dp"
android:splitTrack="false"/>
<ImageButton
android:id="@+id/add_one_minute"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_half_day_1_24dp"
android:background="?selectableItemBackground"
android:layout_below="@id/seek_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_24dp"
android:background="?selectableItemBackground"
android:layout_below="@id/seek_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_24dp"
android:background="?selectableItemBackground"
android:layout_below="@id/seek_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>