Merge pull request #5062 from vector-im/feature/bma/location_sharing_fix

Ensure mapbox legal mention are displayed on the map
This commit is contained in:
Benoit Marty 2022-01-27 15:35:52 +01:00 committed by GitHub
commit ff6810f1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 30 deletions

1
changelog.d/5062.bugfix Normal file
View File

@ -0,0 +1 @@
Show the legal mention of mapbox when sharing location

View File

@ -1,50 +1,51 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<im.vector.app.features.location.MapTilerMapView <im.vector.app.features.location.MapTilerMapView
android:id="@+id/mapView" android:id="@+id/mapView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="0dp"
app:mapbox_renderTextureMode="true" /> app:layout_constraintBottom_toTopOf="@id/shareLocationContainer"
app:layout_constraintTop_toTopOf="parent"
app:mapbox_renderTextureMode="true"
tools:background="#4F00" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.helper.widget.Flow
android:id="@+id/shareLocationContainer" android:id="@+id/shareLocationContainer"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="72dp" android:layout_height="72dp"
android:background="?android:colorBackground" 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_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent" />
<ImageView <ImageView
android:id="@+id/shareLocationImageView" android:id="@+id/shareLocationImageView"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginStart="12dp"
android:background="@drawable/circle" android:background="@drawable/circle"
android:backgroundTint="?colorPrimary" android:backgroundTint="?colorPrimary"
android:contentDescription="@string/a11y_location_share_icon" android:contentDescription="@string/a11y_location_share_icon"
android:padding="10dp" android:padding="10dp"
android:src="@drawable/ic_attachment_location_white" android:src="@drawable/ic_attachment_location_white" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/shareLocationText"
style="@style/TextAppearance.Vector.Subtitle" style="@style/TextAppearance.Vector.Subtitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@string/location_share" android:text="@string/location_share"
android:textColor="?colorPrimary" android:textColor="?colorPrimary"
android:textStyle="bold" android:textStyle="bold" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/shareLocationImageView"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>