summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2009-09-01 14:35:25 -0700
committerSuchi Amalapurapu <asuchitra@google.com>2009-09-08 14:53:10 -0700
commitd9b773b7041894e37c1b6f62d6b221dd3c8e4c43 (patch)
treec82c8491f9f1435c0125a1958b474608acabeef2 /res/layout
parent0d2388f6983b79a8e46e1d2aee2f1ccefbe900ab (diff)
downloadandroid_packages_apps_PackageInstaller-d9b773b7041894e37c1b6f62d6b221dd3c8e4c43.tar.gz
android_packages_apps_PackageInstaller-d9b773b7041894e37c1b6f62d6b221dd3c8e4c43.tar.bz2
android_packages_apps_PackageInstaller-d9b773b7041894e37c1b6f62d6b221dd3c8e4c43.zip
Fix screen flow issues in pacakge installer/uninstaller.
The main activity was managing the state transitions during installation/uninstallation which was actually not needed. Just make the activities independent and start sub activities without waiting for activity result codes in the main activity. If the user enables development setting to immediately destroy activities, and sideloads an app, the ActivityManager tries to destroy the main activity while it starts sub activities to finish installation and this results in UI bizarreness based on the current state of the installer. Also move InstallConfirmation to the main activity. Converge InstallDone and InstallProgress into one screen. Just enable or disable launch/close buttons. This is how it should have been in the first place.. Same set of issues with uninstall code path as well.
Diffstat (limited to 'res/layout')
-rwxr-xr-xres/layout/install_confirm.xml6
-rwxr-xr-xres/layout/install_done.xml71
-rwxr-xr-xres/layout/install_start.xml8
-rwxr-xr-xres/layout/op_progress.xml86
4 files changed, 69 insertions, 102 deletions
diff --git a/res/layout/install_confirm.xml b/res/layout/install_confirm.xml
index bfda97dc..524a468f 100755
--- a/res/layout/install_confirm.xml
+++ b/res/layout/install_confirm.xml
@@ -25,11 +25,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_height="wrap_content">
- <include
- layout="@layout/app_details"
- android:id="@+id/app_snippet"/>
<TextView
android:id="@+id/install_confirm_question"
android:layout_width="wrap_content"
@@ -55,6 +52,7 @@
android:orientation="vertical">
<TextView
android:id="@+id/security_settings_desc"
+ android:text="@string/security_settings_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
diff --git a/res/layout/install_done.xml b/res/layout/install_done.xml
deleted file mode 100755
index e33f57b7..00000000
--- a/res/layout/install_done.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 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.
--->
-
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <include
- layout="@layout/app_details"
- android:gravity="top"
- android:id="@+id/app_snippet" />
- <TextView
- android:id="@+id/center_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="20dip"
- android:paddingTop="36dip"
- android:drawablePadding="6dip"
- android:layout_below="@id/app_snippet"
- android:textColor="?android:attr/textColorSecondary"
- android:textAppearance="?android:attr/textAppearanceMedium"/>
-
- <!-- Launch and close buttons. -->
- <LinearLayout
- android:background="@color/title_background"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:orientation="horizontal">
- <Button
- android:id="@+id/launch_button"
- 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"
- 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:text="@string/done"
- android:layout_weight="0.4"
- android:layout_height="wrap_content"/>
- </LinearLayout>
-
-</RelativeLayout>
-
-
diff --git a/res/layout/install_start.xml b/res/layout/install_start.xml
index 1ef0ab5d..d95daa64 100755
--- a/res/layout/install_start.xml
+++ b/res/layout/install_start.xml
@@ -14,14 +14,18 @@
limitations under the License.
-->
-<RelativeLayout
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include
layout="@layout/app_details"
android:id="@+id/app_snippet"/>
-</RelativeLayout>
+ <include
+ layout="@layout/install_confirm"
+ android:id="@+id/install_confirm_panel"/>
+</LinearLayout>
diff --git a/res/layout/op_progress.xml b/res/layout/op_progress.xml
index b957fdf7..aaab8686 100755
--- a/res/layout/op_progress.xml
+++ b/res/layout/op_progress.xml
@@ -14,33 +14,69 @@
limitations under the License.
-->
-<LinearLayout
+<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <include
- layout="@layout/app_details"
- android:id="@+id/app_snippet"/>
- <ProgressBar
- android:id="@+id/progress_bar"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:paddingTop="24dip"
- android:paddingLeft="24dip"
- android:paddingRight="24dip"
- android:max="100" />
- <TextView
- android:id="@+id/center_text"
+ android:layout_height="fill_parent"
+ android:fillViewport="true">
+ <RelativeLayout
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="24dip"
- android:paddingTop="16dip"
- android:text="@string/installing"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"/>
-</LinearLayout>
+ android:layout_height="fill_parent">
+ <include
+ layout="@layout/app_details"
+ android:id="@+id/app_snippet"/>
+ <TextView
+ android:id="@+id/center_text"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_centerVertical="true"
+ android:text="@string/installing"
+ android:paddingLeft="16dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"/>
+ <ProgressBar
+ android:id="@+id/progress_bar"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="24dip"
+ android:paddingLeft="16dip"
+ 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"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:orientation="horizontal">
+ <Button
+ android:id="@+id/launch_button"
+ 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"
+ 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:text="@string/done"
+ android:layout_weight="0.4"
+ android:layout_height="wrap_content"/>
+ </LinearLayout>
+ </RelativeLayout>
+</ScrollView>