summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-06-30 14:15:31 -0700
committerSunny Goyal <sunnygoyal@google.com>2014-07-21 10:34:21 -0700
commit651077bdd603bb182be039925fd17bdf0da15016 (patch)
treea8707757fd1c77ecf0de554dab61090a72e7cbb8 /res
parent82cc3fe6c77322d93ff74b25354e4bca77ab4a83 (diff)
downloadandroid_packages_apps_Trebuchet-651077bdd603bb182be039925fd17bdf0da15016.tar.gz
android_packages_apps_Trebuchet-651077bdd603bb182be039925fd17bdf0da15016.tar.bz2
android_packages_apps_Trebuchet-651077bdd603bb182be039925fd17bdf0da15016.zip
Adding app widget restore support in Launcher3 for android L
When the app is restored, it displays placeholders for all pending widgets. These placeholders can be moved and removed similar to a widget (size is fixed to what defined in backup). Once the system notifies the launcher of the new widget ids, the place holders are replaced with actual widgets. issue: 10779035 Change-Id: I68cbe4da01e9ca2978cb4471a7c645d2aa592055
Diffstat (limited to 'res')
-rw-r--r--res/drawable/bg_appwidget_not_ready.xml24
-rw-r--r--res/layout/appwidget_not_ready.xml28
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/strings.xml3
4 files changed, 56 insertions, 0 deletions
diff --git a/res/drawable/bg_appwidget_not_ready.xml b/res/drawable/bg_appwidget_not_ready.xml
new file mode 100644
index 000000000..a8b56c2f8
--- /dev/null
+++ b/res/drawable/bg_appwidget_not_ready.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle" >
+
+ <corners android:radius="5dp" />
+
+ <solid android:color="@android:color/white" />
+
+</shape> \ No newline at end of file
diff --git a/res/layout/appwidget_not_ready.xml b/res/layout/appwidget_not_ready.xml
new file mode 100644
index 000000000..f5f2aab21
--- /dev/null
+++ b/res/layout/appwidget_not_ready.xml
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip"
+ android:layout_margin="10dip"
+ android:gravity="center"
+ android:background="@drawable/bg_appwidget_not_ready"
+ android:textAppearance="?android:attr/textAppearanceMediumInverse"
+ android:textColor="@color/appwidget_not_ready_color"
+ android:text="@string/gadget_pending_text"
+ />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index d1d33a0f6..27a5b61ee 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -26,6 +26,7 @@
<color name="bubble_dark_background">#20000000</color>
<color name="appwidget_error_color">#FCCC</color>
+ <color name="appwidget_not_ready_color">#F48F</color>
<color name="workspace_all_apps_and_delete_zone_text_color">#CCFFFFFF</color>
<color name="workspace_all_apps_and_delete_zone_text_shadow_color">#A0000000</color>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7c5ee9c86..1ee1be6fd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -190,6 +190,9 @@ s -->
<!-- Text to show user in place of a gadget when we can't display it properly -->
<string name="gadget_error_text">Problem loading widget</string>
+ <!-- Text to show user in place of a gadget when it is not yet ready/initialized. -->
+ <string name="gadget_pending_text" translatable="false">Widget not ready</string>
+
<!-- Text to inform the user that they can't uninstall a system application -->
<string name="uninstall_system_app_text">This is a system app and can\'t be uninstalled.</string>