summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2016-04-06 16:12:01 -0700
committerPhilip P. Moltmann <moltmann@google.com>2016-04-07 17:28:16 -0700
commitdb783edf34ff3d228b9a5d5b14b0bf1e966ebd34 (patch)
tree9321114b48e9c2ca3563a1db54a35e24b4c47ae7 /res/layout
parent0a25ee021bd0a68c59c0d4b5e2352c4cb2fdea83 (diff)
downloadandroid_packages_apps_PackageInstaller-db783edf34ff3d228b9a5d5b14b0bf1e966ebd34.tar.gz
android_packages_apps_PackageInstaller-db783edf34ff3d228b9a5d5b14b0bf1e966ebd34.tar.bz2
android_packages_apps_PackageInstaller-db783edf34ff3d228b9a5d5b14b0bf1e966ebd34.zip
Make side-load install path material design-y
Bug: 26932948 Change-Id: Ic8bcec523fc6cd0db847a4575724fbe465e65c5d
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/app_details.xml63
-rw-r--r--res/layout/install_confirm.xml149
-rw-r--r--res/layout/install_start.xml155
-rw-r--r--res/layout/label.xml8
-rw-r--r--res/layout/op_progress.xml150
-rw-r--r--res/layout/uninstall_confirm.xml14
-rw-r--r--res/layout/uninstall_progress.xml17
7 files changed, 272 insertions, 284 deletions
diff --git a/res/layout/app_details.xml b/res/layout/app_details.xml
index 8f7d2cff..aa6dd5ab 100644
--- a/res/layout/app_details.xml
+++ b/res/layout/app_details.xml
@@ -18,49 +18,28 @@
Defines the layout of the application snippet that appears on top of the
installation screens
-->
-<!-- The snippet about the application - title, icon, description. -->
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/app_snippet"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="16dip"
- android:paddingEnd="16dip"
- android:paddingTop="24dip"
- >
+<!-- The snippet about the application - title, icon -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/app_snippet"
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/actionBarSize"
+ android:padding="16dp"
+ android:orientation="horizontal">
+
<ImageView android:id="@+id/app_icon"
- android:layout_width="32dip"
- android:layout_height="32dip"
- android:layout_marginStart="8dip"
- android:background="@android:color/transparent"
- android:layout_alignParentStart="true"
- android:gravity="start"
- android:scaleType="centerCrop"/>
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:scaleType="fitCenter" />
+
<TextView android:id="@+id/app_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="?android:attr/textColorPrimary"
- android:layout_toEndOf="@id/app_icon"
- android:singleLine="true"
- android:layout_centerInParent="true"
- android:paddingEnd="16dip"
- android:paddingTop="3dip"
- android:paddingStart="16dip"
- android:ellipsize="end"/>
- <FrameLayout
- android:id="@+id/top_divider"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="4dip"
- android:layout_below="@id/app_name">
- <ProgressBar
- android:id="@+id/progress_bar"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
- </FrameLayout>
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="32dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/titleTextStyle"
+ android:singleLine="true"
+ android:ellipsize="end" />
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/layout/install_confirm.xml b/res/layout/install_confirm.xml
deleted file mode 100644
index cb2aee84..00000000
--- a/res/layout/install_confirm.xml
+++ /dev/null
@@ -1,149 +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.
--->
-
-<!--
-
- Defines the layout of the splash screen that displays the security
- settings required for an application and requests the confirmation of the
- user before it is installed.
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <TextView
- android:id="@+id/install_confirm_question"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingStart="16dip"
- android:paddingEnd="16dip"
- android:text="@string/install_confirm_question"
- android:textAppearance="?android:attr/textAppearanceMedium"
- 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" />
-
- <FrameLayout
- android:id="@+id/filler"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:visibility="gone">
- </FrameLayout>
-
- <TabHost
- android:id="@android:id/tabhost"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1">
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <HorizontalScrollView android:id="@+id/tabscontainer"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/tab_unselected_holo"
- android:fillViewport="true"
- android:scrollbars="none">
- <FrameLayout android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <TabWidget
- android:id="@android:id/tabs"
- android:orientation="horizontal"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center" />
- </FrameLayout>
- </HorizontalScrollView>
-
- <FrameLayout
- android:id="@android:id/tabcontent"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="0"/>
-
- <android.support.v4.view.ViewPager
- android:id="@+id/pager"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"/>
-
- </LinearLayout>
- </TabHost>
-
- <!-- OK confirm and cancel buttons. -->
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:divider="?android:attr/dividerHorizontal"
- android:showDividers="beginning">
-
- <LinearLayout
- style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:measureWithLargestChild="true">
-
- <LinearLayout android:id="@+id/leftSpacer"
- android:layout_weight="0.25"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:visibility="gone" />
-
- <Button android:id="@+id/cancel_button"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_gravity="start"
- android:layout_weight="1"
- android:text="@string/cancel"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- <Button android:id="@+id/ok_button"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:layout_weight="1"
- android:text="@string/next"
- android:maxLines="2"
- android:filterTouchesWhenObscured="true"
- style="?android:attr/buttonBarButtonStyle" />
-
- <LinearLayout android:id="@+id/rightSpacer"
- android:layout_width="0dip"
- android:layout_weight="0.25"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:visibility="gone" />
-
- </LinearLayout>
- </LinearLayout>
-</LinearLayout>
diff --git a/res/layout/install_start.xml b/res/layout/install_start.xml
index 9acf1992..f8d839ff 100644
--- a/res/layout/install_start.xml
+++ b/res/layout/install_start.xml
@@ -14,24 +14,147 @@
limitations under the License.
-->
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+<!--
+ Defines the layout of the splash screen that displays the security
+ settings required for an application and requests the confirmation of the
+ user before it is installed.
+-->
- <include
- layout="@layout/app_details"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/app_snippet"/>
+ android:layout_height="match_parent"
+ android:orientation="vertical">
- <include
- layout="@layout/install_confirm"
- android:id="@+id/install_confirm_panel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/app_snippet"
- android:layout_alignParentBottom="true"/>
-</RelativeLayout>
+ <!-- title bar -->
+ <LinearLayout android:id="@+id/app_snippet"
+ android:background="?android:attr/colorPrimary"
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/actionBarSize"
+ android:orientation="horizontal">
+
+ <ImageView android:id="@+id/app_icon"
+ android:layout_marginLeft="16dp"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:scaleType="fitCenter" />
+
+ <TextView android:id="@+id/app_name"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="32dp"
+ android:layout_marginRight="16dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/titleTextStyle"
+ android:singleLine="true"
+ android:ellipsize="end" />
+
+ </LinearLayout>
+
+ <!-- content -->
+ <LinearLayout android:id="@+id/install_confirm_panel"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <TextView android:id="@+id/install_confirm_question"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:attr/colorPrimary"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/install_confirm_question"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp" />
+
+ <View android:id="@+id/spacer"
+ android:layout_width="match_parent"
+ android:layout_height="16dp"
+ android:visibility="gone"
+ android:background="?android:attr/colorPrimary" />
+
+ <TabHost android:id="@android:id/tabhost"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1">
+
+ <LinearLayout android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <HorizontalScrollView android:id="@+id/tabscontainer"
+ android:background="?android:attr/colorPrimary"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:fillViewport="true"
+ android:scrollbars="none">
+
+ <FrameLayout android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <TabWidget android:id="@android:id/tabs"
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center" />
+
+ </FrameLayout>
+
+ </HorizontalScrollView>
+
+ <!-- divider underneath tabs -->
+ <View android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginTop="-1dp"
+ android:background="#1F000000" />
+
+ <FrameLayout android:id="@android:id/tabcontent"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="0" />
+
+ <android.support.v4.view.ViewPager android:id="@+id/pager"
+ android:background="?android:attr/windowBackground"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+
+ </LinearLayout>
+
+ </TabHost>
+
+ <!-- Bottom buttons -->
+ <LinearLayout style="?android:attr/buttonBarStyle"
+ android:background="?android:attr/windowBackground"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="8dp"
+ android:measureWithLargestChild="true">
+
+ <!-- spacer to push buttons to the right -->
+ <View android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+
+ <Button android:id="@+id/cancel_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/cancel"
+ android:maxLines="2"
+ style="?android:attr/buttonBarButtonStyle" />
+
+ <Button android:id="@+id/ok_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/next"
+ android:maxLines="2"
+ android:filterTouchesWhenObscured="true"
+ style="?android:attr/buttonBarButtonStyle" />
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/res/layout/label.xml b/res/layout/label.xml
index 8d176fb5..e1a51434 100644
--- a/res/layout/label.xml
+++ b/res/layout/label.xml
@@ -14,7 +14,9 @@
limitations under the License.
-->
-<TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center" />
+ android:gravity="center"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:padding="16dp"/>
diff --git a/res/layout/op_progress.xml b/res/layout/op_progress.xml
index 1c2cef53..e2125622 100644
--- a/res/layout/op_progress.xml
+++ b/res/layout/op_progress.xml
@@ -14,99 +14,103 @@
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
- <!-- Launch and close buttons. -->
- <LinearLayout android:id="@+id/buttons_panel"
+
+ <include layout="@layout/app_details"
+ android:id="@+id/app_snippet" />
+
+ <LinearLayout android:id="@+id/center_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
+ android:layout_weight="1"
+ android:gravity="center"
android:orientation="vertical"
- android:divider="?android:attr/dividerHorizontal"
- android:showDividers="beginning"
- android:paddingTop="16dip">
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip">
- <LinearLayout
- style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
+ <ImageView android:id="@+id/center_icon"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:measureWithLargestChild="true">
+ android:layout_marginBottom="12dp"
+ android:src="@drawable/ic_android_92"
+ android:contentDescription="@null" />
- <LinearLayout android:id="@+id/leftSpacer"
- android:layout_weight="0.25"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:visibility="gone" />
+ <ProgressBar android:id="@+id/progress_bar"
+ android:layout_width="250dp"
+ android:layout_height="wrap_content"
+ android:indeterminate="true"
+ style="?android:attr/progressBarStyleHorizontal">
+ </ProgressBar>
- <Button android:id="@+id/done_button"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_gravity="start"
- android:layout_weight="1"
- android:text="@string/done"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- <Button android:id="@+id/launch_button"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_gravity="end"
- android:layout_weight="1"
- android:text="@string/launch"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle" />
-
- <LinearLayout android:id="@+id/rightSpacer"
- android:layout_width="0dip"
- android:layout_weight="0.25"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:visibility="gone" />
+ <TextView android:id="@+id/center_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:text="@string/installing"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
- </LinearLayout>
</LinearLayout>
- <include
- layout="@layout/app_details"
- android:id="@+id/app_snippet"
+ <!-- This explanation text is shown only after the progress bar below goes away. -->
+ <ScrollView android:id="@+id/explanation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true" />
+ android:layout_weight="1"
+ android:visibility="gone"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip">
- <TextView
- android:id="@+id/center_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/app_snippet"
- android:gravity="start"
- android:text="@string/installing"
- android:paddingTop="16dip"
- android:paddingStart="32dip"
- android:paddingEnd="32dip"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
- <!-- This explanation text is shown only after the progress bar below goes away. -->
- <ScrollView
+ <TextView android:id="@+id/explanation_status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <TextView android:id="@+id/explanation"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+ </LinearLayout>
+
+ </ScrollView>
+
+ <LinearLayout android:id="@+id/buttons_panel"
+ style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_above="@id/buttons_panel"
- android:layout_below="@id/center_text"
- android:paddingTop="8dip"
- android:paddingStart="16dip"
- android:paddingBottom="16dip">
- <TextView
- android:id="@+id/center_explanation"
- android:layout_width="match_parent"
+ android:orientation="horizontal"
+ android:measureWithLargestChild="true"
+ android:padding="8dip">
+
+ <!-- spacer to push buttons to the right -->
+ <View android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+
+ <Button android:id="@+id/done_button"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:visibility="gone"
- android:textAppearance="?android:attr/textAppearanceSmall"/>
- </ScrollView>
+ android:text="@string/done"
+ android:maxLines="2"
+ style="?android:attr/buttonBarButtonStyle" />
+
+ <Button android:id="@+id/launch_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/launch"
+ android:maxLines="2"
+ style="?android:attr/buttonBarButtonStyle" />
+
+ </LinearLayout>
-</RelativeLayout>
+</LinearLayout>
diff --git a/res/layout/uninstall_confirm.xml b/res/layout/uninstall_confirm.xml
index 78270f60..4c817716 100644
--- a/res/layout/uninstall_confirm.xml
+++ b/res/layout/uninstall_confirm.xml
@@ -51,6 +51,20 @@
layout="@layout/app_details"
android:id="@+id/uninstall_activity_snippet" />
+ <FrameLayout
+ android:id="@+id/top_divider"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="4dip"
+ android:paddingStart="16dip"
+ android:paddingEnd="16dip" >
+ <ProgressBar
+ android:id="@+id/progress_bar"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+ </FrameLayout>
+
<!-- uninstall application confirmation text -->
<TextView
android:id="@+id/uninstall_confirm"
diff --git a/res/layout/uninstall_progress.xml b/res/layout/uninstall_progress.xml
index 1d63841f..7f73c0f0 100644
--- a/res/layout/uninstall_progress.xml
+++ b/res/layout/uninstall_progress.xml
@@ -69,12 +69,27 @@
android:layout_width="match_parent"
android:layout_alignParentTop="true" />
+ <FrameLayout
+ android:id="@+id/top_divider"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="4dip"
+ android:paddingStart="16dip"
+ android:paddingEnd="16dip"
+ android:layout_below="@id/app_snippet">
+ <ProgressBar
+ android:id="@+id/progress_bar"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+ </FrameLayout>
+
<LinearLayout
android:id="@+id/uninstall_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ok_panel"
- android:layout_below="@id/app_snippet"
+ android:layout_below="@id/top_divider"
android:orientation="vertical">
<ScrollView