summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-09-27 13:52:01 -0700
committerDianne Hackborn <hackbod@google.com>2012-09-27 15:37:55 -0700
commit860959202df6e79636a68cc94ea94268fcbdc305 (patch)
tree8b7298e6345531d52fba04c0e89afe0e4d85bc03
parent6213650e4ffcb81a67ac9f75efc602a91246117d (diff)
downloadandroid_packages_apps_PackageInstaller-860959202df6e79636a68cc94ea94268fcbdc305.zip
android_packages_apps_PackageInstaller-860959202df6e79636a68cc94ea94268fcbdc305.tar.gz
android_packages_apps_PackageInstaller-860959202df6e79636a68cc94ea94268fcbdc305.tar.bz2
Fix issue #7240599 Permissions UI: left side padding on...
...Device Access and Privacy headings Change-Id: I9aca7d9fec60d4312ca13d8bce26fc7aebfe326c
-rw-r--r--res/layout/install_confirm.xml10
-rw-r--r--res/layout/permissions_list.xml14
-rwxr-xr-xres/values-large/styles.xml21
-rwxr-xr-xres/values/styles.xml2
-rw-r--r--src/com/android/packageinstaller/PackageInstallerActivity.java3
5 files changed, 44 insertions, 6 deletions
diff --git a/res/layout/install_confirm.xml b/res/layout/install_confirm.xml
index ed7f33b..9589e8a 100644
--- a/res/layout/install_confirm.xml
+++ b/res/layout/install_confirm.xml
@@ -34,7 +34,15 @@
android:text="@string/install_confirm_question"
android:textAppearance="?android:attr/textAppearanceMedium"
style="@style/padded"
- android:paddingTop="12dip" />
+ android:paddingTop="4dip" />
+
+ <ImageView
+ android:id="@+id/divider"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:background="?android:attr/dividerHorizontal"
+ android:visibility="gone" />
<TabHost
android:id="@android:id/tabhost"
diff --git a/res/layout/permissions_list.xml b/res/layout/permissions_list.xml
index 55eb81d..ee90699 100644
--- a/res/layout/permissions_list.xml
+++ b/res/layout/permissions_list.xml
@@ -28,19 +28,25 @@ This is the structure for the list of all permissions.
<LinearLayout android:id="@+id/privacylist"
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="4dp">
<TextView
style="?android:attr/listSeparatorTextViewStyle"
- android:layout_marginTop="8dip"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
android:text="@string/privacyPerms" />
</LinearLayout>
<LinearLayout android:id="@+id/devicelist"
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="4dp">
<TextView
style="?android:attr/listSeparatorTextViewStyle"
- android:layout_marginTop="8dip"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
android:text="@string/devicePerms" />
</LinearLayout>
</LinearLayout>
diff --git a/res/values-large/styles.xml b/res/values-large/styles.xml
new file mode 100755
index 0000000..c7b2ec4
--- /dev/null
+++ b/res/values-large/styles.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+ <style name="DialogWhenLarge"
+ parent="@android:style/Theme.DeviceDefault.Dialog.NoActionBar.MinWidth">
+ </style>
+</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f03a37e..5a5cb7e 100755
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -19,4 +19,6 @@
<item name="android:paddingLeft">16dip</item>
<item name="android:paddingRight">16dip</item>
</style>
+ <style name="DialogWhenLarge" parent="@android:style/Theme.DeviceDefault.NoActionBar">
+ </style>
</resources>
diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java
index d3b2a94..8771a3e 100644
--- a/src/com/android/packageinstaller/PackageInstallerActivity.java
+++ b/src/com/android/packageinstaller/PackageInstallerActivity.java
@@ -253,6 +253,7 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen
getText(R.string.newPerms)), mScrollView);
} else {
findViewById(R.id.tabscontainer).setVisibility(View.GONE);
+ findViewById(R.id.divider).setVisibility(View.VISIBLE);
}
if (NP > 0 || ND > 0) {
permVisible = true;
@@ -291,7 +292,7 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen
msg = R.string.install_confirm_question_no_perms;
}
}
- tabHost.setVisibility(View.INVISIBLE);
+ tabHost.setVisibility(View.GONE);
}
if (msg != 0) {
((TextView)findViewById(R.id.install_confirm_question)).setText(msg);