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


Java Options.create方法代码示例

本文整理汇总了Java中uk.co.senab.actionbarpulltorefresh.library.Options.create方法的典型用法代码示例。如果您正苦于以下问题:Java Options.create方法的具体用法?Java Options.create怎么用?Java Options.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在uk.co.senab.actionbarpulltorefresh.library.Options的用法示例。


在下文中一共展示了Options.create方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initPullToRefreshLayout

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入方法依赖的package包/类
private void initPullToRefreshLayout() {
    Options.Builder ptrOptions = Options.create();
    ptrOptions.refreshOnUp(true);
    ptrOptions.scrollDistance(0.4f);

    ActionBarPullToRefresh.from(getActivity()).theseChildrenArePullable(R.id.timeline_list, R.id.loading_layout).options(ptrOptions.build()).
            listener(new OnRefreshListener() {
        @Override
        public void onRefreshStarted(View view) {
            initPageFromCache();
            mIsLastPage = false;
            if (mIsInFavArticle) {
                pullFavArticles(false);
            } else {
                pullTimeline();
            }

        }
    }).setup(mPullToRefreshLayout);
}
 
开发者ID:ragnraok,项目名称:MonoReader,代码行数:21,代码来源:TimelineFragment.java

示例2: initPtrLayout

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入方法依赖的package包/类
private void initPtrLayout() {
    Options.Builder ptrOptions = Options.create();
    ptrOptions.refreshOnUp(true);
    ptrOptions.scrollDistance(0.4f);

    ActionBarPullToRefresh.from(getActivity()).theseChildrenArePullable(mSiteList.getWrappedList()).options(ptrOptions.build()).
            listener(new OnRefreshListener() {
                @Override
                public void onRefreshStarted(View view) {
                    loadSiteList();

                }
            }).setup(mPtrLayout);
    loadSiteList();
}
 
开发者ID:ragnraok,项目名称:MonoReader,代码行数:16,代码来源:SiteListFragment.java

示例3: initPtrLayout

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入方法依赖的package包/类
private void initPtrLayout() {
    Options.Builder ptrOptions = Options.create();
    ptrOptions.refreshOnUp(true);
    ptrOptions.scrollDistance(0.4f);

    ActionBarPullToRefresh.from(this).theseChildrenArePullable(R.id.timeline_list).options(ptrOptions.build()).
            listener(new OnRefreshListener() {
                @Override
                public void onRefreshStarted(View view) {
                    resetTimeline();
                }
            }).setup(mPtrLayout);
}
 
开发者ID:ragnraok,项目名称:MonoReader,代码行数:14,代码来源:CategoryTimelineActivity.java

示例4: initPtrLayout

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入方法依赖的package包/类
private void initPtrLayout() {
    Options.Builder ptrOptions = Options.create();
    ptrOptions.refreshOnUp(true);
    ptrOptions.scrollDistance(0.4f);

    ActionBarPullToRefresh.from(this).theseChildrenArePullable(R.id.article_list, R.id.loading_layout).options(ptrOptions.build()).
            listener(new OnRefreshListener() {
                @Override
                public void onRefreshStarted(View view) {
                    resetArticleList();
                }
            }).setup(mPtrLayout);
}
 
开发者ID:ragnraok,项目名称:MonoReader,代码行数:14,代码来源:SiteArticleListActivity.java

示例5: onCreateView

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入方法依赖的package包/类
@Override
public
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
    super.onCreateView(inflater, container, savedInstanceState);

    FeedsActivity activity = (FeedsActivity) getActivity();
    PullToRefreshLayout layout = (PullToRefreshLayout) inflater.inflate(R.layout.viewpager, container, false);

    // Find and configure the ViewPager.
    s_viewPager = (ViewPager) layout.findViewById(R.id.viewpager);
    s_viewPager.setOffscreenPageLimit(128);
    s_viewPager.setOnPageChangeListener(new OnPageChangeListener());

    // Create the Options object for the ActionBarPullToRefresh SetupWizard.
    Options.Builder optionsBuilder = Options.create();
    optionsBuilder.scrollDistance(PULL_DISTANCE);
    Options options = optionsBuilder.build();

    // Create the ActionBarPullToRefresh object using its SetupWizard.
    ActionBarPullToRefresh.SetupWizard setup = ActionBarPullToRefresh.from(activity);
    setup.allChildrenArePullable();
    setup.options(options);
    setup.useViewDelegate(ViewPager.class, new ViewPagerDelegate());
    setup.listener(new RefreshListener(activity));
    setup.setup(layout);

    return layout;
}
 
开发者ID:DarkangelKid,项目名称:rss,代码行数:30,代码来源:FragmentFeeds.java


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