Skip to content

Commit 6b403ec

Browse files
authored
Merge pull request #6542 from vector-im/feature/mna/lls-standardise-stop-text
[Location Share] - Standardise "Stop" texts for live (PSG-622)
2 parents 79762d9 + cedeb8f commit 6b403ec

File tree

6 files changed

+22
-12
lines changed

6 files changed

+22
-12
lines changed

changelog.d/6541.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[Location Share] - Standardise "Stop" texts for live

library/ui-styles/src/main/res/values/styles_location.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,23 @@
55
<item name="android:foreground">?selectableItemBackground</item>
66
<item name="android:background">@android:color/transparent</item>
77
<item name="android:textSize">12sp</item>
8-
<item name="android:padding">0dp</item>
98
<item name="android:gravity">center</item>
9+
<item name="android:padding">0dp</item>
10+
<item name="android:minWidth">0dp</item>
11+
<item name="android:insetRight">8dp</item>
12+
<item name="android:insetLeft">8dp</item>
1013
</style>
1114

1215
<style name="Widget.Vector.Button.Text.LocationLive">
1316
<item name="android:foreground">?selectableItemBackground</item>
1417
<item name="android:background">@android:color/transparent</item>
1518
<item name="android:textAppearance">@style/TextAppearance.Vector.Body.Medium</item>
1619
<item name="android:textColor">?colorError</item>
17-
<item name="android:padding">0dp</item>
1820
<item name="android:gravity">center</item>
21+
<item name="android:padding">0dp</item>
22+
<item name="android:minWidth">0dp</item>
23+
<item name="android:insetRight">12dp</item>
24+
<item name="android:insetLeft">12dp</item>
1925
</style>
2026

2127
<style name="TextAppearance.Vector.Body.BottomSheetDisplayName">
@@ -36,8 +42,11 @@
3642
<item name="android:background">@android:color/transparent</item>
3743
<item name="android:textAppearance">@style/TextAppearance.Vector.Body.Medium</item>
3844
<item name="android:textColor">?colorError</item>
39-
<item name="android:padding">0dp</item>
4045
<item name="android:gravity">center</item>
46+
<item name="android:padding">0dp</item>
47+
<item name="android:minWidth">0dp</item>
48+
<item name="android:insetRight">16dp</item>
49+
<item name="android:insetLeft">16dp</item>
4150
</style>
4251

4352
<style name="Widget.Vector.TextView.Nano.Copyright">

vector/src/main/res/layout/item_live_location_users_bottom_sheet.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
style="@style/Widget.Vector.Button.Text.BottomSheetStopSharing"
5353
android:layout_width="wrap_content"
5454
android:layout_height="wrap_content"
55-
android:layout_marginEnd="16dp"
56-
android:text="@string/live_location_bottom_sheet_stop_sharing"
55+
android:text="@string/location_share_live_stop"
5756
app:layout_constraintBottom_toBottomOf="parent"
5857
app:layout_constraintEnd_toEndOf="parent"
5958
app:layout_constraintTop_toTopOf="parent" />

vector/src/main/res/layout/view_location_live_message_banner.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
android:layout_width="wrap_content"
3838
android:layout_height="wrap_content"
3939
android:layout_marginHorizontal="8dp"
40-
tools:text="@string/location_share_live_enabled"
4140
android:textColor="?colorOnSurface"
4241
app:layout_constraintBottom_toTopOf="@id/locationLiveMessageBannerSubTitle"
4342
app:layout_constraintStart_toEndOf="@id/locationLiveMessageBannerIcon"
4443
app:layout_constraintTop_toTopOf="parent"
45-
app:layout_constraintVertical_chainStyle="packed" />
44+
app:layout_constraintVertical_chainStyle="packed"
45+
tools:text="@string/location_share_live_enabled" />
4646

4747
<TextView
4848
android:id="@+id/locationLiveMessageBannerSubTitle"
@@ -58,10 +58,10 @@
5858
<Button
5959
android:id="@+id/locationLiveMessageBannerStop"
6060
style="@style/Widget.Vector.Button.Text.LocationLive"
61-
android:layout_width="45dp"
62-
android:layout_height="30dp"
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content"
6363
android:text="@string/location_share_live_stop"
64-
app:layout_constraintEnd_toEndOf="parent"
6564
app:layout_constraintBottom_toBottomOf="@id/locationLiveMessageBannerBackground"
65+
app:layout_constraintEnd_toEndOf="parent"
6666
app:layout_constraintTop_toTopOf="@id/locationLiveMessageBannerBackground" />
6767
</merge>

vector/src/main/res/layout/view_location_live_status.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<Button
4141
android:id="@+id/locationLiveStatusStop"
4242
style="@style/Widget.Vector.Button.Text.OnPrimary.LocationLive"
43-
android:layout_width="60dp"
43+
android:layout_width="wrap_content"
4444
android:layout_height="0dp"
4545
android:text="@string/location_share_live_stop"
4646
app:layout_constraintBottom_toBottomOf="@id/locationLiveStatusContainer"

vector/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3051,7 +3051,8 @@
30513051
<string name="live_location_sharing_notification_description">Location sharing is in progress</string>
30523052
<string name="labs_enable_live_location">Enable Live Location Sharing</string>
30533053
<string name="labs_enable_live_location_summary">Temporary implementation: locations persist in room history</string>
3054-
<string name="live_location_bottom_sheet_stop_sharing">Stop sharing</string>
3054+
<!-- TODO remove key -->
3055+
<string name="live_location_bottom_sheet_stop_sharing" tools:ignore="UnusedResources">Stop sharing</string>
30553056
<string name="live_location_bottom_sheet_last_updated_at">Updated %1$s ago</string>
30563057

30573058
<string name="message_bubbles">Show Message bubbles</string>

0 commit comments

Comments
 (0)