什么是模式选择选择模式? [英] What is the modal selection selection mode?

查看:264
本文介绍了什么是模式选择选择模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我设置的ListView 来多的选择模式,我遇到了这个常数的Andr​​oid API级别11介绍:<一href=\"http://developer.android.com/reference/android/widget/AbsListView.html#CHOICE_MODE_MULTIPLE_MODAL\">CHOICE_MODE_MULTIPLE_MODAL.的JavaDoc没有帮助我太大的:

When setting the selection mode of my ListView to multiple, I came across this constant introduced in Android API level 11: CHOICE_MODE_MULTIPLE_MODAL. The JavaDoc didn't help me out much:

公共静态最终诠释CHOICE_MODE_MULTIPLE_MODAL

public static final int CHOICE_MODE_MULTIPLE_MODAL

该列表允许多个选择在模式选择模式。

The list allows multiple choices in a modal selection mode.

什么是模式选择模式?找不到nowheres。

What is a modal selection mode? Can't find it nowheres.

推荐答案

这是用于通过动作条时,弹出一个操作模式(也叫做上下文操作栏)。你会看到它像Gmail应用:当你开始检查列表中的项目,从一般的活动级别的行动运算操作栏更改列表上执行(例如,更改标签,垃圾)

This is used to bring up an action mode (a.k.a., contextual action bar) when using action bars. You will see it in apps like Gmail: as you start checking items in the list, the action bar changes from generic activity-level actions to operations to be performed on the list (e.g., change labels, trash).

如同 CHOICE_MODE_MULTIPLE ,你需要你的的ListView 可勾选项目。那时,虽然,一旦一个或多个项目进行检查,Android将自动弹出您所选择的操作模式中,你可以用自己的行为配置。

Like CHOICE_MODE_MULTIPLE, you need your ListView to be populated by Checkable items. Then, though, once one or more items are checked, Android will automatically pop up your chosen action mode, which you can configure with your own actions.

下面是说明了这一点的示例项目:<一href=\"https://github.com/commonsguy/cw-omnibus/tree/master/ActionMode/ActionModeMC\">https://github.com/commonsguy/cw-omnibus/tree/master/ActionMode/ActionModeMC

Here is a sample project that demonstrates this: https://github.com/commonsguy/cw-omnibus/tree/master/ActionMode/ActionModeMC

这篇关于什么是模式选择选择模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆