summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-26 11:47:59 +0100
committercyBerta <cyberta@riseup.net>2021-11-26 11:47:59 +0100
commitaabf3d9633eeca6ec1ce1a31400b799b5be1b7e9 (patch)
tree210015c74e8b536b5d953894a4eebf1ad5703008 /app/src/main/res/layout
parent7c5e7d7a76ca84a320ef66f636276cb5e03a5e0c (diff)
improve location button layout, use match_parent for text height, so that auto-size text rendering works correctly
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/v_location_button.xml28
1 files changed, 15 insertions, 13 deletions
diff --git a/app/src/main/res/layout/v_location_button.xml b/app/src/main/res/layout/v_location_button.xml
index 11410c62..3779a964 100644
--- a/app/src/main/res/layout/v_location_button.xml
+++ b/app/src/main/res/layout/v_location_button.xml
@@ -21,7 +21,7 @@
/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/recommended_icn"
- android:scaleType="fitXY"
+ android:scaleType="fitCenter"
android:layout_marginRight="-13dp"
android:layout_marginEnd="-13dp"
android:layout_width="wrap_content"
@@ -42,11 +42,12 @@
android:paddingRight="@dimen/stdpadding"
android:maxLines="1"
android:ellipsize="end"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_width="match_parent"
app:autoSizeTextType="uniform"
android:gravity="center_vertical"
app:autoSizeMinTextSize="15sp"
+ app:autoSizeMaxTextSize="24sp"
android:layout_toEndOf="@id/recommended_icn"
android:layout_toRightOf="@+id/recommended_icn"
android:layout_toLeftOf="@+id/bridge_icn"
@@ -61,14 +62,13 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/bridge_icn"
- android:paddingRight="@dimen/stdpadding"
- android:paddingEnd="@dimen/stdpadding"
- android:paddingStart="@dimen/stdpadding"
- android:paddingLeft="@dimen/stdpadding"
- android:layout_marginBottom="-5dp"
- android:layout_marginTop="-5dp"
- android:scaleType="fitXY"
- android:layout_width="wrap_content"
+
+ android:paddingStart="@dimen/compact_padding"
+ android:paddingLeft="@dimen/compact_padding"
+ android:paddingRight="@dimen/compact_padding"
+ android:paddingEnd="@dimen/compact_padding"
+ android:scaleType="fitCenter"
+ android:layout_width="48dp"
android:layout_height="wrap_content"
android:layout_alignTop="@id/text_location"
android:layout_alignBottom="@+id/text_location"
@@ -76,17 +76,19 @@
android:layout_toLeftOf="@id/load_indicator"
android:src="@drawable/ic_bridge_36"
android:visibility="gone"
+ tools:visibility="visible"
/>
<se.leap.bitmaskclient.base.views.LocationIndicator
android:id="@+id/load_indicator"
android:layout_marginBottom="4dp"
android:layout_width="48dp"
- android:layout_height="wrap_content"
- android:layout_alignTop="@id/text_location"
- android:layout_alignBottom="@id/text_location"
+ android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:paddingTop="@dimen/stdpadding"
+ android:paddingBottom="@dimen/stdpadding"
android:visibility="visible"
android:layout_gravity="center_vertical"
/>