summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2011-08-05 14:52:17 -0700
committerJeff Sharkey <jsharkey@android.com>2011-08-09 11:21:04 -0700
commitc18b41eef6da088ed968f2efeda55efcc62d80f5 (patch)
tree86f48cfcf0911e34624465435a083aab2293989c /res
parent936c5296ac670867370d8fa5f3b7863198da9852 (diff)
downloadandroid_packages_providers_DownloadProvider-c18b41eef6da088ed968f2efeda55efcc62d80f5.tar.gz
android_packages_providers_DownloadProvider-c18b41eef6da088ed968f2efeda55efcc62d80f5.tar.bz2
android_packages_providers_DownloadProvider-c18b41eef6da088ed968f2efeda55efcc62d80f5.zip
Move to Notification.Builder progress API.
Instead of using custom layout to surface progress information, use new Builder API. Also use resources to build percent string. Bug: 4022082 Change-Id: I556a666771e9103ce5d7ddb60faa879b8777b284
Diffstat (limited to 'res')
-rw-r--r--res/layout/status_bar_ongoing_event_progress_bar.xml114
-rw-r--r--res/values/strings.xml2
2 files changed, 2 insertions, 114 deletions
diff --git a/res/layout/status_bar_ongoing_event_progress_bar.xml b/res/layout/status_bar_ongoing_event_progress_bar.xml
deleted file mode 100644
index 5b19a928..00000000
--- a/res/layout/status_bar_ongoing_event_progress_bar.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 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.
-*/
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:background="@android:drawable/status_bar_item_app_background"
- >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- >
-
- <LinearLayout
- android:layout_width="40dp"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingTop="8dp"
- android:focusable="true"
- >
- <ImageView
- android:id="@+id/appIcon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:src="@android:drawable/sym_def_app_icon"
- android:paddingLeft="15dp"
- />
- <TextView android:id="@+id/progress_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@android:style/TextAppearance.StatusBar.EventContent"
- android:singleLine="true"
- android:layout_gravity="center_horizontal"
- />
- </LinearLayout>
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:focusable="true"
- >
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:focusable="true"
- android:layout_alignParentTop="true"
- android:paddingTop="10dp"
- >
- <TextView android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@android:style/TextAppearance.StatusBar.EventContent.Title"
- android:singleLine="true"
- android:paddingLeft="20dp"
- />
- <TextView android:id="@+id/description"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@android:style/TextAppearance.StatusBar.EventContent"
- android:singleLine="true"
- android:paddingLeft="20dp"
- />
- </LinearLayout>
- <!-- Only one of progress_bar and paused_text will be visible. -->
- <ProgressBar android:id="@+id/progress_bar"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:paddingBottom="8dp"
- android:paddingRight="25dp"
- />
- <TextView android:id="@+id/paused_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:paddingBottom="8dp"
- android:singleLine="true"
- style="@android:style/TextAppearance.StatusBar.EventContent"
- android:paddingLeft="5dp"
- />
- </RelativeLayout>
- </LinearLayout>
-
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:src="@android:drawable/divider_horizontal_bright"
- />
-
-</LinearLayout>
-
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 270a54ce..24a3f34c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -207,5 +207,7 @@
[CHAR LIMIT=25] -->
<string name="button_start_now">Start now</string>
+ <!-- Short representation of download progress percentage. [CHAR LIMIT=8] -->
+ <string name="download_percent"><xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g></string>
</resources>