when i write requestWindowFeature(window.FEATURE_ACTION_BAR_OVERLAY); at that time i am getting error on window tag

时间:2016-04-04 18:44:08

标签: android

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(window.FEATURE_ACTION_BAR_OVERLAY);
    setContentView(R.layout.nav_header_main);

i also added the package import android.view.Window; but still i'm getting error.

1 个答案:

答案 0 :(得分:0)

Try setting that before the call to super, I've had to do that before.

Anothing thing to try is setting android:windowActionBarOverlay= to true in you app theme.

Or you could also try using getWindow().requestFeature();