Android(安卓)CoordinatorLayout 沉浸式状态栏
在底部导航栏中添加一个侧滑菜单的效果,设置了沉浸式状态栏没有效果,下面看看处理的方法:
效果图:
1.在布局中不要设置:android:fitsSystemWindows="true"这行代码,一定要去掉,不然没有效果的
<?xml version="1.0" encoding="utf-8"?>
2.在清单文件中对应的activity中设置theme:
我们的手机状态栏高度一般大约是 20dp 需要的话可以将ToolBar 的距离下移了20dp
感谢:
https://github.com/getActivity/AndroidProject
知识点:
-
权限请求框架:https://github.com/getActivity/XXPermissions
-
标题栏:https://github.com/getActivity/TitleBar
-
吐司工具类:https://github.com/getActivity/ToastUtils
-
状态栏沉浸:https://github.com/gyf-dev/ImmersionBar
-
缩放 ImageView:https://github.com/chrisbanes/PhotoView
-
ViewPager 指示器:https://github.com/romandanylyk/PageIndicatorView
-
ButterKnife 注解:https://github.com/JakeWharton/butterknife
-
EventBus 事件:https://github.com/greenrobot/EventBus
-
内存泄漏捕捉:https://github.com/square/leakcanary
-
本地异常捕捉:https://github.com/Ereza/CustomActivityOnCrash
相关案例:
沉浸式状态栏:
https://github.com/DyncKathline/StatusBarUtil
https://github.com/gyf-dev/ImmersionBar
https://github.com/laobie/StatusBarUtil
https://www.jianshu.com/p/617be02dc265?tdsourcetag=s_pctim_aiomsg
https://github.com/niorgai/StatusBarCompat
https://github.com/xiewenfeng/statusbartextcolorchange
https://github.com/Ye-Miao/StatusBarUtil
底部导航:
https://github.com/WakeHao/NavBar
https://github.com/ittianyu/BottomNavigationViewEx
https://github.com/armcha/LuseenBottomNavigation
https://github.com/hitherejoe/BottomNavigationViewSample
https://github.com/yasszu/bottom-navigation
侧滑菜单:
https://github.com/yasszu/bottom-navigation
https://github.com/yasszu/bottom-navigation
https://github.com/yasszu/bottom-navigation
https://github.com/yasszu/bottom-navigation
https://github.com/yasszu/bottom-navigation
https://github.com/mxn21/FlowingDrawer
https://github.com/bingoogolapple/BGASwipeBackLayout-Android
https://github.com/keklikhasan/LDrawer
https://www.androidcup.com/index.php/2019/09/23/ldrawer/
更多相关文章
- Android(安卓)DrawableTextView图片文字居中显示
- android 下滤镜效果的实现
- 【Android(安卓)界面效果9】9patch图片
- 学习Android动画小结
- android 动态菜单组件
- Android(安卓)Paint和Color类
- Android应用开发之android菜单
- Android(安卓)悬浮窗 (附圆形菜单悬浮窗)
- Android(安卓)实现圆形的 ImageView 的3种方法