旧build.gralde
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:design:22.2.0'
当我将appcompat更新为latset版本[23.3.0]时:
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
mToolbar.setMenu(mb, new ActionMenuPresenter(getActivity()));
ActionMenuPresenter
无法解决。
我找到了ActionMenuPresenter
class ActionMenuPresenter extends BaseMenuPresenter
implements ActionProvider.SubUiVisibilityListener {
private static final String TAG = "ActionMenuPresenter";
private OverflowMenuButton mOverflowButton;
private Drawable mPendingOverflowIcon;
}
套餐为default
而非public
。
请帮帮我!!如何解决错误。
EDIT:
我找到了解决这个问题的解决方案:
mToolbar.setOnMenuItemClickListener(
new Toolbar.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
return onToolBarOptionsItemSelected(item,
mToolbar.getMenu());
}
});