couple UI changes
This commit is contained in:
parent
aeab50d606
commit
55a6cd6f35
|
@ -186,9 +186,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventsListener {
|
|||
}
|
||||
|
||||
fun toggleCustomReminderVisibility(show: Boolean) {
|
||||
custom_reminder_other_period.beVisibleIf(show)
|
||||
custom_reminder_other_val.beVisibleIf(show)
|
||||
custom_reminder_value.beVisibleIf(show)
|
||||
custom_reminder_holder.beVisibleIf(show)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
|
|
@ -89,6 +89,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
mConfig.defaultReminderMinutes = Integer.valueOf(value) * multiplier
|
||||
toast(R.string.reminder_saved)
|
||||
hideKeyboard()
|
||||
}
|
||||
|
||||
private fun setupReminderPeriod(mins: Int) {
|
||||
|
|
|
@ -127,46 +127,47 @@
|
|||
android:entries="@array/reminders"
|
||||
android:padding="@dimen/activity_margin"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/custom_reminder_value"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/custom_reminder_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/event_reminder"
|
||||
android:layout_marginLeft="@dimen/activity_margin"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:minEms="5"
|
||||
android:textSize="@dimen/day_text_size"
|
||||
android:visibility="gone"/>
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/custom_reminder_other_period"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/custom_reminder_value"
|
||||
android:layout_alignTop="@+id/custom_reminder_value"
|
||||
android:layout_toRightOf="@+id/custom_reminder_value"
|
||||
android:entries="@array/custom_reminders"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:visibility="gone"/>
|
||||
<EditText
|
||||
android:id="@+id/custom_reminder_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:maxLength="10"
|
||||
android:minEms="5"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/custom_reminder_other_val"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/custom_reminder_value"
|
||||
android:layout_alignTop="@+id/custom_reminder_value"
|
||||
android:layout_toRightOf="@+id/custom_reminder_other_period"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/before"
|
||||
android:visibility="gone"/>
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/custom_reminder_other_period"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:entries="@array/custom_reminders"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/activity_margin"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/custom_reminder_other_val"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:text="@string/before"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_repetition_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/custom_reminder_value"
|
||||
android:layout_below="@+id/custom_reminder_holder"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:text="@string/repetition"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
|
|
@ -114,13 +114,14 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/settings_custom_reminder_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/settings_padding"
|
||||
android:layout_marginRight="@dimen/activity_margin"
|
||||
android:layout_marginTop="@dimen/settings_padding"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<EditText
|
||||
|
@ -130,41 +131,39 @@
|
|||
android:layout_marginLeft="@dimen/activity_margin"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:maxLength="10"
|
||||
android:minEms="3"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/custom_reminder_other_period"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/custom_reminder_value"
|
||||
android:layout_alignTop="@+id/custom_reminder_value"
|
||||
android:layout_toRightOf="@+id/custom_reminder_value"
|
||||
android:layout_height="match_parent"
|
||||
android:entries="@array/custom_reminders"
|
||||
android:gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/settings_padding"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/custom_reminder_other_val"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/custom_reminder_value"
|
||||
android:layout_alignTop="@+id/custom_reminder_value"
|
||||
android:layout_toRightOf="@+id/custom_reminder_other_period"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/settings_padding"
|
||||
android:gravity="center"
|
||||
android:text="@string/before"/>
|
||||
|
||||
<android.support.v4.widget.Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/custom_reminder_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/custom_reminder_value"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignTop="@+id/custom_reminder_value"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:textSize="@dimen/day_text_size"
|
||||
android:text="@string/save"/>
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:text="@string/save"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
Loading…
Reference in New Issue