diff --git a/app/src/main/java/org/linphone/utils/DataBindingUtils.kt b/app/src/main/java/org/linphone/utils/DataBindingUtils.kt index 7e3bfa76b..6137289ec 100644 --- a/app/src/main/java/org/linphone/utils/DataBindingUtils.kt +++ b/app/src/main/java/org/linphone/utils/DataBindingUtils.kt @@ -466,6 +466,14 @@ fun setConstraintLayoutTopMargin(view: View, margins: Float) { view.layoutParams = params } +@BindingAdapter("android:layout_marginStart") +fun setConstraintLayoutStartMargin(view: View, margins: Float) { + val params = view.layoutParams as ViewGroup.MarginLayoutParams + val m = margins.toInt() + params.marginStart = m + view.layoutParams = params +} + @BindingAdapter("focusNextOnInput") fun focusNextOnInput(editText: EditText, enabled: Boolean) { if (!enabled) return diff --git a/app/src/main/res/layout-land/chat_list_fragment.xml b/app/src/main/res/layout-land/chat_list_fragment.xml index f936b392c..01248af56 100644 --- a/app/src/main/res/layout-land/chat_list_fragment.xml +++ b/app/src/main/res/layout-land/chat_list_fragment.xml @@ -90,7 +90,6 @@ android:id="@+id/conversations_list" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginTop="8dp" android:layout_marginStart="16dp" android:layout_marginEnd="16dp" app:layout_constraintStart_toEndOf="@id/bottom_nav_bar" diff --git a/app/src/main/res/layout/chat_bubble_content.xml b/app/src/main/res/layout/chat_bubble_content.xml index 5edef789f..06b2aaec8 100644 --- a/app/src/main/res/layout/chat_bubble_content.xml +++ b/app/src/main/res/layout/chat_bubble_content.xml @@ -61,7 +61,7 @@ android:id="@+id/meeting_info" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:visibility="@{model.meetingFound ? View.VISIBLE : View.GONE}" + android:visibility="@{model.meetingFound ? View.VISIBLE : View.GONE, default=gone}" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" layout="@layout/chat_bubble_meeting_invite_content" diff --git a/app/src/main/res/layout/chat_bubble_incoming.xml b/app/src/main/res/layout/chat_bubble_incoming.xml index 25794d7cb..4bc470758 100644 --- a/app/src/main/res/layout/chat_bubble_incoming.xml +++ b/app/src/main/res/layout/chat_bubble_incoming.xml @@ -28,8 +28,8 @@ android:onLongClick="@{onLongClickListener}" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" + android:layout_marginStart="8dp" + android:layout_marginEnd="32dp" android:layout_marginTop="@{model.isGroupedWithPreviousOne ? @dimen/chat_bubble_grouped_top_margin : @dimen/chat_bubble_top_margin, default=@dimen/chat_bubble_top_margin}"> 30sp 200dp 5dp + 10dp 290dp 425dp