Created dialog for numpad time picker
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:grid="http://schemas.android.com/apk/res-auto">
|
||||
<Button
|
||||
android:id="@+id/one"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/two"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="2"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/three"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="3"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/four"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="4"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/five"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="5"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/six"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="6"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/seven"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="7"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/eight"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="8"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/nine"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
android:text="9"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/zero"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_column="1"
|
||||
android:text="0"/>
|
||||
</merge>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:grid="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<include layout="@layout/content_grid_layout_numpad"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/leftAlt"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_column="0"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/rightAlt"
|
||||
style="@style/grid_element_single"
|
||||
grid:layout_rowWeight="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_column="2"/>
|
||||
</merge>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?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">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/backspace"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_backspace_24dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:textSize="28sp"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:listDivider"
|
||||
android:layout_below="@id/input"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/actions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Cancel"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/ok"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Ok"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.philliphsu.clock2.editalarm.NumpadTimePicker
|
||||
android:id="@+id/number_grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/divider"
|
||||
android:layout_above="@id/actions"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -21,4 +21,11 @@
|
||||
<item name="android:textSize">28sp</item>
|
||||
</style>
|
||||
|
||||
<style name="grid_element_single">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">0dp</item>
|
||||
<item name="android:background">?android:attr/selectableItemBackground</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user