fix a small visual glitch around margin at synced calendar

This commit is contained in:
tibbi 2018-05-04 14:03:55 +02:00
parent e36bd69642
commit 42ddaa6b49
2 changed files with 10 additions and 3 deletions

View File

@ -472,9 +472,14 @@ class EventActivity : SimpleActivity() {
event_caldav_calendar_email.beGoneIf(currentCalendar == null) event_caldav_calendar_email.beGoneIf(currentCalendar == null)
if (currentCalendar == null) { if (currentCalendar == null) {
val mediumMargin = resources.getDimension(R.dimen.medium_margin).toInt()
event_caldav_calendar_name.apply { event_caldav_calendar_name.apply {
text = getString(R.string.store_locally_only) 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 { } else {
event_caldav_calendar_email.text = currentCalendar.accountName event_caldav_calendar_email.text = currentCalendar.accountName
@ -482,6 +487,10 @@ class EventActivity : SimpleActivity() {
text = currentCalendar.displayName text = currentCalendar.displayName
setPadding(paddingLeft, paddingTop, paddingRight, resources.getDimension(R.dimen.tiny_margin).toInt()) setPadding(paddingLeft, paddingTop, paddingRight, resources.getDimension(R.dimen.tiny_margin).toInt())
} }
event_caldav_calendar_holder.apply {
setPadding(paddingLeft, 0, paddingRight, 0)
}
} }
} }

View File

@ -374,8 +374,6 @@
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_repetition_divider" 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_toEndOf="@+id/event_caldav_calendar_image"
android:layout_toRightOf="@+id/event_caldav_calendar_image" android:layout_toRightOf="@+id/event_caldav_calendar_image"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"