本文整理汇总了Java中org.afinal.simplecache.ACache类的典型用法代码示例。如果您正苦于以下问题:Java ACache类的具体用法?Java ACache怎么用?Java ACache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ACache类属于org.afinal.simplecache包,在下文中一共展示了ACache类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onSuccess
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
public void onSuccess(String flag, String key, CommonDate commonDate) {
L.e("onSuccess");
stopAllState();
if (flag != currentFlag) return;
if (commonDate.isError()){
ToastUtils.show(MainActivity.this, "数据加载出错");
return;
}
mCache.put(key,commonDate,ACache.TIME_DAY*7);
L.e("cache key="+key);
List<CommonDate.ResultsEntity> datas = commonDate.getResults();
mAdapter.addDatas(datas);
}
开发者ID:GcsSloop,项目名称:Gank,代码行数:19,代码来源:MainActivity.java
示例2: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_save_jsonobject);
// 初始化控件
initView();
mCache = ACache.get(this);
jsonObject = new JSONObject();
try {
jsonObject.put("name", "Yoson");
jsonObject.put("age", 18);
} catch (JSONException e) {
e.printStackTrace();
}
mTv_jsonobject_original.setText(jsonObject.toString());
}
开发者ID:GeorgeMe,项目名称:ASimpleCache,代码行数:18,代码来源:SaveJsonObjectActivity.java
示例3: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mCache = ACache.get(getApplicationContext());
initViews();
startRefresh();
}
开发者ID:GcsSloop,项目名称:Gank,代码行数:9,代码来源:MainActivity.java
示例4: prepareData
import org.afinal.simplecache.ACache; //导入依赖的package包/类
private void prepareData() {
mCache = ACache.get(this);
NewGankData data = (NewGankData) mCache.getAsObject(Constants.TYPE_BEAUTY);
if (data != null) {
for (int i = 0; i < 3; i++) {
beauty[i] = data.getResults().get(i).getUrl();
}
} else {
for (int i = 0; i < 3; i++) {
beauty[i] = Constants.Default_PIC;
}
}
mTargetUrl = beauty[0];
}
开发者ID:Temoa,项目名称:GankIO,代码行数:16,代码来源:MainActivity.java
示例5: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mCache = ACache.get(getApplicationContext());
mHttpClient = new AsyncHttpClient();
}
开发者ID:richardchien,项目名称:zhihu-daily-android,代码行数:8,代码来源:BaseActivity.java
示例6: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_save_bitmap);
// 初始化控件
initView();
mCache = ACache.get(this);
}
开发者ID:GeorgeMe,项目名称:ASimpleCache,代码行数:10,代码来源:SaveBitmapActivity.java
示例7: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_save_object);
// 初始化控件
initView();
mCache = ACache.get(this);
userBean = new UserBean();
userBean.setAge("18");
userBean.setName("HaoYoucai");
mTv_object_original.setText(userBean.toString());
}
开发者ID:GeorgeMe,项目名称:ASimpleCache,代码行数:14,代码来源:SaveObjectActivity.java
示例8: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_save_string);
// 初始化控件
initView();
mCache = ACache.get(this);
}
开发者ID:GeorgeMe,项目名称:ASimpleCache,代码行数:10,代码来源:SaveStringActivity.java
示例9: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_save_file);
initView();
mCache = ACache.get(this);
}
开发者ID:GeorgeMe,项目名称:ASimpleCache,代码行数:10,代码来源:SaveMediaActivity.java
示例10: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_save_drawable);
// 初始化控件
initView();
mCache = ACache.get(this);
}
开发者ID:GeorgeMe,项目名称:ASimpleCache,代码行数:10,代码来源:SaveDrawableActivity.java
示例11: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
mInstance = this;
mACache = ACache.get(this);
AVOSCloud.initialize(this,
"6xfzwyvk2cq9903d81tj9k40bf6gkwwvz71gjwc13h7arvbb",
"nxm2dtmwnuqboi3aln26hmvif3xmlu4vbzghi938v896n3oj");
// testLeanCloud();
}
开发者ID:baurine,项目名称:instagram-material,代码行数:14,代码来源:InstaMaterialApp.java
示例12: onStop
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
protected void onStop() {
super.onStop();
if (mPlate != null) {
ACache aCache = ACache.get(this);
aCache.put(KEY_CACHE_PLATE, mPlate);
}
}
开发者ID:fei-ke,项目名称:ChipHellClient,代码行数:9,代码来源:MainActivity.java
示例13: ModelImpl
import org.afinal.simplecache.ACache; //导入依赖的package包/类
ModelImpl(Context context) {
mRequestQueue = MyApp.getRequestQueue();
mCache = ACache.get(context);
}
开发者ID:Temoa,项目名称:Startor,代码行数:5,代码来源:ModelImpl.java
示例14: onCreate
import org.afinal.simplecache.ACache; //导入依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mCache = ACache.get(getContext().getApplicationContext());
mHttpClient = new AsyncHttpClient();
}
开发者ID:richardchien,项目名称:zhihu-daily-android,代码行数:7,代码来源:BaseFragment.java
示例15: getACache
import org.afinal.simplecache.ACache; //导入依赖的package包/类
public static ACache getACache() {
return getInstance().mACache;
}
开发者ID:baurine,项目名称:instagram-material,代码行数:4,代码来源:InstaMaterialApp.java
注:本文中的org.afinal.simplecache.ACache类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论