簡體   English   中英

如何刪除android狀態欄中的電池圖標?

[英]How to remove the battery icon in android status bar?

我刪除了狀態欄,通過取消背景圖像顯示Android中的網絡,電池和時間信息。 但圖標仍然存在。 只是想知道如何刪除電池圖標。

不是應用程序,而是框架開發。 提前致謝。

你試過電話嗎?

   getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

在Activity onCreate()?

如果您使用的是Android 2.2,則可以通過以下步驟將其刪除。

  1. 找到StatusBarPolicy.java
  2. 找到mBatteryIcon並添加service.setIconVisibility(mBatteryIcon , false); 為了它。
  3. 刪除intent-filter中與電池相關的所有操作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM