From 9199155a7f5643e6a07a626973f892e05c7c5bd7 Mon Sep 17 00:00:00 2001 From: Svetoslav Ganov Date: Wed, 20 Jan 2016 18:06:28 -0800 Subject: Make the permission request dialog's layout robust The old implementation was relying on a fixed window size where the content is positioned by a custom layout manager. It is possible however that subsequent permissions requests do not fit in the window as its size is computed based on the content of the first permissions request. There were also cases where the content is chopped after a rotation as the dialog size width was not re-evaluated while it should be. Further, animation from one permission request state to another was not properly done resulting in content being chopped off in some cases. The current approach is to have a dialog width for the content activity but the height is as tall as the screen allowing us to fit arbitrary large permission request content. Also we are resetting the fixed width on a configuration change so the dialog is robust to adjust size as needed. bug:24679384 bug:25755378 Change-Id: I4d23f81d8e59ce23bf9a27155ebb5ec6e2e6752c (cherry picked from commit c6dc4bb52b07886346b02b326c5c32a8299ed73e) --- res/layout/grant_permissions.xml | 105 ++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 51 deletions(-) (limited to 'res/layout') diff --git a/res/layout/grant_permissions.xml b/res/layout/grant_permissions.xml index 463f0ccd..185bade5 100644 --- a/res/layout/grant_permissions.xml +++ b/res/layout/grant_permissions.xml @@ -17,71 +17,74 @@ + android:layout_height="fill_parent" + android:clipChildren="false"> + android:layout_height="wrap_content" + android:paddingTop="24dip" + android:paddingStart="22dip" + android:paddingEnd="16dip" + android:background="?android:attr/colorBackgroundFloating"> - - - - - - + + - - - - - - + + + + android:orientation="horizontal" + android:paddingStart="2dip" + android:paddingTop="16dip"> + + + + + + - + - + -- cgit v1.2.3