Java Code Examples for androidx.appcompat.app.actionbar#isShowing()

The following examples show how to use androidx.appcompat.app.actionbar#isShowing() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseFragment.java    From arcusandroid with Apache License 2.0 5 votes vote down vote up
protected boolean isActionBarVisible() {
    Activity activity = getActivity();
    if (activity == null || !(activity instanceof BaseActivity)) {
        return false;
    }

    ActionBar actionBar = ((BaseActivity) activity).getSupportActionBar();
    if (actionBar != null) {
        return actionBar.isShowing();
    }

    return false;
}
 
Example 2
Source File: ArcusFloatingFragment.java    From arcusandroid with Apache License 2.0 5 votes vote down vote up
private boolean isFullScreen() {
    Activity activity = getActivity();
    if (activity == null || !(activity instanceof BaseActivity)) {
        return true;
    }

    ActionBar actionBar = ((BaseActivity)activity).getSupportActionBar();
    if (actionBar != null) {
        return !actionBar.isShowing();
    }
    return true;
}
 
Example 3
Source File: FullScreenImageActivity.java    From Applozic-Android-SDK with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void toggleActionBar() {

        ActionBar actionBar = getSupportActionBar();

        if (actionBar != null) {
            if (actionBar.isShowing()) {
                actionBar.hide();
                hideUi();
            } else {
                showUi();
                actionBar.show();
            }
        }
    }