New ringtone activity layout

This commit is contained in:
Phillip Hsu
2016-08-06 00:06:15 -07:00
parent 6ae9c3511c
commit d845f241e9
9 changed files with 246 additions and 66 deletions
+59 -28
View File
@@ -1,44 +1,75 @@
<FrameLayout 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"
android:background="#0099cc"
tools:context=".ringtone.RingtoneActivity">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/colorPrimary">
<!-- The primary full-screen view. This can be replaced with whatever view
is needed to present your content, e.g. VideoView, SurfaceView,
TextureView, etc. -->
<TextView
<LinearLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:keepScreenOn="true"
android:text="@string/dummy_content"
android:textColor="#33b5e5"
android:textSize="50sp"
android:textStyle="bold"/>
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance.AppCompat.Title.Inverse"
android:layout_marginBottom="@dimen/item_margin_between_elements"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom"
android:padding="4dp">
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center"
android:visibility="gone">
<TextView
android:id="@+id/auto_silenced_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:keepScreenOn="true"
android:gravity="center_horizontal"
style="@style/TextAppearance.AppCompat.Large.Inverse"
android:layout_marginBottom="8dp"/>
<Button
android:id="@+id/btn_snooze"
android:layout_width="0dp"
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Snooze"/>
<Button
android:id="@+id/btn_dismiss"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Dismiss"/>
android:text="@android:string/ok"
style="@style/Widget.AppCompat.Button.Colored"/>
</LinearLayout>
<android.support.v7.widget.GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="72dp"
app:columnCount="2">
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_columnWeight="1"
app:layout_gravity="center"
app:elevation="0dp"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/btn_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_columnWeight="1"
app:layout_gravity="center"
app:elevation="0dp"/>
</android.support.v7.widget.GridLayout>
</FrameLayout>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextClock xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Base.TextAppearance.AppCompat.Display2"
android:textColor="?android:attr/textColorPrimaryInverse"/>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.philliphsu.clock2.timers.CountdownChronometer
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/TextAppearance.AppCompat.Display2"
android:textColor="?android:attr/textColorPrimaryInverse"/>
+19 -1
View File
@@ -19,7 +19,7 @@
<!-- NumpadTimePickerDialog -->
<dimen name="numpad_height">300dp</dimen>
<dimen name="time_input_text_size">45sp</dimen>
<dimen name="fab_cell_height">88dp
<dimen name="viewpager_bottom_padding">88dp
</dimen> <!-- 56dp fab size + 16dp top margin + 16dp bottom margin -->
<!-- Bottom sheet specs -->
@@ -30,4 +30,22 @@
then the sheet will show fully expanded; the contents are not stretched to match this height.
This is large enough to accommodate most, if not all, of our layouts. -->
<dimen name="peek_height_upper_limit">500dp</dimen>
<dimen name="text_size_body_1">14sp</dimen>
<dimen name="text_size_body_2">14sp</dimen>
<dimen name="text_size_button">14sp</dimen>
<dimen name="text_size_caption">12sp</dimen>
<dimen name="text_size_display_1">34sp</dimen>
<dimen name="text_size_display_2">45sp</dimen>
<dimen name="text_size_display_3">56sp</dimen>
<dimen name="text_size_display_4">112sp</dimen>
<dimen name="text_size_headline">24sp</dimen>
<dimen name="text_size_large">22sp</dimen>
<dimen name="text_size_medium">18sp</dimen>
<dimen name="text_size_menu">16sp</dimen>
<dimen name="text_size_small">14sp</dimen>
<dimen name="text_size_subhead">16sp</dimen>
<dimen name="text_size_subtitle_toolbar">16dp</dimen>
<dimen name="text_size_title">20sp</dimen>
<dimen name="text_size_title_toolbar">20dp</dimen>
</resources>
+3
View File
@@ -197,4 +197,7 @@
<string name="add_one_minute">Add 1 minute</string>
<string name="stop">Stop</string>
<string name="timer_expired">Timer expired</string>
<string name="alarm_auto_silenced_text">You missed your alarm.</string>
<string name="timer_auto_silenced_text">Your timer expired.</string>
</resources>