From ff6e8c83f1dd95daaadeb950efe90f7016c09458 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Wed, 23 Nov 2022 07:51:59 +0000 Subject: 829: Fix toggles layout for various tranlsation lengths. --- .../res/layout/dashboard_item_submenu_button.xml | 2 +- app/src/main/res/layout/fragment_dashboard.xml | 192 ++++++++++++--------- app/src/main/res/layout/trackers_item_graph.xml | 17 +- app/src/main/res/layout/widget.xml | 174 +++++++++++-------- 4 files changed, 215 insertions(+), 170 deletions(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/dashboard_item_submenu_button.xml b/app/src/main/res/layout/dashboard_item_submenu_button.xml index 9129d07..ef03ea3 100644 --- a/app/src/main/res/layout/dashboard_item_submenu_button.xml +++ b/app/src/main/res/layout/dashboard_item_submenu_button.xml @@ -27,7 +27,7 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:paddingHorizontal="16dp" android:background="?attr/selectableItemBackground" > - + - + - - - - - - + - - + + + + - - - + - + android:layout_height="wrap_content"> + + + + + + + + + - @@ -227,13 +259,11 @@ android:text="@string/dashboard_state_ipaddress_off" android:id="@+id/graph_legend_blocked" android:layout_width="0dp" android:layout_height="wrap_content" - tools:text="0 Trackers" - android:ellipsize="end" - android:maxLines="1" + tools:text="Blockierte Datenlecks" android:layout_marginStart="8dp" android:textSize="12sp" app:layout_constraintLeft_toRightOf="@+id/graph_legend_blocked_icon" - app:layout_constraintBottom_toBottomOf="@+id/graph_legend_blocked_icon" + app:layout_constraintTop_toBottomOf="@+id/graph_legend" app:layout_constraintRight_toLeftOf="@id/graph_legend_allowed_icon" android:layout_marginTop="8dp" android:text="@string/graph_legend_blocked" @@ -247,22 +277,20 @@ android:text="@string/dashboard_state_ipaddress_off" app:layout_constraintLeft_toRightOf="@+id/graph_legend_blocked" app:layout_constraintBottom_toBottomOf="@+id/graph_legend_blocked_icon" app:layout_constraintRight_toLeftOf="@id/graph_legend_allowed" - android:layout_marginTop="8dp" + android:layout_marginTop="9dp" android:layout_marginStart="16dp" android:background="@drawable/ic_legend_leaked" /> diff --git a/app/src/main/res/layout/trackers_item_graph.xml b/app/src/main/res/layout/trackers_item_graph.xml index 20106f7..aabc108 100644 --- a/app/src/main/res/layout/trackers_item_graph.xml +++ b/app/src/main/res/layout/trackers_item_graph.xml @@ -63,22 +63,19 @@ android:padding="1dp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@+id/graph" - android:layout_marginTop="8dp" + android:layout_marginTop="9dp" android:layout_marginStart="16dp" android:background="@drawable/ic_legend_blocked" /> @@ -89,9 +86,8 @@ android:layout_height="16dp" android:padding="1dp" app:layout_constraintLeft_toRightOf="@+id/graph_legend_blocked" - app:layout_constraintBottom_toBottomOf="@+id/graph_legend_blocked_icon" - app:layout_constraintRight_toLeftOf="@id/graph_legend_allowed" - android:layout_marginTop="8dp" + app:layout_constraintTop_toBottomOf="@+id/graph" app:layout_constraintRight_toLeftOf="@id/graph_legend_allowed" + android:layout_marginTop="9dp" android:layout_marginStart="16dp" android:background="@drawable/ic_legend_leaked" /> @@ -99,14 +95,11 @@ android:id="@+id/graph_legend_allowed" android:layout_width="0dp" android:layout_height="wrap_content" - android:maxLines="1" - android:ellipsize="end" tools:text="0 Trackers" android:layout_marginStart="8dp" android:textSize="12sp" app:layout_constraintLeft_toRightOf="@+id/graph_legend_allowed_icon" - app:layout_constraintBottom_toBottomOf="@+id/graph_legend_blocked_icon" - app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@+id/graph" app:layout_constraintRight_toRightOf="parent" android:layout_marginTop="8dp" android:layout_marginRight="16dp" android:text="@string/graph_legend_allowed" diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml index 1e78bc7..ad7e2b9 100644 --- a/app/src/main/res/layout/widget.xml +++ b/app/src/main/res/layout/widget.xml @@ -73,132 +73,158 @@ android:textColor="@color/on_primary_medium_emphasis" /> + + - - + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" + android:gravity="center_horizontal" + > + + + - - - - @@ -711,7 +737,7 @@ android:layout_marginTop="16dp" android:layout_marginHorizontal="24dp" android:layout_marginBottom="24dp" - android:gravity="center_vertical" + android:gravity="top" >