summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2014-12-14 09:21:04 -0800
committerSteve Kondik <steve@cyngn.com>2015-03-28 14:56:24 -0700
commit2deb6f518822055f4b60bbe8afabc938a9023cc9 (patch)
tree8ec36653f503923f613c701ff3d5d49088dbc5ac /src
parentfe66d39d4c7a4e8c0c3e623c54fd0daffe6cc093 (diff)
downloadandroid_packages_apps_Gallery2-2deb6f518822055f4b60bbe8afabc938a9023cc9.zip
android_packages_apps_Gallery2-2deb6f518822055f4b60bbe8afabc938a9023cc9.tar.gz
android_packages_apps_Gallery2-2deb6f518822055f4b60bbe8afabc938a9023cc9.tar.bz2
Gallery2: Materialization
- Material theme - FAB - New Icon - Add missing resources for movie settings - Fix action mode - Vector drawables Change-Id: I9c8cc81759502a417a5585fd1d3fd9b61e0bd68b
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/GalleryActionBar.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/GalleryActionBar.java b/src/com/android/gallery3d/app/GalleryActionBar.java
index 588f584..11057fb 100644
--- a/src/com/android/gallery3d/app/GalleryActionBar.java
+++ b/src/com/android/gallery3d/app/GalleryActionBar.java
@@ -47,6 +47,7 @@ public class GalleryActionBar implements OnNavigationListener {
private ClusterRunner mClusterRunner;
private CharSequence[] mTitles;
+ private CharSequence mTitle;
private ArrayList<Integer> mActions;
private Context mContext;
private LayoutInflater mInflater;
@@ -159,7 +160,8 @@ public class GalleryActionBar implements OnNavigationListener {
parent, false);
}
TwoLineListItem view = (TwoLineListItem) convertView;
- view.getText1().setText(mActionBar.getTitle());
+ CharSequence title = mActionBar.getTitle();
+ view.getText1().setText(title == null ? mTitle : title);
view.getText2().setText((CharSequence) getItem(position));
return convertView;
}
@@ -326,12 +328,14 @@ public class GalleryActionBar implements OnNavigationListener {
}
public void setTitle(String title) {
+ mTitle = title;
if (mActionBar != null) mActionBar.setTitle(title);
}
public void setTitle(int titleId) {
if (mActionBar != null) {
- mActionBar.setTitle(mContext.getString(titleId));
+ mTitle = mContext.getString(titleId);
+ mActionBar.setTitle(mTitle);
}
}