summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2010-03-16 14:22:03 -0500
committerJeff Hamilton <jham@android.com>2010-03-16 14:22:03 -0500
commitad120c5d4ce93e848f7391c966f6c014f8b0a544 (patch)
tree4dea624ac59d71493dfe0e7b92da713b208b919f
parentd388aa252071f9132957ebea13239750b65e79a8 (diff)
downloadandroid_packages_apps_PackageInstaller-ad120c5d4ce93e848f7391c966f6c014f8b0a544.zip
android_packages_apps_PackageInstaller-ad120c5d4ce93e848f7391c966f6c014f8b0a544.tar.gz
android_packages_apps_PackageInstaller-ad120c5d4ce93e848f7391c966f6c014f8b0a544.tar.bz2
Use the system standard ButtonBar style as well as the standard medium title bar assest.
Change-Id: I3735873e6f885cfbbd5e0f7731c47e2089941c92
-rw-r--r--AndroidManifest.xml12
-rw-r--r--res/drawable-hdpi/title_bar_medium.9.pngbin0 -> 245 bytes
-rw-r--r--res/drawable-mdpi/title_bar_medium.9.pngbin0 -> 222 bytes
-rwxr-xr-xres/layout/app_details.xml3
-rwxr-xr-xres/layout/install_confirm.xml37
-rwxr-xr-xres/layout/op_progress.xml37
-rwxr-xr-xres/layout/uninstall_confirm.xml37
-rwxr-xr-xres/layout/uninstall_progress.xml41
-rw-r--r--res/values/styles.xml21
9 files changed, 97 insertions, 91 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 217b95e..b78b3df 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -11,7 +11,8 @@
<uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" />
<application android:label="@string/app_name">
<activity android:name=".PackageInstallerActivity"
- android:configChanges="orientation|keyboardHidden">
+ android:configChanges="orientation|keyboardHidden"
+ android:theme="@style/TallTitleBarTheme">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
@@ -21,10 +22,12 @@
</intent-filter>
</activity>
<activity android:name=".InstallAppProgress"
- android:configChanges="orientation|keyboardHidden">
+ android:configChanges="orientation|keyboardHidden"
+ android:theme="@style/TallTitleBarTheme">
</activity>
<activity android:name=".UninstallerActivity"
- android:configChanges="orientation|keyboardHidden">
+ android:configChanges="orientation|keyboardHidden"
+ android:theme="@style/TallTitleBarTheme">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.DELETE" />
@@ -33,7 +36,8 @@
</intent-filter>
</activity>
<activity android:name=".UninstallAppProgress"
- android:configChanges="orientation|keyboardHidden">
+ android:configChanges="orientation|keyboardHidden"
+ android:theme="@style/TallTitleBarTheme">
</activity>
</application>
</manifest>
diff --git a/res/drawable-hdpi/title_bar_medium.9.png b/res/drawable-hdpi/title_bar_medium.9.png
new file mode 100644
index 0000000..311a54a
--- /dev/null
+++ b/res/drawable-hdpi/title_bar_medium.9.png
Binary files differ
diff --git a/res/drawable-mdpi/title_bar_medium.9.png b/res/drawable-mdpi/title_bar_medium.9.png
new file mode 100644
index 0000000..2d41d02
--- /dev/null
+++ b/res/drawable-mdpi/title_bar_medium.9.png
Binary files differ
diff --git a/res/layout/app_details.xml b/res/layout/app_details.xml
index 0b04792..82ecff3 100755
--- a/res/layout/app_details.xml
+++ b/res/layout/app_details.xml
@@ -24,7 +24,8 @@ installation screens
android:id="@+id/app_snippet"
android:layout_width="match_parent"
android:layout_height="65dip"
- android:background="@color/title_background">
+ android:background="@drawable/title_bar_medium"
+>
<ImageView android:id="@+id/app_icon"
android:paddingLeft="6dip"
android:layout_width="54dip"
diff --git a/res/layout/install_confirm.xml b/res/layout/install_confirm.xml
index 8039e5d..268a744 100755
--- a/res/layout/install_confirm.xml
+++ b/res/layout/install_confirm.xml
@@ -72,36 +72,23 @@
<!-- OK confirm and cancel buttons. -->
<LinearLayout
- android:background="@color/title_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:gravity="bottom"
- android:paddingTop="4dip"
- android:paddingLeft="2dip"
- android:paddingRight="2dip"
- android:orientation="horizontal">
- <Button
- android:id="@+id/ok_button"
+ android:orientation="horizontal"
+ style="@android:style/ButtonBar"
+ >
+ <Button android:id="@+id/ok_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
android:text="@string/install"
- android:layout_width="150dip"
- android:paddingLeft="6dip"
- android:layout_gravity="left"
- android:layout_weight="0.4"
- android:layout_height="wrap_content"/>
- <!-- Spacer -->
- <View
- android:id="@+id/buttons_spacer_left"
+ />
+
+ <Button android:id="@+id/cancel_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
- android:visibility="gone"
- android:layout_weight="0.2" />
- <Button
- android:id="@+id/cancel_button"
- android:layout_width="150dip"
- android:paddingRight="6dip"
- android:layout_gravity="right"
+ android:layout_weight="1"
android:text="@string/cancel"
- android:layout_weight="0.4"
- android:layout_height="wrap_content"/>
+ />
</LinearLayout>
</LinearLayout>
diff --git a/res/layout/op_progress.xml b/res/layout/op_progress.xml
index 03fcaf6..9fe2d0b 100755
--- a/res/layout/op_progress.xml
+++ b/res/layout/op_progress.xml
@@ -44,37 +44,28 @@
android:paddingRight="16dip"
android:layout_below="@id/center_text"
android:max="100" />
+
<!-- Launch and close buttons. -->
- <LinearLayout
- android:id="@+id/buttons_panel"
- android:background="@color/title_background"
+ <LinearLayout android:id="@+id/buttons_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
- android:orientation="horizontal">
- <Button
- android:id="@+id/launch_button"
+ android:orientation="horizontal"
+ style="@android:style/ButtonBar"
+ >
+ <Button android:id="@+id/launch_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
android:text="@string/launch"
- android:layout_width="150dip"
- android:paddingLeft="6dip"
- android:layout_gravity="left"
- android:layout_weight="0.4"
- android:layout_height="wrap_content"/>
- <!-- Spacer -->
- <View
- android:id="@+id/buttons_spacer_left"
+ />
+
+ <Button android:id="@+id/done_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
- android:visibility="gone"
- android:layout_weight="0.2" />
- <Button
- android:id="@+id/done_button"
- android:layout_width="150dip"
- android:paddingRight="6dip"
- android:layout_gravity="right"
+ android:layout_weight="1"
android:text="@string/done"
- android:layout_weight="0.4"
- android:layout_height="wrap_content"/>
+ />
</LinearLayout>
</RelativeLayout>
</ScrollView>
diff --git a/res/layout/uninstall_confirm.xml b/res/layout/uninstall_confirm.xml
index e84d04a..7c079d9 100755
--- a/res/layout/uninstall_confirm.xml
+++ b/res/layout/uninstall_confirm.xml
@@ -54,38 +54,27 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_below="@id/uninstall_question"
android:paddingLeft="16dip"/>
+
<!-- OK confirm and cancel buttons. -->
<LinearLayout
- android:background="@color/title_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
- android:paddingTop="4dip"
- android:paddingLeft="2dip"
- android:paddingRight="2dip"
- android:orientation="horizontal">
- <Button
- android:id="@+id/ok_button"
+ android:orientation="horizontal"
+ style="@android:style/ButtonBar"
+ >
+ <Button android:id="@+id/ok_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
android:text="@string/ok"
- android:layout_width="150dip"
- android:paddingLeft="6dip"
- android:layout_gravity="left"
- android:layout_weight="0.4"
- android:layout_height="wrap_content"/>
- <!-- Spacer -->
- <View
- android:id="@+id/buttons_spacer_left"
+ />
+
+ <Button android:id="@+id/cancel_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
- android:visibility="gone"
- android:layout_weight="0.2" />
- <Button
- android:id="@+id/cancel_button"
- android:layout_width="150dip"
- android:paddingRight="6dip"
- android:layout_gravity="right"
+ android:layout_weight="1"
android:text="@string/cancel"
- android:layout_weight="0.4"
- android:layout_height="wrap_content"/>
+ />
</LinearLayout>
</RelativeLayout>
diff --git a/res/layout/uninstall_progress.xml b/res/layout/uninstall_progress.xml
index cd75405..86204e3 100755
--- a/res/layout/uninstall_progress.xml
+++ b/res/layout/uninstall_progress.xml
@@ -41,22 +41,35 @@
android:paddingTop="24dip"
android:layout_below="@id/center_text"
android:max="100" />
- <RelativeLayout
- android:id="@+id/ok_panel"
+
+ <!-- Button bar with OK button -->
+ <LinearLayout android:id="@+id/ok_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/title_background"
- android:paddingTop="4dip"
- android:paddingLeft="2dip"
- android:paddingRight="2dip"
- android:layout_alignParentBottom="true">
- <Button
- android:id="@+id/ok_button"
- android:paddingRight="6dip"
- android:layout_alignParentRight="true"
+ android:layout_alignParentBottom="true"
+ android:orientation="horizontal"
+ style="@android:style/ButtonBar"
+ >
+ <!-- Left spacer -->
+ <View
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ />
+
+ <Button android:id="@+id/ok_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="2"
android:text="@string/ok"
- android:layout_width="150dip"
- android:layout_height="wrap_content"/>
- </RelativeLayout>
+ />
+
+ <!-- Right spacer -->
+ <View
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ />
+ </LinearLayout>
</RelativeLayout>
</ScrollView>
diff --git a/res/values/styles.xml b/res/values/styles.xml
new file mode 100644
index 0000000..627ab4b
--- /dev/null
+++ b/res/values/styles.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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="TallTitleBarTheme" parent="android:Theme.NoTitleBar">
+ <item name="android:windowContentOverlay">@null</item>
+ </style>
+</resources>