From c9f743a777cf5e5e91bad7810584be052db21eed Mon Sep 17 00:00:00 2001 From: Yuli Huang Date: Fri, 18 May 2012 16:12:32 +0800 Subject: [PATCH] Fix action-bar title for cropping wallpaper. bug:6513495 Change-Id: I97b76c948d5c9fa0bb11f2fe89a0d10f490dbe14 --- res/values/strings.xml | 2 ++ src/com/android/gallery3d/app/CropImage.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/res/values/strings.xml b/res/values/strings.xml index 1474004bd..f369df9b7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -91,6 +91,8 @@ Set picture as + + Set wallpaper Setting wallpaper\u2026 Wallpaper diff --git a/src/com/android/gallery3d/app/CropImage.java b/src/com/android/gallery3d/app/CropImage.java index 3935e8f44..835970b4f 100644 --- a/src/com/android/gallery3d/app/CropImage.java +++ b/src/com/android/gallery3d/app/CropImage.java @@ -165,6 +165,10 @@ public class CropImage extends AbstractGalleryActivity { ActionBar actionBar = getActionBar(); actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE); + Bundle extra = getIntent().getExtras(); + if (extra != null && extra.getBoolean(KEY_SET_AS_WALLPAPER, false)) { + actionBar.setTitle(R.string.set_wallpaper); + } mMainHandler = new SynchronizedHandler(getGLRoot()) { @Override -- 2.11.0