系統狀態列和app頁面一體化
實現的步驟主要有以下幾點:
1.android4.4 以上版本
2.設定app全屏:
方法:在AndroidManifest.xml中設定android:theme="@android:style/Theme.Translucent.NoTitleBar"
3.載入nineoldandroids-2.4.0.jar
4.實現類:把狀態列背景設為全透明。
在setcontentview前面執行
/**![](https://i.iter01.com/images/de5bb6d11a638a8819c4c1cca8261f9e6fe3b4d3cc838f35217405ea9b17346b.png)
* 設定狀態列背景狀態
*/
private void setTranslucentStatus()
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
{
Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
winParams.flags |= bits;
win.setAttributes(winParams);
}
SystemStatusManager tintManager = new SystemStatusManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setStatusBarTintResource(0);//狀態列無背景
}
1.android4.4 以上版本
2.設定app全屏:
方法:在AndroidManifest.xml中設定android:theme="@android:style/Theme.Translucent.NoTitleBar"
3.載入nineoldandroids-2.4.0.jar
4.實現類:把狀態列背景設為全透明。
在setcontentview前面執行
/**
![](https://i.iter01.com/images/de5bb6d11a638a8819c4c1cca8261f9e6fe3b4d3cc838f35217405ea9b17346b.png)
* 設定狀態列背景狀態
*/
private void setTranslucentStatus()
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
{
Window win = getWindow();
WindowManager.LayoutParams winParams = win.getAttributes();
final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
winParams.flags |= bits;
win.setAttributes(winParams);
}
SystemStatusManager tintManager = new SystemStatusManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setStatusBarTintResource(0);//狀態列無背景
}
相關文章
- Android 隱藏系統狀態列Android
- 直播app系統原始碼,Flutter中導航欄和狀態列設定成透明APP原始碼Flutter
- 直播app原始碼,狀態列和導航欄設定成透明狀態APP原始碼
- 直播軟體搭建,狀態列顏色跟隨裝置系統變化而變化
- 直播系統原始碼,uni-app 設定狀態列背景色原始碼APP
- vue從其他頁面返回保持上一頁的狀態Vue
- 系統狀態統計和檢視
- React Native 跳轉到 APP 推送頁面並獲取推送狀態React NativeAPP
- Vue 頁面狀態保持頁面間資料傳輸的一種方法Vue
- Android 頁面多狀態佈局管理Android
- Vue管理系統前端系列三登入頁和首頁及`vuex`管理登入狀態Vue前端
- App啟動頁面優化APP優化
- 直播app開發,flutter 狀態列 AppBar 設定透明和半透明APPFlutter
- 直播系統原始碼,啟動APP時判斷登入狀態,引導頁、登入頁、首頁的跳轉方式原始碼APP
- 狀態列
- 頁面狀態改變會觸發的一些事件事件
- OpenHarmony頁面級UI狀態儲存:LocalStorageUI
- 前端 | Vue 路由返回恢復頁面狀態前端Vue路由
- 直播app原始碼,背景主題以及狀態列的更改和設定APP原始碼
- 直播系統平臺搭建,狀態列透明和程式碼設定漸變色
- 直播系統app原始碼,Android studio 實現app登入註冊頁面APP原始碼Android
- PHP 實現頁面靜態化PHP
- 下一代狀態管理系統 - Ractor
- 直播系統app原始碼,簡潔好看的登入頁面APP原始碼
- 系統設計架構:有狀態與無狀態架構
- bootstrap 柵格系統 列巢狀 列偏移boot巢狀
- 短視訊直播系統,Android狀態列設定顏色字型Android
- web頁面中http返回的狀態碼解釋WebHTTP
- OC WKWebView 狀態列空白,頁面顯示不能佔滿,以及播放音樂等問題WebView
- 直播app原始碼,系統首頁或任意頁面下拉自動重新整理APP原始碼
- 沉浸式狀態列
- 狀態列相關
- Android 狀態列透明Android
- Laravel頁面靜態化最佳實踐Laravel
- 頁面靜態化技術演進
- 公安一體化警務系統搭建,微警務APP開發APP
- 主用ATC系統執行狀態筆記(一)筆記
- 一個超高自定義度又簡單使用的頁面狀態管理庫
- iOS App稽核狀態和稽核時間管理指南iOSAPP