Created EditAlarmActivity
This commit is contained in:
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context="com.philliphsu.clock2.edittimer.EditTimerActivity">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- If you add elevation, also add to the ProgressBar. -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
android:layout_alignParentTop="true"
|
||||
app:contentInsetStart="72dp">
|
||||
|
||||
<!-- Set inputType to text to get single-line input -->
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:hint="Add label"
|
||||
android:background="@android:color/transparent"
|
||||
android:inputType="text"/>
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="00h 00m 00s"
|
||||
android:textSize="45sp"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
<Space
|
||||
android:id="@+id/space"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_below="@id/duration"/>
|
||||
|
||||
<!-- Keep same dimens as FAB for proper alignment -->
|
||||
<ImageButton
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:src="@drawable/ic_half_day_1_black_24dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_below="@id/space"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_half_day_1_black_24dp"
|
||||
android:layout_below="@id/space"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
<!-- Keep same dimens as FAB for proper alignment -->
|
||||
<ImageButton
|
||||
android:id="@+id/stop"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:src="@drawable/ic_half_day_1_black_24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:layout_below="@id/space"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_below="@id/stop"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Must be fixed height or vertical divider will
|
||||
stretch the entire height -->
|
||||
<LinearLayout
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:text="@string/delete"/>
|
||||
|
||||
<View style="@style/Divider.Vertical"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:text="@string/save"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- For the synced devices list. Probably better than a ScrollView. -->
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/appbar"
|
||||
android:layout_above="@id/footer"
|
||||
android:paddingTop="8dp"/>
|
||||
|
||||
<View style="@style/Divider.Horizontal"
|
||||
android:layout_above="@id/footer"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_anchor="@id/appbar"
|
||||
app:layout_anchorGravity="bottom"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:progress="90"/>
|
||||
|
||||
<android.support.v7.widget.GridLayout
|
||||
android:id="@+id/bottom_sheet_numpad"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/numpad_height"
|
||||
app:columnCount="3"
|
||||
app:layout_behavior="@string/bottom_sheet_behavior"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="100dp"
|
||||
android:background="#FFF">
|
||||
|
||||
<include layout="@layout/content_grid_layout_numpad"/>
|
||||
|
||||
</android.support.v7.widget.GridLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -19,7 +19,8 @@
|
||||
<!-- NumpadTimePickerDialog -->
|
||||
<dimen name="numpad_height">300dp</dimen>
|
||||
<dimen name="time_input_text_size">45sp</dimen>
|
||||
<dimen name="fab_cell_height">88dp</dimen> <!-- 56dp fab size + 16dp top margin + 16dp bottom margin -->
|
||||
<dimen name="fab_cell_height">88dp
|
||||
</dimen> <!-- 56dp fab size + 16dp top margin + 16dp bottom margin -->
|
||||
|
||||
<!-- Bottom sheet specs -->
|
||||
<dimen name="bottom_sheet_edge_margin">24dp</dimen>
|
||||
|
||||
Reference in New Issue
Block a user