Custom Translucent Android ActionBar

前端 未结 7 964
梦如初夏
梦如初夏 2020-11-29 16:19

I\'ve been scouring the interwebs (e.g. Android documentation, answers here, etc.) for the answer to what I thought would be a fairly trivial question. How do you achieve a

相关标签:
7条回答
  • 2020-11-29 16:42

    I think you should be able to do this using the Window flag FEATURE_ACTION_BAR_OVERLAY.

    Before you call setContentView() in your activity,

    Call:

    getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
    

    And it will use an overlaid ActionBar instead of pushing down your window.

    0 讨论(0)
提交回复
热议问题