当前位置: 首页>>代码示例>>Java>>正文


Java PtrClassicFrameLayout类代码示例

本文整理汇总了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);
}
 
开发者ID:tony-Shx,项目名称:Swface,代码行数:24,代码来源:ManageActivity.java

示例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);
            }
        });
    }
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:21,代码来源:ContentTextViewFragment.java

示例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);

    }
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:26,代码来源:ContentRecyclerViewFragment.java

示例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);

    }
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:21,代码来源:ContentGridViewFragment.java

示例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);

    }
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:21,代码来源:ContentListViewFragment.java

示例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;
}
 
开发者ID:dyhpoon,项目名称:Fo.dex,代码行数:18,代码来源:FodexBaseFragment.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:AutoRefresh.java

示例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);
    }
 
开发者ID:qianxinyi,项目名称:DripUltraRefreshWithLoad,代码行数:12,代码来源:AutoRefresh.java

示例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;
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:16,代码来源:BaseActivity.java

示例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);
        }
    });
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:16,代码来源:ContentScrollViewFragment.java

示例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();
        }
    });
}
 
开发者ID:Room3,项目名称:Retrofitdemo,代码行数:14,代码来源:MainActivity.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:EnableNextPTRAtOnce.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:KeepHeader.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:ReleaseToRefresh.java


注:本文中的in.srain.cube.views.ptr.PtrClassicFrameLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。