我想自定义功能区菜单(https://github.com/jaredsburrows/RibbonMenu),当我点击菜单项时,原始菜单只显示ListView。我想在按键后打开新意图,而不仅仅是listview。我尝试过类似的东西,但这会打开一个没有功能区菜单的新意图。我的目的是在这个菜单中打开新的意图或活动 - 就像列表视图一样。你可以帮帮我吗?
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
switch (position)
{
case 0:
Intent i = new Intent(MainActivity.this, About.class);
MainActivity.this.startActivity(i);
//final String[] items = { "A", "B", "C", "D" };
//adapter = new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_list_item_1, items);
// list.setAdapter(adapter);
break;
case 1:
final String[] items1 = { "1", "2", "3", "4" };
adapter = new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_list_item_1, items1);
list.setAdapter(adapter);
break;
}
rbmView.hideMenu();
}