實現沉浸式界面


1.實現此style values-v19
<style name="TransalucaentStatusBar" parent="@style/Theme.AppCompat.Light.NoActionBar">
    <!-- API 19 theme customizations can go here. -->
    <item name="android:windowTranslucentStatus">true</item> //取消狀態欄高度
    <item name="android:windowTranslucentNavigation">true</item>
    <item name="android:windowNoTitle">true</item>
</style>

2.在對應界面跟佈局fitsSystemWindows=false.
值爲false,可以將界面上拉,爲true,則界面在狀態欄下面顯示。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章