本文整理汇总了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);
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}