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/widget.xml | |
parent | 84bdb74c79a41c90d4d374bf5eb963191de3e7b3 (diff) |
829: Fix toggles layout for various tranlsation lengths.
Diffstat (limited to 'app/src/main/res/layout/widget.xml')
-rw-r--r-- | app/src/main/res/layout/widget.xml | 174 |
1 files changed, 99 insertions, 75 deletions
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" /> </LinearLayout> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" + android:orientation="vertical" android:layout_marginHorizontal="24dp" android:layout_marginTop="16dp" android:layout_marginBottom="16dp"> + <LinearLayout - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:gravity="center_horizontal" + android:orientation="horizontal" + android:layout_marginBottom="4dp" + android:gravity="bottom" + android:baselineAligned="false" > <TextView android:id="@+id/trackers_label" - android:layout_width="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" + android:gravity="center_horizontal" android:layout_height="wrap_content" android:text="@string/dashboard_state_trackers_label" android:textSize="10sp" android:textColor="@color/on_primary_disabled" - android:layout_marginBottom="4dp" android:textAllCaps="true" /> <TextView - android:id="@+id/state_trackers" - android:layout_width="wrap_content" - android:layout_height="18dp" - android:text="@string/dashboard_state_trackers_off" - android:textSize="12sp" - android:textColor="@color/on_primary_high_emphasis" + android:id="@+id/geolocation_label" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" + android:gravity="center_horizontal" + android:layout_height="wrap_content" + android:text="@string/dashboard_state_geolocation_label" + android:textSize="10sp" + android:textColor="@color/on_primary_disabled" android:textAllCaps="true" - android:gravity="center" /> - <ImageView - android:id="@+id/toggle_trackers" - android:layout_width="wrap_content" + <TextView + android:id="@+id/ip_address_label" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" + android:gravity="center_horizontal" android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:src="@drawable/ic_switch_disabled" + android:text="@string/dashboard_state_ipaddress_label" + android:textSize="10sp" + android:textColor="@color/on_primary_disabled" + android:textAllCaps="true" /> </LinearLayout> <LinearLayout - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:gravity="center_horizontal" + android:orientation="horizontal" + android:gravity="bottom" + android:baselineAligned="false" > <TextView - android:id="@+id/geolocation_label" - android:layout_width="wrap_content" + android:id="@+id/state_trackers" android:layout_height="wrap_content" - android:text="@string/dashboard_state_geolocation_label" - android:textSize="10sp" - android:textColor="@color/on_primary_disabled" - android:layout_marginBottom="4dp" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" + android:gravity="center_horizontal" + android:text="@string/dashboard_state_trackers_off" + android:textSize="12sp" + android:textColor="@color/on_primary_high_emphasis" android:textAllCaps="true" /> <TextView android:id="@+id/state_geolocation" - android:layout_width="wrap_content" - android:layout_height="18dp" + android:layout_height="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" android:text="@string/dashboard_state_geolocation_off" android:textSize="12sp" android:textColor="@color/on_primary_high_emphasis" android:textAllCaps="true" - android:gravity="center" + android:gravity="center_horizontal" /> - <ImageView - android:id="@+id/toggle_location" - android:layout_width="wrap_content" + <FrameLayout android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:src="@drawable/ic_switch_disabled" - /> + android:layout_width="0dp" + android:layout_weight="1" + android:layout_marginHorizontal="2dp" + android:gravity="center_horizontal" + > + <TextView + android:id="@+id/state_ip_address" + 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" + android:textAllCaps="true" + android:visibility="gone" + /> + <ProgressBar + android:id="@+id/state_ip_address_loader" + android:layout_width="16dp" + android:layout_height="16dp" + android:layout_gravity="center" + android:indeterminate="true" + android:visibility="visible" + + /> + </FrameLayout> </LinearLayout> <LinearLayout - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical" - android:gravity="center_horizontal" + android:orientation="horizontal" + android:gravity="center" > - <TextView - android:id="@+id/ip_address_label" - android:layout_width="wrap_content" + <ImageView + android:id="@+id/toggle_trackers" + android:layout_width="0dp" + android:layout_weight="1" android:layout_height="wrap_content" - android:text="@string/dashboard_state_ipaddress_label" - android:textSize="10sp" - android:textColor="@color/on_primary_disabled" - android:layout_marginBottom="4dp" - android:textAllCaps="true" + android:padding="8dp" + android:src="@drawable/ic_switch_disabled" /> - <TextView - android:id="@+id/state_ip_address" - android:layout_width="wrap_content" - android:layout_height="18dp" - android:text="@string/dashboard_state_ipaddress_off" - android:textSize="12sp" - android:textColor="@color/on_primary_high_emphasis" - android:textAllCaps="true" - android:visibility="gone" - android:gravity="center" + <ImageView + android:id="@+id/toggle_location" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:padding="8dp" + android:src="@drawable/ic_switch_disabled" /> - <ProgressBar - android:id="@+id/state_ip_address_loader" - android:layout_width="18dp" - android:layout_height="18dp" - android:indeterminate="true" - android:visibility="visible"/> <ImageView android:id="@+id/toggle_ipscrambling" - android:layout_width="wrap_content" + android:layout_width="0dp" + android:layout_weight="1" android:layout_height="wrap_content" - android:layout_marginTop="8dp" + android:padding="8dp" android:src="@drawable/ic_switch_disabled" /> </LinearLayout> </LinearLayout> - <LinearLayout android:id="@+id/graph" android:layout_width="match_parent" - android:layout_marginTop="16dp" + android:layout_marginTop="8dp" android:layout_marginHorizontal="24dp" android:layout_height="26dp" > @@ -711,7 +737,7 @@ android:layout_marginTop="16dp" android:layout_marginHorizontal="24dp" android:layout_marginBottom="24dp" - android:gravity="center_vertical" + android:gravity="top" > <ImageView @@ -719,15 +745,14 @@ android:layout_width="16dp" android:layout_height="16dp" android:padding="1dp" + android:layout_marginTop="4dp" android:src="@drawable/ic_legend_blocked" /> <TextView - android:ellipsize="end" android:id="@+id/graph_legend_blocked" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" - android:maxLines="1" tools:text="0 Trackers" android:textColor="@color/on_primary_medium_emphasis" android:layout_marginStart="8dp" @@ -740,17 +765,16 @@ android:layout_width="16dp" android:layout_height="16dp" android:padding="1dp" + android:layout_marginTop="4dp" android:layout_marginStart="10dp" android:src="@drawable/ic_legend_leaked" /> <TextView - android:ellipsize="end" android:id="@+id/graph_legend_allowed" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" - android:maxLines="1" tools:text="0 Trackers" android:textColor="@color/on_primary_medium_emphasis" android:layout_marginStart="8dp" |