状态栏图标的布局文件在frameworks\base\packages\SystemUI\res\layout\status_bar.xml,主要包括通知,定位,蓝牙,信号,时间,电池等图标,只要在相应的布局文件中加入属性android:visibility=“invisible” 或者“gone”即可

<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
--><!--    android:background="@drawable/status_bar_closed_default_background" -->
<com.android.systemui.statusbar.phone.PhoneStatusBarViewxmlns:android="http://schemas.android.com/apk/res/android"xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"android:layout_width="match_parent"android:layout_height="@dimen/status_bar_height"android:id="@+id/status_bar"android:background="@drawable/system_bar_background"android:orientation="vertical"android:focusable="false"android:descendantFocusability="afterDescendants"><ImageViewandroid:id="@+id/notification_lights_out"android:layout_width="0dp"android:layout_height="match_parent"android:paddingStart="6dip"android:paddingBottom="2dip"android:src="@drawable/ic_sysbar_lights_out_dot_small"android:scaleType="center"android:visibility="gone"/><LinearLayout android:id="@+id/status_bar_contents"android:layout_width="match_parent"android:layout_height="match_parent"android:paddingStart="6dp"android:paddingEnd="8dp"android:orientation="horizontal"><!-- The alpha of this area is controlled from both PhoneStatusBarTransitions andPhoneStatusBar (DISABLE_NOTIFICATION_ICONS). --><com.android.systemui.statusbar.AlphaOptimizedFrameLayoutandroid:id="@+id/notification_icon_area"android:layout_width="0dip"android:layout_height="match_parent"android:layout_weight="1"android:visibility="invisible"android:orientation="horizontal" /><com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/system_icon_area"android:layout_width="wrap_content"android:layout_height="match_parent"android:orientation="horizontal"><include layout="@layout/system_icons" /><com.android.systemui.statusbar.policy.Clockandroid:id="@+id/clock"android:textAppearance="@style/TextAppearance.StatusBar.Clock"android:layout_width="wrap_content"android:layout_height="match_parent"android:singleLine="true"android:paddingStart="@dimen/status_bar_clock_starting_padding"android:paddingEnd="@dimen/status_bar_clock_end_padding"android:gravity="center_vertical|start"/></com.android.keyguard.AlphaOptimizedLinearLayout></LinearLayout><ViewStubandroid:id="@+id/emergency_cryptkeeper_text"android:layout_width="wrap_content"android:layout_height="match_parent"android:layout="@layout/emergency_cryptkeeper_text"/></com.android.systemui.statusbar.phone.PhoneStatusBarView>
<?xml version="1.0" encoding="utf-8"?><!--~ Copyright (C) 2014 The Android Open Source Project~~ Licensed under the Apache License, Version 2.0 (the "License");~ you may not use this file except in compliance with the License.~ You may obtain a copy of the License at~~      http://www.apache.org/licenses/LICENSE-2.0~~ Unless required by applicable law or agreed to in writing, software~ distributed under the License is distributed on an "AS IS" BASIS,~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.~ See the License for the specific language governing permissions and~ limitations under the License--><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/system_icons"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"><com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/statusIcons"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:visibility="invisible"android:orientation="horizontal"/><include layout="@layout/signal_cluster_view"android:visibility="invisible"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="@dimen/signal_cluster_margin_start"/><com.android.systemui.BatteryMeterView android:id="@+id/battery"android:layout_height="match_parent"android:layout_width="wrap_content"/>
</LinearLayout>

抖音源码隐藏状态栏图标相关推荐

  1. android8.1自定义通知栏,Android 8.1隐藏状态栏图标的实例代码

    近期客户需求,状态栏只显示时间和电池图标,如图 状态栏图标的布局文件在frameworks\base\packages\SystemUI\res\layout\status_bar.xml,主要包括通 ...

  2. 短视频源码,仿抖音源码,助您在短视频行业开辟出一条新路

    短视频源码,仿抖音源码,助您在短视频行业开辟出一条新路 复制代码 在短视频行业,抖音当之无愧的T0阶层.致使腾讯老大也眼红这块蛋糕,打压抖音,重启自己的短视频--微视来进行竞争.短视频的火爆事宜得益于 ...

  3. 短视频app开发:抖音源码,杂货铺or藏宝阁?

    抖音源码究竟是杂货铺还是藏宝阁?曾经,人们为人人网的兴起欢欣鼓舞,后来,有人说博客太长,微博做自媒体才是不可超越的,再后来,快手的兴起令人不可思议,而现在,抖音的"全民"时代令一些 ...

  4. adb隐藏状态栏图标_[应用]华为手机怎么设置隐藏状态栏上的图标

    大家使用手机的时候,有没有觉得这个状态栏图标工具,状态栏图标太拥挤,于是就看到有的小伙伴想把华为手机里的状态栏上的图标进行隐藏了,小版教你隐藏闹钟图标. 先上截图,找找状态栏的亮点吧! 下面就是这款神 ...

  5. adb隐藏状态栏图标,Android 完全隐藏状态栏方法

    Android 完全隐藏状态栏方法  https://blog.csdn.net/ljbphoebe/article/details/88179576 1. 隐藏ActionBar: ActionBa ...

  6. Win10隐藏状态栏图标的方法

    很多时候,电脑使用时间久了,安装的软件越来越多之后,因此状态栏的图标可能也会堆积过多,很多都影响到我们工作效率和强迫症,虽然我们可以通过卸载软件来解决这件事情,但也并不是最终的解决方法,因此我们选择把 ...

  7. 短视频APP源码隐藏桌面图标

    private void ShowDeskIcon(bool b)//控制桌面图标显隐 { IntPtr desk = FindWindow("ProgMan", null);// ...

  8. C语言刷抖音源码,iOS多种刷新样式、音乐播放器、仿抖音视频、旅游App等源码...

    iOS精选源码 iOS优质博客 在开发过程中我们可能会遇到不同的产品需求,例如说A-->B--C,如果是层级返回的话我们只需要pop回去就好,但是如果是back到指定VC的时候,例如:A--&g ...

  9. android之隐藏状态栏、图标、布局

    通过代码控制隐藏 隐藏布局控件: findViewById(R.id.FaceActivity_ConstraintLayoutBar).setVisibility(View.GONE); 隐藏图标: ...

最新文章

  1. 寒冬中的半个月前端面试
  2. 基于visual Studio2013解决C语言竞赛题之1085相邻之和素数
  3. K8S部署工具:KubeOperator集群导入
  4. C++: C++函数声明的时候后面加const
  5. c语言的程序灵魂是什么,C语言 第二章 程序的灵魂--算法
  6. LINUX REDHAT第九单元文档
  7. 将桌面文件映射至E盘
  8. pair用法 lower_bound upper_bound
  9. 程序应该怎样写比较规范
  10. python 矩阵点乘_Python之Numpy库基础——矩阵运算
  11. 【高数】幂级数求和函数问题:用变限积分?积分下限是0?S(0)怎么求?求和时起始项n和角标有规定吗?
  12. Kubernetes入门培训(内含PPT)
  13. 诺基亚称霸时代终结 Ovi商店面临命运抉择
  14. 爱荷华州立 计算机博士,美国爱荷华州立大学无损检测中心裴宁博士来我院讲学...
  15. python 直方图 横向_python绘制直方图
  16. 1807520-99-5,DNP-PEG4-alcohol含有二硝基苯和羟基的PEG连接剂
  17. 一款原型设计工具“墨刀”的介绍
  18. 用计算机刻录光盘,刻录光盘,教您怎么用电脑将文件刻录到光盘
  19. 广德现场:夜山明·潮牌酒倾情助阵第七届国际山地自行车开赛!
  20. 李宁签约肖战为运动潮流产品全球代言人;麦当劳中国内地首推植物肉产品 | 美通企业日报...

热门文章

  1. python爬取头条视频_python 爬取头条视频
  2. 最新网站外链建设方法大全!
  3. Ubuntu 20.04 美化终端
  4. 百度下拉词怎么做?出现负面应该如何处理?此方法适用百度、搜狗、神马
  5. C#集合中的Add与AddRange
  6. php 高德地图点击事件,javascript - 高德地图marker动态绑定点击问题
  7. 【汇总】行为识别、时序行为检测、弱监督行为检测、时空行为定位论文代码(持续更新!!!)
  8. input 输入框 监听@input
  9. Unknown tag
  10. Centos ping命令 网络不可达