wrap the Edit Alarm dialog in a scrollview

This commit is contained in:
tibbi 2018-03-05 18:53:26 +01:00
parent 6001be8f17
commit 8018994881

View File

@ -1,90 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/edit_alarm_holder"
android:id="@+id/edit_alarm_scrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/edit_alarm_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:textSize="@dimen/alarm_text_size"
tools:text="07:00"/>
<LinearLayout
android:id="@+id/edit_alarm_days_holder"
android:layout_width="match_parent"
android:layout_height="@dimen/alarm_day_size"
android:layout_below="@+id/edit_alarm_time"
android:layout_marginBottom="@dimen/medium_margin"
android:layout_marginTop="@dimen/medium_margin"
android:orientation="horizontal"/>
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/edit_alarm_vibrate_holder"
android:id="@+id/edit_alarm_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/edit_alarm_days_holder"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/normal_margin"
android:paddingLeft="@dimen/tiny_margin"
android:paddingTop="@dimen/normal_margin">
android:padding="@dimen/activity_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/edit_alarm_vibrate"
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/edit_alarm_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:textSize="@dimen/alarm_text_size"
tools:text="07:00"/>
<LinearLayout
android:id="@+id/edit_alarm_days_holder"
android:layout_width="match_parent"
android:layout_height="@dimen/alarm_day_size"
android:layout_below="@+id/edit_alarm_time"
android:layout_marginBottom="@dimen/medium_margin"
android:layout_marginTop="@dimen/medium_margin"
android:orientation="horizontal"/>
<RelativeLayout
android:id="@+id/edit_alarm_vibrate_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:drawableLeft="@drawable/ic_vibrate"
android:layout_below="@+id/edit_alarm_days_holder"
android:background="?attr/selectableItemBackground"
android:paddingBottom="@dimen/normal_margin"
android:paddingLeft="@dimen/tiny_margin"
android:paddingTop="@dimen/normal_margin">
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/edit_alarm_vibrate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:drawableLeft="@drawable/ic_vibrate"
android:drawablePadding="@dimen/normal_margin"
android:text="@string/vibrate"/>
</RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/edit_alarm_sound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/edit_alarm_vibrate_holder"
android:background="?attr/selectableItemBackground"
android:drawableLeft="@drawable/ic_bell"
android:drawablePadding="@dimen/normal_margin"
android:text="@string/vibrate"/>
android:paddingBottom="@dimen/normal_margin"
android:paddingLeft="@dimen/tiny_margin"
android:paddingTop="@dimen/normal_margin"
android:textSize="@dimen/normal_text_size"
tools:text="Default alarm"/>
<ImageView
android:id="@+id/edit_alarm_label_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/edit_alarm_label"
android:layout_alignTop="@+id/edit_alarm_label"
android:layout_below="@+id/edit_alarm_sound"
android:layout_marginLeft="@dimen/tiny_margin"
android:layout_marginRight="@dimen/tiny_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_label"/>
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/edit_alarm_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/edit_alarm_sound"
android:layout_marginLeft="@dimen/medium_margin"
android:layout_marginTop="@dimen/small_margin"
android:layout_toRightOf="@+id/edit_alarm_label_image"
android:hint="@string/label"
android:maxLines="1"
android:singleLine="true"
android:textCursorDrawable="@null"
android:textSize="@dimen/normal_text_size"/>
</RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/edit_alarm_sound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/edit_alarm_vibrate_holder"
android:background="?attr/selectableItemBackground"
android:drawableLeft="@drawable/ic_bell"
android:drawablePadding="@dimen/normal_margin"
android:paddingBottom="@dimen/normal_margin"
android:paddingLeft="@dimen/tiny_margin"
android:paddingTop="@dimen/normal_margin"
android:textSize="@dimen/normal_text_size"
tools:text="Default alarm"/>
<ImageView
android:id="@+id/edit_alarm_label_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/edit_alarm_label"
android:layout_alignTop="@+id/edit_alarm_label"
android:layout_below="@+id/edit_alarm_sound"
android:layout_marginLeft="@dimen/tiny_margin"
android:layout_marginRight="@dimen/tiny_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_label"/>
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/edit_alarm_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/edit_alarm_sound"
android:layout_marginLeft="@dimen/medium_margin"
android:layout_marginTop="@dimen/small_margin"
android:layout_toRightOf="@+id/edit_alarm_label_image"
android:hint="@string/label"
android:maxLines="1"
android:singleLine="true"
android:textCursorDrawable="@null"
android:textSize="@dimen/normal_text_size"/>
</RelativeLayout>
</ScrollView>