Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure mapbox legal mention are displayed on the map #5062

Merged
merged 3 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5062.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show the legal mention of mapbox when sharing location
61 changes: 31 additions & 30 deletions vector/src/main/res/layout/fragment_location_sharing.xml
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
<?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">

<im.vector.app.features.location.MapTilerMapView
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a blocker, something I noticed in the file layout - we could flatten the nested constraint layouts by using a Group with a background for the bottom bar

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Using a Flow is better. 6107fb6

android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:mapbox_renderTextureMode="true" />
android:layout_height="0dp"
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:layout_width="0dp"
android:layout_height="72dp"
android:background="?android:colorBackground"
android:paddingStart="@dimen/layout_horizontal_margin"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

16dp, was 12dp before, more compliant with the guidelines.

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>