Example usage for android.support.v4.view Window FEATURE_ACTION_BAR_OVERLAY

List of usage examples for android.support.v4.view Window FEATURE_ACTION_BAR_OVERLAY

Introduction

In this page you can find the example usage for android.support.v4.view Window FEATURE_ACTION_BAR_OVERLAY.

Prototype

long FEATURE_ACTION_BAR_OVERLAY

To view the source code for android.support.v4.view Window FEATURE_ACTION_BAR_OVERLAY.

Click Source Link

Document

Flag for requesting an Action Bar that overlays window content.

Usage

From source file:com.actionbarsherlock.sample.demos.app.ActionBarOverlay.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.actionbar_overlay);

    //Load partially transparent black background
    getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.ab_bg_black));

    StringBuilder builder = new StringBuilder();
    for (int i = 0; i < 3; i++) {
        for (String dialog : Shakespeare.DIALOGUE) {
            builder.append(dialog).append("\n\n");
        }/*from www .j  a  v a 2 s . com*/
    }

    TextView bunchOfText = (TextView) findViewById(R.id.bunch_of_text);
    bunchOfText.setText(builder.toString());
}

From source file:com.actionbarsherlock.internal.app.ActionBarHandlerWatson.java

@Override
protected boolean requestWindowFeature(int featureId) {
    if (featureId == Window.FEATURE_ACTION_BAR_OVERLAY) {
        // TODO Make action bar partially transparent
        return true;
    }//from ww w .ja v a  2 s  . c  o m
    if (featureId == Window.FEATURE_ACTION_MODE_OVERLAY) {
        // TODO Make action modes partially transparent
        return true;
    }
    if (featureId == Window.FEATURE_ENABLE_ACTION_BAR_WATSON_TEXT) {
        mIsActionItemTextEnabled = true;
        return true;
    }
    return false;
}