【发布时间】:2014-02-21 19:41:04
【问题描述】:
我想去掉上下文操作栏中的“勾号”。它可能是 mode.(some method) 中使用的方法;但我无法弄清楚是哪一个(如果有的话)。 minsdk=14
这里是sn-p:
private ActionMode.Callback mActionModeCallback = new ActionMode.Callback()
{
// Called when the action mode is created; startActionMode() was called
public boolean onCreateActionMode(ActionMode mode, Menu menu)
{
// inflate a menu resource providing context menu items
MenuInflater inflater = mode.getMenuInflater();
//TextView tv= (TextView)getLayoutInflater().inflate(R.layout.contextual_title, null);
//mode.setTitle("ActionMode title");
//mode.setCustomView(tv);
// assumes that you have "contexual.xml" menu resources
inflater.inflate(R.menu.contextual, menu);
return true;
}
}
contextual.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/toast"
android:title="Toast">
</item>
<item
android:id="@+id/toast"
android:title="NotToast">
</item>
</menu>
【问题讨论】:
-
认为这可以解决您的问题:stackoverflow.com/questions/14964939/…
-
我的错。正在整个 stackoverflow 中寻找“tick”。