Building ActionMode with custom layout in ActionBarSherlock

前端 未结 1 1281
忘掉有多难
忘掉有多难 2021-01-18 02:27

I just starting using ActionBarSherlock for building some simple app, in my first screen I have simple list and I added new menu item for adding new item to the list:

<
相关标签:
1条回答
  • 2021-01-18 02:54

    You probably want to use the method in the ActionMode class called "setCustomView" .

    so something like this:

    newItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                actionMode = startActionMode(new MyAction(ListEditor.this));
                actionMode.setCustomView(customNav);
                return true;
            }
        });
    
    0 讨论(0)
提交回复
热议问题