diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt index e38f2c570..8715abb4d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/EventActivity.kt @@ -472,9 +472,14 @@ class EventActivity : SimpleActivity() { event_caldav_calendar_email.beGoneIf(currentCalendar == null) if (currentCalendar == null) { + val mediumMargin = resources.getDimension(R.dimen.medium_margin).toInt() event_caldav_calendar_name.apply { text = getString(R.string.store_locally_only) - setPadding(paddingLeft, paddingTop, paddingRight, resources.getDimension(R.dimen.medium_margin).toInt()) + setPadding(paddingLeft, paddingTop, paddingRight, mediumMargin) + } + + event_caldav_calendar_holder.apply { + setPadding(paddingLeft, mediumMargin, paddingRight, mediumMargin) } } else { event_caldav_calendar_email.text = currentCalendar.accountName @@ -482,6 +487,10 @@ class EventActivity : SimpleActivity() { text = currentCalendar.displayName setPadding(paddingLeft, paddingTop, paddingRight, resources.getDimension(R.dimen.tiny_margin).toInt()) } + + event_caldav_calendar_holder.apply { + setPadding(paddingLeft, 0, paddingRight, 0) + } } } diff --git a/app/src/main/res/layout/activity_event.xml b/app/src/main/res/layout/activity_event.xml index 07fbec05d..2b0e115e0 100644 --- a/app/src/main/res/layout/activity_event.xml +++ b/app/src/main/res/layout/activity_event.xml @@ -374,8 +374,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/event_repetition_divider" - android:layout_marginBottom="@dimen/medium_margin" - android:layout_marginTop="@dimen/medium_margin" android:layout_toEndOf="@+id/event_caldav_calendar_image" android:layout_toRightOf="@+id/event_caldav_calendar_image" android:background="?attr/selectableItemBackground"