实现代码:git
需要注意的是 decorView
需要设置背景色,并且需要在 setPadding
之前,否则无法达到全屏效果
实现代码:git
需要注意的是 decorView
需要设置背景色,并且需要在 setPadding
之前,否则无法达到全屏效果
发现不小心提交了包含密码的文件,所以记录下删除该文件及记录的方法
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch src/main/resources/application.properties' --prune-empty --tag-name-filter cat -- --all
src/main/resources/application.properties为该文件,替换成需要的文件即可。
如果提示:Cannot rewrite branches: Your index contains uncommitted changes.
则需要:
git stash
最后提交到git:
git push origin --force --all
ViewModelProvider.of(this).get(CrimeListViewModel::class.java)
该方法在lifecycle升级到2.x以后已被抛弃使用,可改为 (git):
ViewModelProvider.AndroidViewModelFactory.getInstance(context?.applicationContext as Application).create(CrimeListViewModel::class.java)
4.set和get使用就是在方法/变量下直接使用get()和set() : git