replacing event all-day toggle with a checkbox
This commit is contained in:
parent
ece2aa6e9c
commit
3a1a3530ce
|
@ -233,6 +233,10 @@ class EventActivity : SimpleActivity() {
|
||||||
jumpDrawablesToCurrentState()
|
jumpDrawablesToCurrentState()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event_all_day_holder.setOnClickListener {
|
||||||
|
event_all_day.toggle()
|
||||||
|
}
|
||||||
|
|
||||||
updateTextColors(event_scrollview)
|
updateTextColors(event_scrollview)
|
||||||
updateIconColors()
|
updateIconColors()
|
||||||
event_time_zone_image.beVisibleIf(config.allowChangingTimeZones)
|
event_time_zone_image.beVisibleIf(config.allowChangingTimeZones)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/event_scrollview"
|
android:id="@+id/event_scrollview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -86,33 +85,43 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/event_description_divider"
|
android:layout_below="@+id/event_description_divider"
|
||||||
android:layout_alignTop="@+id/event_all_day"
|
android:layout_alignTop="@+id/event_all_day_holder"
|
||||||
android:layout_alignBottom="@+id/event_all_day"
|
android:layout_alignBottom="@+id/event_all_day_holder"
|
||||||
android:layout_marginStart="@dimen/normal_margin"
|
android:layout_marginStart="@dimen/normal_margin"
|
||||||
android:padding="@dimen/medium_margin"
|
android:padding="@dimen/medium_margin"
|
||||||
android:src="@drawable/ic_clock_vector" />
|
android:src="@drawable/ic_clock_vector" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<RelativeLayout
|
||||||
android:id="@+id/event_all_day"
|
android:id="@+id/event_all_day_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/event_description_divider"
|
android:layout_below="@+id/event_description_divider"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginStart="@dimen/small_margin"
|
android:layout_marginStart="@dimen/small_margin"
|
||||||
android:layout_marginEnd="@dimen/normal_margin"
|
|
||||||
android:layout_toEndOf="@+id/event_time_image"
|
android:layout_toEndOf="@+id/event_time_image"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingTop="@dimen/normal_margin"
|
android:paddingTop="@dimen/normal_margin"
|
||||||
android:paddingBottom="@dimen/normal_margin"
|
android:paddingEnd="@dimen/normal_margin"
|
||||||
android:text="@string/all_day"
|
android:paddingBottom="@dimen/normal_margin">
|
||||||
android:textSize="@dimen/day_text_size"
|
|
||||||
app:switchPadding="@dimen/small_margin" />
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/event_all_day"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:clickable="false"
|
||||||
|
android:layoutDirection="rtl"
|
||||||
|
android:text="@string/all_day"
|
||||||
|
android:textSize="@dimen/day_text_size" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/event_start_date"
|
android:id="@+id/event_start_date"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/event_time_image"
|
android:layout_below="@+id/event_time_image"
|
||||||
android:layout_alignStart="@+id/event_all_day"
|
android:layout_alignStart="@+id/event_all_day_holder"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingEnd="@dimen/activity_margin"
|
android:paddingEnd="@dimen/activity_margin"
|
||||||
|
@ -136,7 +145,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/event_start_date"
|
android:layout_below="@+id/event_start_date"
|
||||||
android:layout_alignStart="@+id/event_all_day"
|
android:layout_alignStart="@+id/event_all_day_holder"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingTop="@dimen/activity_margin"
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingEnd="@dimen/activity_margin"
|
android:paddingEnd="@dimen/activity_margin"
|
||||||
|
|
Loading…
Reference in New Issue