android 右上角 xml,android状态栏右上角增加图标的方法
目前是在rk4.1系統下進行學習,具體添加方法如下:
1、base\core\res\res\Values\config.xml 增加圖標標識字符串
test_hd_status??????? //在mService.setIcon時要用到
2、frameworks\base\core\java\android\content\Intent.java
增加廣播表示:
public static final String ACTION_TEST_HD_STATUS = "android.intent.action.test_hd_status";
3、frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\PhoneStatusBarPolicy.java
中增加圖標數組
private static final int [] sTESTHdStatusImages={
R.drawable.test_hd_notfound,
R.drawable.test_hd_error,
R.drawable.test_hd_fine,
};
注冊廣播: filter.addAction(Intent.ACTION_TEST_HD_STATUS); 以及廣播處理函數
private final void updateTESTHardDiskStatus(Intent intent);
test_sdcard_status
test_hdisk_status
public static final String ACTION_TEST_EXTRA_STATUS = "android.intent.action.test_extra_status";
總結
以上是生活随笔為你收集整理的android 右上角 xml,android状态栏右上角增加图标的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (1)定义一个抽象类Weapon,该抽象
- 下一篇: php 加日志,添加日志的相关内容推荐