summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorChao Zhang <chaoz@codeaurora.org>2016-04-11 19:32:14 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-04-14 22:47:22 -0700
commit2a5e936116cd6adcc4a461091e101b3704d4e6c0 (patch)
tree642dc37c2ea377af3057fc034e8e08f2cb267fc1 /res
parent0e760ee5222ade8f3d0aaa4321d707fb76b90552 (diff)
downloadandroid_packages_apps_Gallery2-2a5e936116cd6adcc4a461091e101b3704d4e6c0.tar.gz
android_packages_apps_Gallery2-2a5e936116cd6adcc4a461091e101b3704d4e6c0.tar.bz2
android_packages_apps_Gallery2-2a5e936116cd6adcc4a461091e101b3704d4e6c0.zip
Gallery2: fix photo widget has not sync after delete the photo.
Use a ContentObserver to observe uri's change. If uri is deleted, show a empty view in widght. Change-Id: I11f0632ed96958a74b6aa2cdd9c2f1d88c99e94e CRs-Fixed: 981663
Diffstat (limited to 'res')
-rwxr-xr-xres/layout/photo_frame.xml22
1 files changed, 22 insertions, 0 deletions
diff --git a/res/layout/photo_frame.xml b/res/layout/photo_frame.xml
index 63faf539d..ede942f6b 100755
--- a/res/layout/photo_frame.xml
+++ b/res/layout/photo_frame.xml
@@ -21,6 +21,28 @@
android:paddingBottom="23dp"
android:paddingStart="12dp"
android:paddingEnd="12dp">
+
+ <RelativeLayout
+ android:id="@+id/appwidget_empty_photo"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone">
+
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:background="@drawable/appwidget_photo_border">
+
+ <TextView
+ android:id="@id/appwidget_photo_item"
+ android:layout_width="@dimen/stack_photo_width"
+ android:layout_height="@dimen/stack_photo_height"
+ android:gravity="center"
+ android:text="@string/appwidget_empty_text"
+ android:textColor="@android:color/black" />
+ </FrameLayout>
+ </RelativeLayout>
<ImageView android:id="@+id/photo"
android:layout_gravity="center"
android:layout_width="wrap_content"