本文整理汇总了Java中in.srain.cube.views.ptr.PtrClassicFrameLayout类的典型用法代码示例。如果您正苦于以下问题:Java PtrClassicFrameLayout类的具体用法?Java PtrClassicFrameLayout怎么用?Java PtrClassicFrameLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PtrClassicFrameLayout类属于in.srain.cube.views.ptr包,在下文中一共展示了PtrClassicFrameLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manage);
recyclerView_manage = (RecyclerView) findViewById(R.id.recyclerView_manage);
ptrFrame = (PtrClassicFrameLayout) findViewById(R.id.fragment_rotate_header_with_view_group_frame);
initPtrFrame();
toolbar = (Toolbar) findViewById(R.id.toolbar_manage);
toolbar.setNavigationIcon(R.mipmap.button_back);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
toolbar.setTitle("已注册用户");
toolbar.inflateMenu(R.menu.base_toolbar_menu);
StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL);
recyclerView_manage.setLayoutManager(layoutManager);
mList = new ArrayList<>();
adapter = new ManageAdapter(mList);
recyclerView_manage.setAdapter(adapter);
}
示例2: initView
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
private void initView(View v) {
tvAbout=(TextView)v.findViewById(R.id.tv_about);
tvAbout.setMovementMethod(LinkMovementMethod.getInstance());
tvAbout.setText(Html.fromHtml((getResources().getString((R.string.app_about)))));
ptr = (PtrClassicFrameLayout) v.findViewById(R.id.ptr_main);
ptr.setPtrHandler(new PtrDefaultHandler() {
@Override
public void onRefreshBegin(PtrFrameLayout ptrFrameLayout) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ptr.refreshComplete();
}
}, 2000);
}
});
}
示例3: initView
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
private void initView(View v) {
ptr = (PtrClassicFrameLayout) v.findViewById(R.id.ptr_main);
rvMain = (RecyclerView) v.findViewById(R.id.rv_main);
rvMain.setLayoutManager(new LinearLayoutManager(getActivity()));
ptr.setPtrHandler(new PtrDefaultHandler() {
@Override
public void onRefreshBegin(PtrFrameLayout ptrFrameLayout) {
getData();
ptr.refreshComplete();
}
});
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ptr.autoRefresh();
}
}, 100);
}
示例4: initView
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
private void initView(View v) {
gvMain = (GridView) v.findViewById(R.id.gv_main);
ptr = (PtrClassicFrameLayout) v.findViewById(R.id.ptr_main);
ptr.setPtrHandler(new PtrDefaultHandler() {
@Override
public void onRefreshBegin(PtrFrameLayout ptrFrameLayout) {
getData();
ptr.refreshComplete();
}
});
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ptr.autoRefresh();
}
}, 100);
}
示例5: initView
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
private void initView(View v) {
lvMain = (ListView) v.findViewById(R.id.lv_main);
ptr = (PtrClassicFrameLayout) v.findViewById(R.id.ptr_main);
ptr.setPtrHandler(new PtrDefaultHandler() {
@Override
public void onRefreshBegin(PtrFrameLayout ptrFrameLayout) {
getData();
ptr.refreshComplete();
}
});
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ptr.autoRefresh();
}
}, 100);
}
示例6: onCreateView
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_fodex_base, container, false);
mGridView = (AsymmetricGridView) view.findViewById(R.id.grid_view);
mFloatingActionMenu = (FloatingActionsMenu) view.findViewById(R.id.floating_menu);
mTagButton = (FloatingActionButton) view.findViewById(R.id.floating_tag_button);
mPtrLayout = (PtrClassicFrameLayout) view.findViewById(R.id.swipe_container);
setupFloatingButtonsAndMenu();
setupAsymmetricGridView();
setupPullToRefresh();
setupImagePreload();
return view;
}
示例7: setupViews
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Override
protected void setupViews(final PtrClassicFrameLayout ptrFrame) {
ptrFrame.setLoadingMinTime(3000);
setHeaderTitle(R.string.ptr_demo_block_auto_fresh);
ptrFrame.postDelayed(new Runnable() {
@Override
public void run() {
ptrFrame.autoRefresh(true);
}
}, 150);
}
示例8: setupViews
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Override
protected void setupViews(final PtrClassicFrameLayout ptrFrame) {
ptrFrame.setLoadingMinTime(3000);
setHeaderTitle(R.string.ptr_demo_block_auto_fresh);
// ptrFrame.postDelayed(new Runnable() {
// @Override
// public void run() {
// ptrFrame.autoRefresh(true);
// }
// }, 150);
}
示例9: GetWebViewActivity
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
protected Activity GetWebViewActivity() {
int child = webviewsRela.getChildCount();
if (child == 0) {
return null;
}
PtrClassicFrameLayout a = (PtrClassicFrameLayout) (((RelativeLayout) webviewsRela.getChildAt(child - 1)))
.getChildAt(0);
WebViewScrollChanged b = (WebViewScrollChanged) a.getChildAt(0);
int id = b.getId();
if (webViews.containsKey(id)) {
Activity activity = (Activity) webViews.get(id).get(2);
return activity;
}
return null;
}
示例10: initView
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
private void initView(View v) {
ptr = (PtrClassicFrameLayout) v.findViewById(R.id.ptr_main);
ptr.setPtrHandler(new PtrDefaultHandler() {
@Override
public void onRefreshBegin(PtrFrameLayout ptrFrameLayout) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
ptr.refreshComplete();
}
}, 2000);
}
});
}
示例11: setupViews
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Override
protected void setupViews(final PtrClassicFrameLayout ptrFrame) {
ptrFrame.setLoadingMinTime(3000);
setHeaderTitle(R.string.ptr_demo_block_auto_fresh);
ptrFrame.postDelayed(new Runnable() {
@Override
public void run() {
ptrFrame.autoLoadMore(true);
}
}, 150);
}
开发者ID:tangnuo,项目名称:android-Ultra-Pull-To-Refresh-With-Load-More-master,代码行数:12,代码来源:AutoRefresh.java
示例12: initView
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
private void initView() {
listview = (ListView) findViewById(R.id.listview);
activity_view_ptrfresh_frame = (PtrClassicFrameLayout) findViewById(R.id.activity_view_ptrfresh_frame);
activity_view_ptrloadmore = (LoadMoreListViewContainer) findViewById(R.id.activity_view_ptrloadmore);
activity_view_ptrloadmore.useDefaultFooter();
activity_view_ptrloadmore.setShowLoadingForFirstPage(true);
activity_view_ptrloadmore.setLoadMoreHandler(new LoadMoreHandler() {
@Override
public void onLoadMore(LoadMoreContainer loadMoreContainer) {
workData();
}
});
}
示例13: setupViews
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Override
protected void setupViews(PtrClassicFrameLayout ptrFrame) {
setHeaderTitle(R.string.ptr_demo_enable_next_ptr_at_once);
ptrFrame.setEnabledNextPtrAtOnce(true);
ptrFrame.setPullToRefresh(false);
}
示例14: setupViews
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Override
protected void setupViews(PtrClassicFrameLayout ptrFrame) {
setHeaderTitle(R.string.ptr_demo_block_keep_header);
ptrFrame.setKeepHeaderWhenRefresh(true);
}
示例15: setupViews
import in.srain.cube.views.ptr.PtrClassicFrameLayout; //导入依赖的package包/类
@Override
protected void setupViews(PtrClassicFrameLayout ptrFrame) {
setHeaderTitle(R.string.ptr_demo_block_release_to_refresh);
ptrFrame.setPullToRefresh(false);
}