summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI
diff options
context:
space:
mode:
authorStefan Wysocki <stefan.wysocki@sonymobile.com>2014-03-04 11:27:55 +0100
committerHenrik Baard <henrik.baard@sonymobile.com>2014-04-28 10:47:34 +0200
commit22d3990273a1cb5e61360ac42d1d4e6156d762ed (patch)
tree19b60fff7e67e449173fc3b40694f57dac443317 /packages/DocumentsUI
parentecdf9b199ac9659c37c34c0b23084199acea80bf (diff)
downloadframeworks_base-22d3990273a1cb5e61360ac42d1d4e6156d762ed.zip
frameworks_base-22d3990273a1cb5e61360ac42d1d4e6156d762ed.tar.gz
frameworks_base-22d3990273a1cb5e61360ac42d1d4e6156d762ed.tar.bz2
Set ActionMode title to the number of selected files
After change of orientation ActionMode is recreated without previously set title. It needs to be updated in onCreateActionMode callback. Change-Id: If5f36e8ad6d1b5cf04ed242611fd037969d73517
Diffstat (limited to 'packages/DocumentsUI')
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
index b2b2bd8..9069a55 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
@@ -436,6 +436,8 @@ public class DirectoryFragment extends Fragment {
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
mode.getMenuInflater().inflate(R.menu.mode_directory, menu);
+ mode.setTitle(getResources()
+ .getString(R.string.mode_selected_count, mCurrentView.getCheckedItemCount()));
return true;
}