From 1737263c9298fd27804b7b5924c194b5546fd9b2 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Mon, 21 Nov 2022 20:29:24 +0100 Subject: [PATCH 1/2] 829: Fix toggles layout for various tranlsation lengths. --- .../main/res/layout/fragment_dashboard.xml | 174 ++++++++++-------- app/src/main/res/layout/widget.xml | 165 ++++++++++------- 2 files changed, 197 insertions(+), 142 deletions(-) diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index cedf5690..cddd603e 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -49,101 +49,92 @@ android:background="@color/divider" /> - + - + - - - - - - + - - + + + + - - - + - + android:layout_height="wrap_content"> + + + + + + + + + - + + - - + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" + android:gravity="center_horizontal" + > + + + - - - - -- GitLab From a64e416b608ac4fd69d3553b33dc55207ca047fd Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Mon, 21 Nov 2022 21:44:31 +0100 Subject: [PATCH 2/2] Fix layout on other screen for big text setting. --- .../layout/dashboard_item_submenu_button.xml | 2 +- app/src/main/res/layout/fragment_dashboard.xml | 18 ++++++++---------- .../main/res/layout/trackers_item_graph.xml | 17 +++++------------ app/src/main/res/layout/widget.xml | 9 ++++----- 4 files changed, 18 insertions(+), 28 deletions(-) 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 9129d07e..ef03ea32 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" > @@ -249,7 +251,7 @@ android:padding="1dp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@+id/graph_legend" - android:layout_marginTop="8dp" + android:layout_marginTop="9dp" android:layout_marginStart="16dp" android:background="@drawable/ic_legend_blocked" /> @@ -257,13 +259,11 @@ 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" @@ -277,22 +277,20 @@ 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 20106f70..aabc1084 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 73f55e17..ad7e2b9c 100644 --- a/app/src/main/res/layout/widget.xml +++ b/app/src/main/res/layout/widget.xml @@ -170,6 +170,7 @@ android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center" + android:gravity="center_horizontal" android:text="@string/dashboard_state_ipaddress_off" android:textSize="12sp" android:textColor="@color/on_primary_high_emphasis" @@ -736,7 +737,7 @@ android:layout_marginTop="16dp" android:layout_marginHorizontal="24dp" android:layout_marginBottom="24dp" - android:gravity="center_vertical" + android:gravity="top" >