Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

保存后的数据,读取的时候为null #3

Open
faith-hb opened this issue Apr 12, 2018 · 0 comments
Open

保存后的数据,读取的时候为null #3

faith-hb opened this issue Apr 12, 2018 · 0 comments

Comments

@faith-hb
Copy link

操作方式如下:

保存数据:
AnyPref.put(sample);
//或者
AnyPref.put(sample, "your prefName");第二个参数是自己定义的保存此类的sharedPreferences name,不是PrefModel定义的那个name
读取数据
Sample sample = AnyPref.get(Sample.class);
//或者
Sample sample = AnyPref.get(Sample.class, "your prefName");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant