自定義可展開收起TextView,展開收起按鈕緊跟文本內容
https://blog.csdn.net/u014453811/article/details/55045703
簡書收集的開源代碼:
http://www.lxweimin.com/p/ca34376b773d
https://github.com/wasabeef/awesome-android-ui
https://github.com/Trinea/android-open-project
Android資料集合:http://www.lxweimin.com/p/16e1e4aa2d30
Android開發源碼開源項目:http://www.54tianzhisheng.cn/2017/05/13/android-projects/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io
多項目:http://blog.csdn.net/zsr0526/article/details/70145431?locationNum=5&fps=1
Android UI庫書簽(包含多種):http://blog.csdn.net/qingfeng812/article/details/51463811
Android 技術選型:https://juejin.im/post/58f61bb55c497d006ca294bb
對話框:http://blog.csdn.net/l_l_b/article/details/50518763
代碼收集:http://www.lxweimin.com/p/72494773aace
比SharedPreferences強大的存儲框架:https://github.com/yangfuhai/ASimpleCache
[五種方式實現Android底部導航欄]http://blog.csdn.net/student9128/article/details/53435737
Android炫酷的Activity切換效果,共享元素:http://www.lxweimin.com/p/a43daa1e3d6e
ScrollView嵌套各種滑動控件:http://www.lxweimin.com/p/edd98f3de630
開發使用:http://www.lxweimin.com/p/c4988c8be615
有兩種形式設置、取消全屏的方法,之所以稱作兩種形式而不是兩種方法,是因為這兩種方式只是寫法不同,實質是一樣的。
形式一:
//設置全屏
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
//取消全屏
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
形式二:
//設置全屏
WindowManager.LayoutParams attr = getWindow().getAttributes();
attr.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;
getWindow().setAttributes(attr);
//取消全屏
WindowManager.LayoutParams attr = getWindow().getAttributes();
attr.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().setAttributes(attr);
全屏狀態改為非全屏保持內容位置不變:
getWindow().setFlags(
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
這里有一個問題:
當設置了該flag之后取消全屏,部分內容被狀態欄擋住(忽略狀態欄高度,以屏幕右上角為原點計算布局)
加上代碼getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);可以解決該問題,但再次設置全屏的時候狀態欄不消失。