小编s.s*_*tko的帖子

Window.Callback被工具栏覆盖

我发现setActionBar从方法Activity

public void setActionBar(@Nullable Toolbar toolbar) {
    final ActionBar ab = getActionBar();
    if (ab instanceof WindowDecorActionBar) {
        throw new IllegalStateException("This Activity already has an action bar supplied " +
                "by the window decor. Do not request Window.FEATURE_ACTION_BAR and set " +
                "android:windowActionBar to false in your theme to use a Toolbar instead.");
    }

    // If we reach here then we're setting a new action bar
    // First clear out the MenuInflater to make sure that it …
Run Code Online (Sandbox Code Playgroud)

java android toolbar android-actionbar android-toolbar

7
推荐指数
0
解决办法
101
查看次数