SpCache

Additional

Language
Java
Version
N/A
Created
May 19, 2015
Updated
May 19, 2015 (Retired)
Owner
张鸿洋 (hongyangAndroid)
Contributor
张鸿洋 (hongyangAndroid)
1
Activity
Badge
Generate
Download
Source code

Advertisement

SpCache

A cache lib for SharedPreferences .

Usage

When app start , init it .

public class SpCacheApplication extends Application
{
    @Override
    public void onCreate()
    {
        super.onCreate();
        SpCache.init(this);
    }
}

Then , you can use freely ~~

use SpCache.putXXX() and SpCache.getXXX()

SpCache.getInt(ACTIVITY_CREATE_COUNT, 0);
SpCache.putInt(ACTIVITY_CREATE_COUNT, 1);