1,参考网址
https://blog.csdn.net/hkq463/article/details/52249532 或者 https://github.com/gyf-dev/ImmersionBar
//最普通的或者简单的实现状态栏
在xml布局内
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffff"
android:orientation="vertical"
tools:context=".activity.BaseActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="140dp"
android:textSize="24dp"
android:clipToPadding="true"
android:fitsSystemWindows="true"
android:background="#ff7700"
/>
</LinearLayout>