values下新建一个styles.xml(v21) <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@android:color/transparent</item> </style> </resources> 在代码中引用//沉浸式 Window window = getWindow(); window.setFlags( WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
android沉浸式
最新推荐文章于 2024-11-01 15:25:55 发布