Skip to content

Commit 7a582ef

Browse files
author
xiaoqi
committed
Merge remote-tracking branch 'origin/master'
2 parents 8fd5cf4 + c104df2 commit 7a582ef

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![license](https://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/didi/VirtualAPK/blob/master/LICENSE)
1+
[![license](https://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/JavaNoober/AutoSave)
22
[![JCenter](https://img.shields.io/badge/JCenter-AutoSaver-green.svg?style=flat)](https://bintray.com/noober/maven/AutoSaver)
33

44

@@ -14,6 +14,13 @@
1414
方法,现在就不会自动生成这个类的SaveStateHelper类,减少了无用SaveStateHelper类,便于在Base类中统一集成。
1515

1616

17+
引入方式,在app的gradle中加入下面依赖即可:
18+
19+
20+
compile 'com.noober:savehelper:1.0.2'
21+
compile 'com.noober:savehelper-api:1.0.2'
22+
annotationProcessor 'com.noober:processor:1.0.2'
23+
1724
# 引入
1825

1926
android 内存被回收是一个开发者的常见问题。当我们**跳转到一个二级界面,或者切换到后台**的时候,如果时间过长或者手机的**内存不足**,当我们再返回这个界面的时候,activity或fragment就会被内存回收。这时候虽然界面被重新执行了onCreate,但是很多变量的值却已经被置空,这样就导致了很多潜在的bug,已经很多空指针的问题。
@@ -224,11 +231,4 @@ savedInstanceState不会null的时候,说明就是需要内存恢复的时候
224231
看到这里大家已经猜到其实这个框架的实现原理和BufferKnife是相同的。而bufferknife的原理很多文章都有,这里就不过多介绍了。
225232

226233
github地址:[https://github.com/JavaNoober/AutoSave](https://github.com/JavaNoober/AutoSave)
227-
228-
引入方式,在app的gradle中加入下面依赖即可:
229-
230-
231-
compile 'com.noober:savehelper:1.0.0'
232-
compile 'com.noober:savehelper-api:1.0.0'
233-
annotationProcessor 'com.noober:processor:1.0.0'
234-
234+

0 commit comments

Comments
 (0)