diff options
author | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-11-23 07:51:59 +0000 |
---|---|---|
committer | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-11-23 07:51:59 +0000 |
commit | ff6e8c83f1dd95daaadeb950efe90f7016c09458 (patch) | |
tree | 1cbbb02709c2f50335ccc3d7a5bd747f76375c9e /app/src/main/res/layout/fragment_dashboard.xml | |
parent | 84bdb74c79a41c90d4d374bf5eb963191de3e7b3 (diff) |
829: Fix toggles layout for various tranlsation lengths.
Diffstat (limited to 'app/src/main/res/layout/fragment_dashboard.xml')
-rw-r--r-- | app/src/main/res/layout/fragment_dashboard.xml | 192 |
1 files changed, 110 insertions, 82 deletions
diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index cedf569..b1fdaa0 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -49,122 +49,154 @@ android:background="@color/divider" /> - + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp" + android:layout_marginTop="8dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:padding="16dp" - - android:layout_marginTop="8dp" - android:layout_marginBottom="16dp"> - <LinearLayout + android:layout_marginBottom="8dp" + android:gravity="bottom" + android:baselineAligned="false" + > + <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:orientation="vertical" android:gravity="center_horizontal" - > - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/dashboard_state_trackers_label" - android:textSize="12sp" - android:textColor="@color/secondary_text" - android:layout_marginBottom="8dp" - android:textAllCaps="true" - /> - <TextView - android:id="@+id/state_trackers" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/dashboard_state_trackers_off" - android:textSize="12sp" - android:textColor="@color/primary_text" - android:textAllCaps="true" - /> - <Switch - android:id="@+id/toggle_trackers" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_margin="12dp" - /> - </LinearLayout> - <LinearLayout + android:text="@string/dashboard_state_trackers_label" + android:textSize="12sp" + android:textColor="@color/secondary_text" + android:textAllCaps="true" + /> + <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:orientation="vertical" android:gravity="center_horizontal" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/dashboard_state_geolocation_label" - android:textSize="12sp" - android:textColor="@color/secondary_text" - android:layout_marginBottom="8dp" - android:textAllCaps="true" - /> - <TextView - android:id="@+id/state_geolocation" - android:layout_width="wrap_content" + android:text="@string/dashboard_state_geolocation_label" + android:textSize="12sp" + android:textColor="@color/secondary_text" + android:textAllCaps="true" + /> + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:gravity="center_horizontal" + android:text="@string/dashboard_state_ipaddress_label" + android:textSize="12sp" + android:textColor="@color/secondary_text" + android:textAllCaps="true" + /> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="bottom" + android:baselineAligned="false" + > + <TextView + android:id="@+id/state_trackers" + android:layout_width="0dp" + android:layout_weight="1" + android:gravity="center_horizontal" android:layout_height="wrap_content" - android:text="@string/dashboard_state_geolocation_off" + android:text="@string/dashboard_state_trackers_off" android:textSize="12sp" android:textColor="@color/primary_text" android:textAllCaps="true" /> - <Switch - android:id="@+id/toggle_location" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_margin="12dp" - /> - </LinearLayout> - <LinearLayout + + <TextView + android:id="@+id/state_geolocation" android:layout_width="0dp" + android:layout_weight="1" + android:gravity="center_horizontal" android:layout_height="wrap_content" + android:text="@string/dashboard_state_geolocation_off" + android:textSize="12sp" + android:textColor="@color/primary_text" + android:textAllCaps="true" + /> + <FrameLayout + android:layout_width="0dp" android:layout_weight="1" - android:orientation="vertical" android:gravity="center_horizontal" - > - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/dashboard_state_ipaddress_label" - android:textSize="12sp" - android:textColor="@color/secondary_text" - android:layout_marginBottom="8dp" - android:textAllCaps="true" - /> + android:layout_height="wrap_content"> <TextView android:id="@+id/state_ip_address" android:layout_width="wrap_content" android:layout_height="wrap_content" -android:text="@string/dashboard_state_ipaddress_off" + android:layout_gravity="center_horizontal" + android:gravity="center_horizontal" + android:text="@string/dashboard_state_ipaddress_off" android:textSize="12sp" android:textColor="@color/primary_text" android:textAllCaps="true" - android:visibility="gone" + android:visibility="visible" /> <ProgressBar android:id="@+id/state_ip_address_loader" + android:layout_gravity="center_horizontal" android:layout_width="16dp" android:layout_height="16dp" android:indeterminate="true" + android:visibility="visible"/> + </FrameLayout> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_weight="1" + /> + <Switch + android:id="@+id/toggle_trackers" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:padding="12dp" + /> + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_weight="2" + /> + <Switch + android:id="@+id/toggle_location" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:padding="12dp" + /> + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_weight="2" + /> <Switch android:id="@+id/toggle_ipscrambling" android:layout_height="wrap_content" android:layout_width="wrap_content" - android:layout_margin="12dp" + android:padding="12dp" /> + <View + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_weight="1" + /> </LinearLayout> </LinearLayout> - <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" @@ -219,7 +251,7 @@ android:text="@string/dashboard_state_ipaddress_off" 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" /> @@ -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" /> <TextView android:id="@+id/graph_legend_allowed" android:layout_width="0dp" - android:ellipsize="end" - android:maxLines="1" android:layout_height="wrap_content" tools:text="0 Trackers" android:layout_marginStart="8dp" android:textSize="12sp" app:layout_constraintRight_toLeftOf="@id/leaking_app_button" app:layout_constraintLeft_toRightOf="@+id/graph_legend_allowed_icon" - app:layout_constraintBottom_toBottomOf="@+id/graph_legend_blocked_icon" + app:layout_constraintTop_toBottomOf="@+id/graph_legend" android:layout_marginTop="8dp" android:text="@string/graph_legend_allowed" /> |