]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Consistently use *Start/End in layouts and remove redundant old settings
authorTobias Brunner <tobias@strongswan.org>
Tue, 18 Feb 2025 11:11:43 +0000 (12:11 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 18 Feb 2025 13:12:43 +0000 (14:12 +0100)
src/frontends/android/app/src/main/res/layout/imc_state_fragment.xml
src/frontends/android/app/src/main/res/layout/profile_detail_view.xml
src/frontends/android/app/src/main/res/layout/profile_import_view.xml
src/frontends/android/app/src/main/res/layout/profile_list_fragment.xml
src/frontends/android/app/src/main/res/layout/remediation_instruction.xml
src/frontends/android/app/src/main/res/layout/remediation_instruction_item.xml
src/frontends/android/app/src/main/res/layout/selected_application_item.xml
src/frontends/android/app/src/main/res/layout/trusted_certificates_item.xml
src/frontends/android/app/src/main/res/layout/two_line_button.xml
src/frontends/android/app/src/main/res/layout/vpn_state_fragment.xml

index c1e278968797327098ec4768065b4c4fb96cb8d9..ba1762882f371cfa4189745fbe4ebf63389c05ca 100644 (file)
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
+            android:layout_marginStart="20dp"
+            android:layout_marginEnd="20dp"
             android:layout_marginTop="10dp"
             android:orientation="horizontal" >
 
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginRight="5dp"
+                android:layout_marginEnd="5dp"
                 android:text="@string/imc_state_label"
                 android:textColor="?android:textColorPrimary"
                 android:textSize="20sp" />
@@ -58,8 +58,8 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginBottom="10dp"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
+            android:layout_marginStart="20dp"
+            android:layout_marginEnd="20dp"
             android:text="@string/show_remediation_instructions"
             android:textAppearance="?android:attr/textAppearanceSmall"
             android:textColor="?android:attr/textColorSecondary" />
index 5197c63f7116adc96dc696c44dcdc1d68cd76ee2..eb67583bbe065e267ef0bb154d693d70deebe1c1 100644 (file)
@@ -27,7 +27,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="@drawable/state_background"
-        android:drawableStart="@android:drawable/ic_dialog_alert"
+        app:drawableStartCompat="@android:drawable/ic_dialog_alert"
         android:drawablePadding="8dp"
         android:padding="8dp"
         android:text="@string/alert_text_vpn_profile_read_only"
@@ -73,7 +73,7 @@
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
+                android:layout_marginStart="4dp"
                 android:text="@string/profile_vpn_type_label"
                 android:textSize="12sp" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
                     android:layout_marginTop="4dp"
                     android:text="@string/profile_user_certificate_label"
                     android:textSize="12sp" />
                     android:id="@+id/install_user_certificate"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="4dp"
-                    android:layout_marginRight="4dp"
+                    android:layout_marginStart="4dp"
+                    android:layout_marginEnd="4dp"
                     android:text="@string/profile_user_certificate_install" />
 
             </LinearLayout>
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
+                android:layout_marginStart="4dp"
                 android:text="@string/profile_ca_label"
                 android:textSize="12sp" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
                     android:layout_marginTop="10dp"
                     android:text="@string/profile_advanced_label"
                     android:textSize="20sp" />
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:text="@string/profile_cert_req_label" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_cert_req_hint"
                     android:textSize="12sp" />
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:text="@string/profile_use_ocsp_label" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_use_ocsp_hint"
                     android:textSize="12sp" />
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:text="@string/profile_use_crl_label" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_use_crl_hint"
                     android:textSize="12sp" />
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:text="@string/profile_strict_revocation_label" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_strict_revocation_hint"
                     android:textSize="12sp" />
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:text="@string/profile_rsa_pss_label" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_rsa_pss_hint"
                     android:textSize="12sp" />
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:text="@string/profile_ipv6_transport_label" />
 
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_ipv6_transport_hint"
                     android:textSize="12sp" />
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginTop="10dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_split_tunneling_label"
                 <TextView
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
                     android:layout_marginTop="10dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_split_tunneling_intro"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginTop="20dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_select_apps_label"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginTop="10dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_proposals_label"
                     android:id="@+id/proposal_intro"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
                     android:layout_marginTop="10dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_proposals_intro"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="4dp"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginTop="10dp"
                     android:layout_marginBottom="10dp"
                     android:text="@string/profile_profile_id"
                     android:id="@+id/profile_id"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginLeft="4dp"
                     android:layout_marginTop="10dp"
                     android:layout_marginBottom="10dp"
                     android:textIsSelectable="true"
index 6197edae9e8fb1f4c19ecd1793b46d9735ef379a..bca3ac853c5a24a5140557e67468aa1c699b04ce 100644 (file)
@@ -40,8 +40,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginBottom="8dp"
-            android:drawableLeft="@android:drawable/ic_dialog_alert"
-            android:drawableStart="@android:drawable/ic_dialog_alert"
+            app:drawableStartCompat="@android:drawable/ic_dialog_alert"
             android:drawablePadding="8dp"
             android:textStyle="bold"
             android:text="@string/profile_import_exists"
@@ -57,7 +56,6 @@
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
                 android:layout_marginStart="4dp"
                 android:textSize="12sp"
                 android:text="@string/profile_name_label_simple" />
@@ -66,7 +64,6 @@
                 android:id="@+id/name"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
                 android:layout_marginStart="4dp"
                 android:textAppearance="?android:attr/textAppearanceMedium"
                 android:textColor="?android:attr/textColorPrimary" />
@@ -75,7 +72,6 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="6dp"
-                android:layout_marginLeft="4dp"
                 android:layout_marginStart="4dp"
                 android:textSize="12sp"
                 android:text="@string/profile_gateway_label" />
@@ -84,7 +80,6 @@
                 android:id="@+id/gateway"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
                 android:layout_marginStart="4dp"
                 android:textAppearance="?android:attr/textAppearanceMedium"
                 android:textColor="?android:attr/textColorPrimary" />
@@ -93,7 +88,6 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="6dp"
-                android:layout_marginLeft="4dp"
                 android:layout_marginStart="4dp"
                 android:textSize="12sp"
                 android:text="@string/profile_vpn_type_label" />
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginBottom="4dp"
-                android:layout_marginLeft="4dp"
                 android:layout_marginStart="4dp"
                 android:textAppearance="?android:attr/textAppearanceMedium"
                 android:textColor="?android:attr/textColorPrimary" />
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="4dp"
-                android:layout_marginLeft="4dp"
+                android:layout_marginStart="4dp"
                 android:textSize="12sp"
                 android:text="@string/profile_user_certificate_label" />
 
                 android:id="@+id/import_user_certificate"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
+                android:layout_marginStart="4dp"
+                android:layout_marginEnd="4dp"
                 android:text="@string/profile_cert_import" />
 
         </LinearLayout>
             <TextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="4dp"
+                android:layout_marginStart="4dp"
                 android:textSize="12sp"
                 android:text="@string/profile_ca_label" />
 
index 7308f6d486e032672631b97af68fa16b81c45f11..6cc9d5b9c70ac4d6ea3b436eb5909c737c398d67 100644 (file)
@@ -19,8 +19,8 @@
     android:layout_height="match_parent"
     android:paddingBottom="10dp"
     android:paddingTop="10dp"
-    android:paddingLeft="5dp"
-    android:paddingRight="5dp" >
+    android:paddingStart="5dp"
+    android:paddingEnd="5dp" >
 
     <ListView
         android:id="@+id/profile_list"
@@ -33,7 +33,7 @@
      <TextView android:id="@+id/profile_list_empty"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginLeft="15dp"
+        android:layout_marginStart="15dp"
         android:text="@string/no_profiles"/>
 
 </FrameLayout>
index 8bae732f6d8c634283b8e07409699a847445d4cc..9a389914482a9821cb70f9ab17c0fc8dc936176a 100644 (file)
@@ -24,7 +24,7 @@
         android:id="@+id/title"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="10dp"
+        android:layout_marginStart="10dp"
         android:textIsSelectable="true"
         android:textAppearance="?android:attr/textAppearanceLarge" />
 
@@ -32,7 +32,7 @@
         android:id="@+id/description"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="10dp"
+        android:layout_marginStart="10dp"
         android:textIsSelectable="true"
         android:textColor="?android:textColorSecondary"
         android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -41,7 +41,7 @@
         android:id="@+id/list_header"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="10dp"
+        android:layout_marginStart="10dp"
         android:layout_marginTop="20dp"
         android:textIsSelectable="true"
         android:textAppearance="?android:attr/textAppearanceMedium" />
index cb14fe89a743d18e8ef5368c7bb2bf8f7d0e5737..ddd9f67a5bfe62341706840c4602b2b32ba54315 100644 (file)
@@ -27,8 +27,8 @@
         android:id="@android:id/text1"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="15dp"
-        android:layout_marginRight="15dp"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
         android:textAppearance="?android:attr/textAppearanceMedium"
         android:textIsSelectable="false" />
 
@@ -37,8 +37,8 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@android:id/text1"
-        android:layout_alignLeft="@android:id/text1"
-        android:layout_alignRight="@android:id/text1"
+        android:layout_alignStart="@android:id/text1"
+        android:layout_alignEnd="@android:id/text1"
         android:textColor="?android:textColorSecondary"
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:singleLine="true"
index aacbb3b09b0564269b50a3e321da1f1f207535b6..1f666478a81f7c9343f2720e9a15133e2d92e09f 100644 (file)
@@ -19,8 +19,8 @@
     android:orientation="horizontal"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingLeft="8dp"
-    android:paddingRight="8dp"
+    android:paddingStart="8dp"
+    android:paddingEnd="8dp"
     android:minHeight="?android:listPreferredItemHeight"
     android:background="@drawable/activated_background"
     android:gravity="center_vertical" >
@@ -29,7 +29,6 @@
         android:duplicateParentState="true"
         android:layout_width="@android:dimen/app_icon_size"
         android:layout_height="@android:dimen/app_icon_size"
-        android:layout_marginRight="8dip"
         android:layout_marginEnd="8dip"
         android:scaleType="centerInside" />
 
@@ -47,7 +46,6 @@
         android:duplicateParentState="true"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="16dp"
         android:layout_marginStart="16dp" />
 
 </org.strongswan.android.ui.widget.CheckableLinearLayout>
index 6677a618aacb7e2691c2040042dde94c033d6ac1..7b54b675122538d6e19186f81534923cc329fd32 100644 (file)
@@ -30,7 +30,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@id/subject_primary"
-        android:layout_alignLeft="@id/subject_primary"
+        android:layout_alignStart="@id/subject_primary"
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:textColor="?android:attr/textColorSecondary" />
 
index c8edc04c25e85b9dac0640e6b1d3344b38a2796e..f7ceaf1c8b2d09ca4afa0102f99fea3732cf6f98 100644 (file)
@@ -34,7 +34,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_below="@android:id/text1"
-        android:layout_alignLeft="@android:id/text1"
+        android:layout_alignStart="@android:id/text1"
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:textColor="?android:attr/textColorSecondary" />
 
index 4616adf0ab4ef7c64fe44e26be992a8a1d52e583..9227007fb919e157acac21ededd8af2030bbf361 100644 (file)
@@ -34,8 +34,8 @@
             android:id="@+id/vpn_error_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
+            android:layout_marginStart="20dp"
+            android:layout_marginEnd="20dp"
             android:layout_marginTop="24dp"
             android:layout_marginBottom="12dp"
             android:text="Failed to establish VPN: Server is unreachable"
@@ -53,7 +53,7 @@
                 android:id="@+id/show_log"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="8dp"
+                android:layout_marginStart="8dp"
                 android:text="@string/show_log"
                 android:textColor="@color/primary"
                 android:textSize="14sp"
@@ -84,8 +84,8 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginBottom="10dp"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
+            android:layout_marginStart="20dp"
+            android:layout_marginEnd="20dp"
             android:layout_marginTop="10dp"
             android:columnCount="2"
             android:rowCount="2" >
@@ -93,7 +93,7 @@
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginRight="5dp"
+                android:layout_marginEnd="5dp"
                 android:gravity="top"
                 android:text="@string/state_label"
                 android:textColor="?android:textColorPrimary"
                 android:id="@+id/vpn_profile_label"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginRight="5dp"
+                android:layout_marginEnd="5dp"
                 android:gravity="top"
                 android:text="@string/profile_label"
                 android:textColor="?android:textColorPrimary"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginBottom="10dp"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
+            android:layout_marginStart="20dp"
+            android:layout_marginEnd="20dp"
             android:indeterminate="true"
             android:visibility="gone"
             style="@style/Widget.AppCompat.ProgressBar.Horizontal" />
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginBottom="10dp"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="20dp"
+            android:layout_marginStart="20dp"
+            android:layout_marginEnd="20dp"
             android:text="@string/disconnect"
             style="?android:attr/borderlessButtonStyle" >
         </Button>