Example usage for android.support.v4.view WindowCompat FEATURE_ACTION_MODE_OVERLAY

List of usage examples for android.support.v4.view WindowCompat FEATURE_ACTION_MODE_OVERLAY

Introduction

In this page you can find the example usage for android.support.v4.view WindowCompat FEATURE_ACTION_MODE_OVERLAY.

Prototype

int FEATURE_ACTION_MODE_OVERLAY

To view the source code for android.support.v4.view WindowCompat FEATURE_ACTION_MODE_OVERLAY.

Click Source Link

Usage

From source file:org.mariotaku.twidere.activity.support.BaseDialogWhenLargeActivity.java

private void setupWindow() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        getWindow().addFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS);
    }//w ww. ja v a 2s.co m
    supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR);
    supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY);
    supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_MODE_OVERLAY);
}

From source file:org.getlantern.firetweet.activity.support.LinkHandlerActivity.java

private void requestWindowFeatures(Window window, int linkId, Uri uri) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        window.addFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS);
    }//from  w w w.j  a va  2s . co m
    supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY);
    supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_MODE_OVERLAY);
    final int transitionRes;
    switch (linkId) {
    case LINK_ID_USER: {
        transitionRes = R.transition.transition_user;
        break;
    }
    //            case LINK_ID_STATUS: {
    //                transitionRes = R.transition.transition_status;
    //                break;
    //            }
    default: {
        transitionRes = 0;
        break;
    }
    }
    if (transitionRes != 0 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
            && !ThemeUtils.isTransparentBackground(this)) {
        Utils.setSharedElementTransition(this, window, transitionRes);
    }
}

From source file:org.mariotaku.twidere.fragment.UserFragment.java

@Override
public boolean setupWindow(FragmentActivity activity) {
    if (activity instanceof AppCompatActivity) {
        ((AppCompatActivity) activity).supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        ((AppCompatActivity) activity).supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_MODE_OVERLAY);
    }//from   w w  w  .ja v a2 s  .c  om
    WindowSupport.setStatusBarColor(activity.getWindow(), Color.TRANSPARENT);
    return true;
}