简体   繁体   中英

Android layouts: fit View under Action Bar

I'm using the action bar as a translucent overlay (like the Google Earth app), using:

<item name="android:windowActionBarOverlay">true</item>

All my Views of full-screen height now extend beneath the action bar, but I only want one of them to do that. So my question is, is there a way to automatically fit Views so that they do not extend underneath the action bar overlay? I'd rather not have to use a custom dp setting.

There is no way to fit the views automatically since action bar is in overlay mode. You need to set action bar height as marginTop for the view. You can refer the android documentation here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM