• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Options类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Options类属于uk.co.senab.actionbarpulltorefresh.library包,在下文中一共展示了Options类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: onCreate

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mPullToRefreshLayout = (PullToRefreshLayout) findViewById(R.id.ptr_layout);
    ActionBarPullToRefresh.from(this)
            .options(Options.create()
                    .scrollDistance(0.5f)
                    .headerLayout(R.layout.pong_header)
                    .headerTransformer(new PongHeaderTransformer())
                    .build())
            .allChildrenArePullable()
            .listener(this)
            .setup(mPullToRefreshLayout);
}
 
开发者ID:boztalay,项目名称:AndroidPullToPong,代码行数:17,代码来源:MainActivity.java


示例3: initializeRefreshOnDrag

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
private void initializeRefreshOnDrag(View rootView) {
  // Now find the PullToRefreshLayout to setup
  mPullToRefreshLayout = (PullToRefreshLayout) rootView.findViewById(R.id.ptr_layout);

  // Now setup the PullToRefreshLayout
  ActionBarPullToRefresh.from(getActivity()).options(Options.create().refreshOnUp(true).build())
      // Mark All Children as pullable
      .allChildrenArePullable()
          // Set a OnRefreshListener
      .listener(new OnRefreshListener() {
        @Override
        public void onRefreshStarted(View view) {
          fetchAll();
        }
      })
          // Finally commit the setup to our PullToRefreshLayout
      .setup(mPullToRefreshLayout);
}
 
开发者ID:Habitats,项目名称:bitcoupon,代码行数:19,代码来源:CouponListFragment.java


示例4: onCreateView

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState, boolean refresh) {
    View layout = inflater.inflate(getLayoutRes(), container, false);

    pullToRefreshLayout = (PullToRefreshLayout) layout.findViewById(R.id.ptr_layout);
    ActionBarPullToRefresh.SetupWizard setupWizard = ActionBarPullToRefresh.from(getActivity());
    setupWizard.allChildrenArePullable();
    setupWizard.listener(new OnRefreshListener() {
        @Override
        public void onRefreshStarted(View view) {
            refresh();
        }
    });

    setupWizard.setup(pullToRefreshLayout);
    setupWizard.options(Options.create().scrollDistance(0.75f).build());
    if (refresh) {
        refresh();
    }
    return layout;
}
 
开发者ID:tommynyquist,项目名称:codereview.chromium,代码行数:21,代码来源:BaseListFragment.java


示例5: onCreateView

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View layout = inflater.inflate(getLayoutRes(), container, false);
    pullToRefreshLayout = (PullToRefreshLayout) layout.findViewById(R.id.ptr_layout);
    ActionBarPullToRefresh.SetupWizard setupWizard = ActionBarPullToRefresh.from(getActivity());
    setupWizard.allChildrenArePullable();
    setupWizard.listener(new OnRefreshListener() {
        @Override
        public void onRefreshStarted(View view) {
            refresh();
        }
    });

    setupWizard.setup(pullToRefreshLayout);
    setupWizard.options(Options.create().scrollDistance(0.75f).build());
    refresh();
    return layout;
}
 
开发者ID:tommynyquist,项目名称:codereview.chromium,代码行数:19,代码来源:BaseFragment.java


示例6: onCreateView

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
		Bundle savedInstanceState) {
	View view = inflater.inflate(R.layout.cameras_gallery_fragment,
			container, false);
	mVibrator = (Vibrator) getActivity().getSystemService(Context.VIBRATOR_SERVICE);
	mAdapterView = (GridView) view.findViewById(R.id.grid_view_cameras);
	mEmptyGalleryTextView = (TextView) view.findViewById(R.id.text_view_no_favorites);
    mPullToRefreshLayout = (PullToRefreshLayout) view.findViewById(R.id.ptr_layout);

	mAdapterView.setOnItemClickListener(new CameraItemClickListener());
	mAdapterView.setOnItemLongClickListener(new CameraItemLongClickListener());

	if (savedInstanceState != null) {
		mCurrentIndex = savedInstanceState.getInt(
				Constants.BUNDLE_CURRENT_INDEX, 0);
	}

	mDrawerLayout = (DrawerLayout) getActivity().findViewById(R.id.drawer_layout);
	mDrawerList = (ExpandableListView) getActivity().findViewById(R.id.left_drawer);
	mActionBar = ((ActionBarActivity) getActivity()).getSupportActionBar();

	// Now setup the PullToRefreshLayout
    ActionBarPullToRefresh.from(getActivity())
           // Mark All Children as pullable
           .allChildrenArePullable()
           // Set the OnRefreshListener
           .listener(this)
           .options(Options.create().refreshOnUp(true).build())
           // Finally commit the setup to our PullToRefreshLayout
           .setup(mPullToRefreshLayout);

	return view;
}
 
开发者ID:emuneee,项目名称:nc-traffic-cams-open,代码行数:35,代码来源:CameraGalleryFragment.java


示例7: 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


示例8: 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


示例9: 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


示例10: onCreate

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_gridview);

    GridView gridView = (GridView) findViewById(R.id.ptr_gridview);
    ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,
            ITEMS);
    gridView.setAdapter(adapter);

    // Now find the PullToRefreshLayout and set it up
    mPullToRefreshLayout = (PullToRefreshLayout) findViewById(R.id.ptr_layout);
    ActionBarPullToRefresh.from(this)
            .options(Options.create()
                    // Here we make the refresh scroll distance to 75% of the GridView height
                    .scrollDistance(.75f)
                    // Here we define a custom header layout which will be inflated and used
                    .headerLayout(R.layout.customised_header)
                    // Here we define a custom header transformer which will alter the header
                    // based on the current pull-to-refresh state
                    .headerTransformer(new CustomisedHeaderTransformer())
                    .build())
            .allChildrenArePullable()
            .listener(this)
            // Here we'll set a custom ViewDelegate
            .useViewDelegate(GridView.class, new AbsListViewDelegate())
            .setup(mPullToRefreshLayout);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:29,代码来源:GridViewActivity.java


示例11: onViewCreated

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    gvStories.setAdapter(adapter);
    gvStories.setOnItemClickListener(this);
    ViewGroup viewGroup = (ViewGroup) view;

    // We need to create a PullToRefreshLayout manually
    mPullToRefreshLayout = new PullToRefreshLayout(viewGroup.getContext());

    // We can now setup the PullToRefreshLayout
    ActionBarPullToRefresh.from(getActivity())

            // We need to insert the PullToRefreshLayout into the Fragment's ViewGroup
            .insertLayoutInto(viewGroup)

                    // We need to mark the ListView and it's Empty View as pullable
                    // This is because they are not dirent children of the ViewGroup
            .theseChildrenArePullable(gvStories, gvStories.getEmptyView())

                    // We can now complete the setup as desired
            .listener(this)
    .options(Options.create()
            // Here we make the refresh scroll distance to 75% of the GridView height
            .scrollDistance(.5f).build())
    .setup(mPullToRefreshLayout);
}
 
开发者ID:UA-CS491-591,项目名称:WHNewsReader-Android,代码行数:28,代码来源:HomeActivity.java


示例12: getPullToRefreshOptions

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
protected Options getPullToRefreshOptions()
{
	if (!(getActivity() instanceof MainActivity))
		return Options.create().headerLayout(R.layout.ptr_profile_header).build();
	
	return super.getPullToRefreshOptions();
}
 
开发者ID:jonathangerbaud,项目名称:Klyph,代码行数:9,代码来源:KlyphFakeHeaderListFragment.java


示例13: 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


示例14: generatePullToRefreshOptions

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
protected Options generatePullToRefreshOptions() {
    return Options.create().scrollDistance(getScrollDistance()).build();
}
 
开发者ID:2fast2fourier,项目名称:something.apk,代码行数:5,代码来源:ThreadListFragment.java


示例15: generatePullToRefreshOptions

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
protected Options generatePullToRefreshOptions() {
    return Options.create().scrollDistance(getScrollDistance()).headerTransformer(header).refreshOnUp(true).build();
}
 
开发者ID:2fast2fourier,项目名称:something.apk,代码行数:5,代码来源:ThreadViewFragment.java


示例16: AbcPullToRefreshAttacher

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
protected AbcPullToRefreshAttacher(Activity activity, Options options) {
    super(activity, options);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:4,代码来源:AbcPullToRefreshAttacher.java


示例17: createPullToRefreshAttacher

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
protected PullToRefreshAttacher createPullToRefreshAttacher(Activity activity,
        Options options) {
    return new AbcPullToRefreshAttacher(activity, options);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:6,代码来源:PullToRefreshLayout.java


示例18: AbsPullToRefreshAttacher

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
protected AbsPullToRefreshAttacher(Activity activity, Options options) {
    super(activity, options);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:4,代码来源:AbsPullToRefreshAttacher.java


示例19: createPullToRefreshAttacher

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
@Override
protected PullToRefreshAttacher createPullToRefreshAttacher(Activity activity,
        Options options) {
    return new AbsPullToRefreshAttacher(activity, options);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:6,代码来源:PullToRefreshLayout.java


示例20: generatePullToRefreshOptions

import uk.co.senab.actionbarpulltorefresh.library.Options; //导入依赖的package包/类
protected Options generatePullToRefreshOptions(){
    return Options.create().build();
}
 
开发者ID:2fast2fourier,项目名称:FastLibrary,代码行数:4,代码来源:FastFragment.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LanguageRegistrar类代码示例发布时间:2022-05-21
下一篇:
Java IndexNameExpressionResolver类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap