summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Horvath <robhor@google.com> 2023-07-17 16:03:12 +0200
committer Robert Horvath <robhor@google.com> 2023-07-17 16:03:12 +0200
commit1ac053a0c9cd6142e4cb63cd209cfff738a60b3c (patch)
treeb353d0fb5cf5b09fb2707c6810fcdd223e0d3360
parentda79250098d112a3fd588d2bf37513edf1ed1a86 (diff)
Move buttons out of LogAccessDialog ScrollView
This makes sure that the buttons are always visible, even if the body of the dialog has to be scrolled. Bug: 288858042 Test: Manual Change-Id: I86cf24f5406d69ed26a1ac907dfe8cc7e2052099
-rw-r--r--packages/SystemUI/res/layout/log_access_user_consent_dialog_permission.xml96
1 files changed, 49 insertions, 47 deletions
diff --git a/packages/SystemUI/res/layout/log_access_user_consent_dialog_permission.xml b/packages/SystemUI/res/layout/log_access_user_consent_dialog_permission.xml
index 89e36ac93387..d647c9b9f2ee 100644
--- a/packages/SystemUI/res/layout/log_access_user_consent_dialog_permission.xml
+++ b/packages/SystemUI/res/layout/log_access_user_consent_dialog_permission.xml
@@ -16,22 +16,29 @@
** limitations under the License.
*/
-->
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="380dp"
- android:layout_height="match_parent"
- android:clipToPadding="false">
- <LinearLayout
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="380dp"
+ android:layout_height="match_parent"
+ android:clipToPadding="false"
+ android:orientation="vertical">
+
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1">
+
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
android:orientation="vertical"
- android:gravity="center"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingTop="24dp"
- android:paddingBottom="24dp">
+ android:paddingBottom="24dp"
+ android:gravity="center">
- <ImageView
+ <ImageView
android:id="@+id/log_access_image_view"
android:layout_width="32dp"
android:layout_height="32dp"
@@ -41,7 +48,7 @@
tools:layout_editor_absoluteY="35dp"
android:gravity="center" />
- <TextView
+ <TextView
android:id="@+id/log_access_dialog_title"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
@@ -51,7 +58,7 @@
android:textColor="?android:attr/textColorPrimary"
android:gravity="center" />
- <TextView
+ <TextView
android:id="@+id/log_access_dialog_body"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
@@ -60,42 +67,37 @@
android:textAppearance="@style/PrimaryAllowLogAccess"
android:textColor="?android:attr/textColorPrimary"
android:gravity="center" />
+ </LinearLayout>
+ </ScrollView>
- <Space
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ android:paddingTop="24dp"
+ android:paddingBottom="24dp">
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <Button
- android:id="@+id/log_access_dialog_allow_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/log_access_confirmation_allow"
- style="?permissionGrantButtonTopStyle"
- android:textAppearance="@style/PermissionGrantButtonTextAppearance"
- android:layout_marginBottom="5dp"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:layout_alignParentBottom="true"
- android:clipToOutline="true"
- android:gravity="center" />
+ <Button
+ android:id="@+id/log_access_dialog_allow_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/log_access_confirmation_allow"
+ style="?permissionGrantButtonTopStyle"
+ android:textAppearance="@style/PermissionGrantButtonTextAppearance"
+ android:layout_marginBottom="5dp"
+ android:clipToOutline="true"
+ android:gravity="center" />
- <Button
- android:id="@+id/log_access_dialog_deny_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/log_access_confirmation_deny"
- style="?permissionGrantButtonBottomStyle"
- android:textAppearance="@style/PermissionGrantButtonTextAppearance"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:layout_alignParentBottom="true"
- android:clipToOutline="true"
- android:gravity="center" />
- </LinearLayout>
+ <Button
+ android:id="@+id/log_access_dialog_deny_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/log_access_confirmation_deny"
+ style="?permissionGrantButtonBottomStyle"
+ android:textAppearance="@style/PermissionGrantButtonTextAppearance"
+ android:clipToOutline="true"
+ android:gravity="center" />
</LinearLayout>
-</ScrollView>
+</LinearLayout> \ No newline at end of file