本文整理汇总了Java中in.srain.cube.request.RequestFinishHandler类的典型用法代码示例。如果您正苦于以下问题:Java RequestFinishHandler类的具体用法?Java RequestFinishHandler怎么用?Java RequestFinishHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RequestFinishHandler类属于in.srain.cube.request包,在下文中一共展示了RequestFinishHandler类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: updateData
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
protected void updateData() {
DemoRequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
mPtrFrame.postDelayed(new Runnable() {
@Override
public void run() {
mAdapter.getDataList().clear();
mAdapter.getDataList().addAll(data.optJson("data").optJson("list").toArrayList());
mPtrFrame.refreshComplete();
mAdapter.notifyDataSetChanged();
}
}, 0);
}
});
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:WithListView.java
示例2: updateData2
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
protected void updateData2() {
DemoRequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
mPtrFrame.postDelayed(new Runnable() {
@Override
public void run() {
//mAdapter.getDataList().clear();
mAdapter.getDataList().addAll(data.optJson("data").optJson("list").toArrayList());
mPtrFrame.loadComplete();
mAdapter.notifyDataSetChanged();
}
}, 0);
}
});
}
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:18,代码来源:WithListView.java
示例3: updateData
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
protected void updateData() {
DemoRequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
mPtrFrame.postDelayed(new Runnable() {
@Override
public void run() {
mAdapter.getDataList().clear();
mAdapter.getDataList().addAll(data.optJson("data").optJson("list").toArrayList());
mPtrFrame.refreshComplete();
mAdapter.notifyDataSetChanged();
}
}, 0);
}
});
}
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:19,代码来源:WithGridView.java
示例4: updateData2
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
protected void updateData2() {
DemoRequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
mPtrFrame.postDelayed(new Runnable() {
@Override
public void run() {
//mAdapter.getDataList().clear();
mAdapter.getDataList().addAll(data.optJson("data").optJson("list").toArrayList());
mPtrFrame.loadComplete();
mAdapter.notifyDataSetChanged();
if(mAdapter.getCount()>280){
mPtrFrame.setLoadFinishComplete(true);
}
}
}, 0);
}
});
}
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:22,代码来源:WithGridView.java
示例5: updateData
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
protected void updateData() {
DemoRequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
mPtrFrame.postDelayed(new Runnable() {
@Override
public void run() {
mAdapter.getDataList().clear();
mAdapter.getDataList().addAll(data.optJson("data").optJson("list").toArrayList().subList(0,10));
mPtrFrame.refreshComplete();
mAdapter.notifyDataSetChanged();
}
}, 0);
}
});
}
开发者ID:tangnuo,项目名称:android-Ultra-Pull-To-Refresh-With-Load-More-master,代码行数:18,代码来源:WithGridView.java
示例6: getImageList
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
public static void getImageList(final RequestFinishHandler<JsonData> requestFinishHandler) {
CacheAbleRequestHandler requestHandler = new CacheAbleRequestJsonHandler() {
@Override
public void onCacheAbleRequestFinish(JsonData data, CacheAbleRequest.ResultType type, boolean outOfDate) {
requestFinishHandler.onRequestFinish(data);
}
};
CacheAbleRequest<JsonData> request = new CacheAbleRequest<JsonData>(requestHandler);
String url = "http://cube-server.liaohuqiu.net/api_demo/image-list.php";
request.setCacheTime(3600);
request.setTimeout(1000);
request.getRequestData().setRequestUrl(url);
request.setAssertInitDataPath("request_init/image-list.json");
request.setCacheKey("image-list-1");
request.send();
}
开发者ID:cnlinrong,项目名称:MyAndroidFramework,代码行数:21,代码来源:RequestData.java
示例7: updateData
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
protected void updateData() {
final ViewPagerFragment fragment = mCurrentFragment;
DemoRequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
if (fragment == mCurrentFragment) {
fragment.update(data);
mPtrFrame.refreshComplete();
}
}
});
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:ViewPagerActivity.java
示例8: updateData
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
protected void updateData() {
DemoRequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
displayData(data);
}
});
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:WithListViewAndEmptyView.java
示例9: updateData
import in.srain.cube.request.RequestFinishHandler; //导入依赖的package包/类
public void updateData() {
final ViewPagerFragment fragment = mCurrentFragment;
RequestData.getImageList(new RequestFinishHandler<JsonData>() {
@Override
public void onRequestFinish(final JsonData data) {
if (fragment == mCurrentFragment) {
fragment.update(data);
mPtrFrame.refreshComplete();
}
}
});
}
开发者ID:cnlinrong,项目名称:MyAndroidFramework,代码行数:15,代码来源:FragmentViewPagerAdapter.java
注:本文中的in.srain.cube.request.RequestFinishHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论