我使用的是普通的动作条 Sherlock Action Bar
,但注意到,如果我选择按住该项目而不是单击它,则会出现一个黑框。我有两个问题:它的预期目的是什么?我该如何摆脱它?
XML 代码:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/refresh_button_actionbar"
android:icon="@drawable/refresh_circle"
android:showAsAction="always">
</item>
</menu>
onOptionsItemSelected:
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case R.id.refresh_button_actionbar:
this.refresh();
break;
default:
return false;
}
return true;
}