Update contextual action bar title

This commit is contained in:
Jimmy Shih
2013-12-18 15:30:54 -08:00
parent da5df06298
commit a49a74fc6b
3 changed files with 2 additions and 29 deletions
-7
View File
@@ -1021,13 +1021,6 @@ limitations under the License.
Imported %1$s from %2$s.
</string>
<!-- List item -->
<string name="list_item_selected"
translation_description="Title indicating the number of items selected in a list.
%1$d an integer value. E.g., '2'.">
%1$d selected
</string>
<!-- Marker -->
<string name="marker_add_error"
translation_description="When adding a marker, the message indicating error due to no GPS
@@ -69,7 +69,6 @@ public class Api11Adapter extends Api10Adapter {
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
mode.getMenuInflater().inflate(R.menu.list_context_menu, menu);
setActionModeTitle(mode);
return true;
}
@@ -88,7 +87,6 @@ public class Api11Adapter extends Api10Adapter {
@Override
public void onItemCheckedStateChanged(
ActionMode mode, int position, long id, boolean checked) {
setActionModeTitle(mode);
mode.invalidate();
}
@@ -99,18 +97,8 @@ public class Api11Adapter extends Api10Adapter {
mode.finish();
}
return true;
}
/**
* Sets the action mode title
*
* @param mode action mode
*/
private void setActionModeTitle(ActionMode mode) {
int count = listView.getCheckedItemCount();
mode.setTitle(activity.getString(R.string.list_item_selected, count));
}
}
/**
* Gets the checked positions in a list view.
*