Created NumberGrid time picker
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<!-- TODO: Define another style with LWW and LHW -->
|
||||
<!-- TODO: Use a fixed height so the circular indicator doesn't stretch into an oval. -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="1"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="2"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="3"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="4"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="5"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="6"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="7"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="8"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="9"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="10"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="11"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
app:layout_gravity="center"
|
||||
android:text="12"/>
|
||||
|
||||
</merge>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<!-- TODO: Define a grid item style with the first 3 attrs-->
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="00"
|
||||
app:secondaryText="12"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="01"
|
||||
app:secondaryText="13"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="02"
|
||||
app:secondaryText="14"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="03"
|
||||
app:secondaryText="15"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="04"
|
||||
app:secondaryText="16"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="05"
|
||||
app:secondaryText="17"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="06"
|
||||
app:secondaryText="18"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="07"
|
||||
app:secondaryText="19"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="08"
|
||||
app:secondaryText="20"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="09"
|
||||
app:secondaryText="21"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="10"
|
||||
app:secondaryText="22"/>
|
||||
<com.philliphsu.clock2.editalarm.TwentyFourHourGridItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="center"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
app:primaryText="11"
|
||||
app:secondaryText="23"/>
|
||||
|
||||
</merge>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
<include layout="@layout/element_number_grid"/>
|
||||
|
||||
<!-- TODO: Use fixed width and height -->
|
||||
<ImageButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
android:src="@drawable/ic_minus_circle_24dp"
|
||||
app:layout_column="1"/>
|
||||
|
||||
<ImageButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadElement"
|
||||
android:src="@drawable/ic_add_circle_24dp"
|
||||
app:layout_column="2"/>
|
||||
</merge>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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="match_parent">
|
||||
|
||||
<com.philliphsu.clock2.editalarm.NumberGrid
|
||||
android:id="@+id/grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/numpad_height"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_below="@id/grid">
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="AM"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="PM"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="@dimen/grid_element_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</merge>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/GridLayoutNumpadButton"
|
||||
android:text="1"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"/>
|
||||
Reference in New Issue
Block a user