Skip to content

Commit

Permalink
Merge pull request #6542 from vector-im/feature/mna/lls-standardise-s…
Browse files Browse the repository at this point in the history
…top-text

[Location Share] - Standardise "Stop" texts for live (PSG-622)
  • Loading branch information
mnaturel authored Jul 18, 2022
2 parents 79762d9 + cedeb8f commit 6b403ec
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions changelog.d/6541.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Location Share] - Standardise "Stop" texts for live
15 changes: 12 additions & 3 deletions library/ui-styles/src/main/res/values/styles_location.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@
<item name="android:foreground">?selectableItemBackground</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:textSize">12sp</item>
<item name="android:padding">0dp</item>
<item name="android:gravity">center</item>
<item name="android:padding">0dp</item>
<item name="android:minWidth">0dp</item>
<item name="android:insetRight">8dp</item>
<item name="android:insetLeft">8dp</item>
</style>

<style name="Widget.Vector.Button.Text.LocationLive">
<item name="android:foreground">?selectableItemBackground</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:textAppearance">@style/TextAppearance.Vector.Body.Medium</item>
<item name="android:textColor">?colorError</item>
<item name="android:padding">0dp</item>
<item name="android:gravity">center</item>
<item name="android:padding">0dp</item>
<item name="android:minWidth">0dp</item>
<item name="android:insetRight">12dp</item>
<item name="android:insetLeft">12dp</item>
</style>

<style name="TextAppearance.Vector.Body.BottomSheetDisplayName">
Expand All @@ -36,8 +42,11 @@
<item name="android:background">@android:color/transparent</item>
<item name="android:textAppearance">@style/TextAppearance.Vector.Body.Medium</item>
<item name="android:textColor">?colorError</item>
<item name="android:padding">0dp</item>
<item name="android:gravity">center</item>
<item name="android:padding">0dp</item>
<item name="android:minWidth">0dp</item>
<item name="android:insetRight">16dp</item>
<item name="android:insetLeft">16dp</item>
</style>

<style name="Widget.Vector.TextView.Nano.Copyright">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
style="@style/Widget.Vector.Button.Text.BottomSheetStopSharing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/live_location_bottom_sheet_stop_sharing"
android:text="@string/location_share_live_stop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
10 changes: 5 additions & 5 deletions vector/src/main/res/layout/view_location_live_message_banner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
tools:text="@string/location_share_live_enabled"
android:textColor="?colorOnSurface"
app:layout_constraintBottom_toTopOf="@id/locationLiveMessageBannerSubTitle"
app:layout_constraintStart_toEndOf="@id/locationLiveMessageBannerIcon"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
app:layout_constraintVertical_chainStyle="packed"
tools:text="@string/location_share_live_enabled" />

<TextView
android:id="@+id/locationLiveMessageBannerSubTitle"
Expand All @@ -58,10 +58,10 @@
<Button
android:id="@+id/locationLiveMessageBannerStop"
style="@style/Widget.Vector.Button.Text.LocationLive"
android:layout_width="45dp"
android:layout_height="30dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/location_share_live_stop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@id/locationLiveMessageBannerBackground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/locationLiveMessageBannerBackground" />
</merge>
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/view_location_live_status.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<Button
android:id="@+id/locationLiveStatusStop"
style="@style/Widget.Vector.Button.Text.OnPrimary.LocationLive"
android:layout_width="60dp"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="@string/location_share_live_stop"
app:layout_constraintBottom_toBottomOf="@id/locationLiveStatusContainer"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,8 @@
<string name="live_location_sharing_notification_description">Location sharing is in progress</string>
<string name="labs_enable_live_location">Enable Live Location Sharing</string>
<string name="labs_enable_live_location_summary">Temporary implementation: locations persist in room history</string>
<string name="live_location_bottom_sheet_stop_sharing">Stop sharing</string>
<!-- TODO remove key -->
<string name="live_location_bottom_sheet_stop_sharing" tools:ignore="UnusedResources">Stop sharing</string>
<string name="live_location_bottom_sheet_last_updated_at">Updated %1$s ago</string>

<string name="message_bubbles">Show Message bubbles</string>
Expand Down

0 comments on commit 6b403ec

Please sign in to comment.