From 793cdf8f876123ff23a17abda4483b3c19e06b9a Mon Sep 17 00:00:00 2001 From: Benoit Marty <benoit@matrix.org> Date: Wed, 26 Jan 2022 00:22:07 +0100 Subject: [PATCH 1/3] Ensure mapbox legal mention are displayed on the map --- vector/src/main/res/layout/fragment_location_sharing.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/layout/fragment_location_sharing.xml b/vector/src/main/res/layout/fragment_location_sharing.xml index b9f00786de..225bd57235 100644 --- a/vector/src/main/res/layout/fragment_location_sharing.xml +++ b/vector/src/main/res/layout/fragment_location_sharing.xml @@ -7,7 +7,9 @@ <im.vector.app.features.location.MapTilerMapView android:id="@+id/mapView" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="0dp" + app:layout_constraintBottom_toTopOf="@id/shareLocationContainer" + app:layout_constraintTop_toTopOf="parent" app:mapbox_renderTextureMode="true" /> <androidx.constraintlayout.widget.ConstraintLayout From 6107fb644d7e7810ff83da543700260c81fd5fce Mon Sep 17 00:00:00 2001 From: Benoit Marty <benoit@matrix.org> Date: Wed, 26 Jan 2022 16:56:17 +0100 Subject: [PATCH 2/3] Flatten View hierarchy --- .../res/layout/fragment_location_sharing.xml | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/vector/src/main/res/layout/fragment_location_sharing.xml b/vector/src/main/res/layout/fragment_location_sharing.xml index 225bd57235..f9a37a6241 100644 --- a/vector/src/main/res/layout/fragment_location_sharing.xml +++ b/vector/src/main/res/layout/fragment_location_sharing.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout 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" android:layout_width="match_parent" android:layout_height="match_parent"> @@ -10,43 +11,41 @@ android:layout_height="0dp" app:layout_constraintBottom_toTopOf="@id/shareLocationContainer" app:layout_constraintTop_toTopOf="parent" - app:mapbox_renderTextureMode="true" /> + app:mapbox_renderTextureMode="true" + tools:background="#4F00" /> - <androidx.constraintlayout.widget.ConstraintLayout + <androidx.constraintlayout.helper.widget.Flow android:id="@+id/shareLocationContainer" android:layout_width="0dp" android:layout_height="72dp" android:background="?android:colorBackground" + android:paddingStart="@dimen/layout_horizontal_margin" + android:paddingEnd="@dimen/layout_horizontal_margin" + app:constraint_referenced_ids="shareLocationImageView,shareLocationText" + app:flow_horizontalBias="0" + app:flow_horizontalGap="8dp" + app:flow_horizontalStyle="packed" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent"> + app:layout_constraintStart_toStartOf="parent" /> - <ImageView - android:id="@+id/shareLocationImageView" - android:layout_width="40dp" - android:layout_height="40dp" - android:layout_marginStart="12dp" - android:background="@drawable/circle" - android:backgroundTint="?colorPrimary" - android:contentDescription="@string/a11y_location_share_icon" - android:padding="10dp" - android:src="@drawable/ic_attachment_location_white" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + <ImageView + android:id="@+id/shareLocationImageView" + android:layout_width="40dp" + android:layout_height="40dp" + android:background="@drawable/circle" + android:backgroundTint="?colorPrimary" + android:contentDescription="@string/a11y_location_share_icon" + android:padding="10dp" + android:src="@drawable/ic_attachment_location_white" /> - <TextView - style="@style/TextAppearance.Vector.Subtitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:text="@string/location_share" - android:textColor="?colorPrimary" - android:textStyle="bold" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/shareLocationImageView" - app:layout_constraintTop_toTopOf="parent" /> - - </androidx.constraintlayout.widget.ConstraintLayout> + <TextView + android:id="@+id/shareLocationText" + style="@style/TextAppearance.Vector.Subtitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/location_share" + android:textColor="?colorPrimary" + android:textStyle="bold" /> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file From 62a554b5e22cdb73ca7dea4a60e37b3892c62a0c Mon Sep 17 00:00:00 2001 From: Benoit Marty <benoit@matrix.org> Date: Wed, 26 Jan 2022 17:01:52 +0100 Subject: [PATCH 3/3] Changelog --- changelog.d/5062.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5062.bugfix diff --git a/changelog.d/5062.bugfix b/changelog.d/5062.bugfix new file mode 100644 index 0000000000..ec24bfd6c1 --- /dev/null +++ b/changelog.d/5062.bugfix @@ -0,0 +1 @@ +Show the legal mention of mapbox when sharing location \ No newline at end of file