adding a timezone button at the Event Details screen

This commit is contained in:
tibbi 2019-12-09 15:36:27 +01:00
parent 8fe9dfdf43
commit 40fb2e318c
3 changed files with 43 additions and 1 deletions

View File

@ -162,6 +162,7 @@ class EventActivity : SimpleActivity() {
event_start_time.setOnClickListener { setupStartTime() } event_start_time.setOnClickListener { setupStartTime() }
event_end_date.setOnClickListener { setupEndDate() } event_end_date.setOnClickListener { setupEndDate() }
event_end_time.setOnClickListener { setupEndTime() } event_end_time.setOnClickListener { setupEndTime() }
event_timezone.setOnClickListener { setupTimezone() }
event_all_day.setOnCheckedChangeListener { compoundButton, isChecked -> toggleAllDay(isChecked) } event_all_day.setOnCheckedChangeListener { compoundButton, isChecked -> toggleAllDay(isChecked) }
event_repetition.setOnClickListener { showRepeatIntervalDialog() } event_repetition.setOnClickListener { showRepeatIntervalDialog() }
@ -1163,6 +1164,10 @@ class EventActivity : SimpleActivity() {
} }
} }
private fun setupTimezone() {
}
private fun checkRepeatRule() { private fun checkRepeatRule() {
if (mRepeatInterval.isXWeeklyRepetition()) { if (mRepeatInterval.isXWeeklyRepetition()) {
val day = mRepeatRule val day = mRepeatRule
@ -1461,6 +1466,7 @@ class EventActivity : SimpleActivity() {
private fun updateIconColors() { private fun updateIconColors() {
val textColor = config.textColor val textColor = config.textColor
event_time_image.applyColorFilter(textColor) event_time_image.applyColorFilter(textColor)
event_timezone_image.applyColorFilter(textColor)
event_repetition_image.applyColorFilter(textColor) event_repetition_image.applyColorFilter(textColor)
event_reminder_image.applyColorFilter(textColor) event_reminder_image.applyColorFilter(textColor)
event_type_image.applyColorFilter(textColor) event_type_image.applyColorFilter(textColor)

File diff suppressed because one or more lines are too long

View File

@ -157,11 +157,38 @@
android:textSize="@dimen/day_text_size" android:textSize="@dimen/day_text_size"
tools:text="00:00"/> tools:text="00:00"/>
<ImageView
android:id="@+id/event_timezone_image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/event_end_date"
android:layout_marginStart="@dimen/normal_margin"
android:layout_alignTop="@+id/event_timezone"
android:layout_alignBottom="@+id/event_timezone"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_globe_vector"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_timezone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/event_end_date"
android:layout_marginStart="@dimen/small_margin"
android:layout_toEndOf="@+id/event_timezone_image"
android:background="?attr/selectableItemBackground"
android:layout_centerVertical="true"
android:ellipsize="end"
android:lines="1"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:textSize="@dimen/day_text_size"
tools:text="Europe/Bratislava"/>
<ImageView <ImageView
android:id="@+id/event_date_time_divider" android:id="@+id/event_date_time_divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:layout_below="@+id/event_end_date" android:layout_below="@+id/event_timezone"
android:layout_marginTop="@dimen/medium_margin" android:layout_marginTop="@dimen/medium_margin"
android:layout_marginBottom="@dimen/medium_margin" android:layout_marginBottom="@dimen/medium_margin"
android:background="@color/divider_grey" android:background="@color/divider_grey"