本文整理汇总了Java中com.jcodecraeer.xrecyclerview.ProgressStyle类的典型用法代码示例。如果您正苦于以下问题:Java ProgressStyle类的具体用法?Java ProgressStyle怎么用?Java ProgressStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProgressStyle类属于com.jcodecraeer.xrecyclerview包,在下文中一共展示了ProgressStyle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupRecycleView
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
private void setupRecycleView() {
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecyclerView.setLayoutManager(layoutManager);
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallSpinFadeLoader);
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
onRecyclerViewResponseRefresh();
}
@Override
public void onLoadMore() {
onRecycleViewResponseLoadMore();
}
});
setupRecycleViewAndAdapter();
}
示例2: setupRecyclerView
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
private void setupRecyclerView() {
mRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(3,
StaggeredGridLayoutManager.VERTICAL));
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
mLoadIndex = 1;
startRefreshData();
}
@Override
public void onLoadMore() {
if (mDatas.size() <= 0) {
mRecyclerView.loadMoreComplete();
} else {
startLoadData();
}
}
});
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallSpinFadeLoader);
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
}
示例3: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
protected void init() {
mACache=ACache.get(context);
mErrorView = View.inflate(context, R.layout.error_view, null);
mNoNetWorkView = View.inflate(context, R.layout.no_network_view, null);
mEmptyView = View.inflate(context, R.layout.empty_view, null);
//mLoadingView=View.inflate(context,R.layout.loading_view,null);
LinearLayoutManager layoutManager = new LinearLayoutManager(context);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mXRecyclerView.setLayoutManager(layoutManager);
mXRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
mXRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
mXRecyclerView.setArrowImageView(R.mipmap.iconfont_downgrey);
mXRecyclerView.setLoadingListener(this);
mvpPresenter.loadData(ApiStores.NEWS_API_KEY, page);
}
示例4: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
protected void init() {
mACache=ACache.get(context);
mErrorView = View.inflate(context, R.layout.error_view, null);
mNoNetWorkView = View.inflate(context, R.layout.no_network_view, null);
mEmptyView = View.inflate(context, R.layout.empty_view, null);
//mLoadingView=View.inflate(context,R.layout.loading_view,null);
StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL);
mXRecyclerView.setLayoutManager(layoutManager);
mXRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
mXRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
mXRecyclerView.setArrowImageView(R.mipmap.iconfont_downgrey);
mXRecyclerView.setLoadingListener(this);
mvpPresenter.loadData(ApiStores.NEWS_API_KEY, page);
}
示例5: initData
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
protected void initData() {
id=getIntent().getIntExtra("id",0);
tvTitle.setText(getIntent().getStringExtra("name"));
ivLeft.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
LinearLayoutManager layoutManager = new LinearLayoutManager(context);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mXRecyclerView.setLayoutManager(layoutManager);
mXRecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
mXRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
mXRecyclerView.setArrowImageView(R.mipmap.iconfont_downgrey);
mXRecyclerView.setLoadingListener(this);
mvpPresenter.loadData(ApiStores.NEWS_API_KEY,id,page);
}
示例6: initView
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
protected void initView() {
mFABSearch = customFindViewById(R.id.fab_search);
LinearLayoutManager LayoutManager = new LinearLayoutManager(getContext());
mRecyclerView = customFindViewById(R.id.recyclerview);
mBookAdapter = new BookAdapter(getMContext(), new ArrayList<BookBean>());
mRecyclerView.setAdapter(mBookAdapter);
mRecyclerView.setLayoutManager(LayoutManager);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
switchAction(ACTION_REFRESH);
}
@Override
public void onLoadMore() {
switchAction(ACTION_LOAD_MORE);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallClipRotatePulse);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.SquareSpin);
mFABSearch.setOnClickListener(this);
initInputDialog();
dynamicAddSkinView(mFABSearch, "backgroundTint", R.color.colorAccent);
}
示例7: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
public void init() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mRecyclerView.setAdapter(new ShopCirRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例8: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
public void init() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
// mRecyclerView.setAdapter(new ShopCirRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
showEmptyView(R.layout.combo_empty);
}
示例9: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
public void init() {
mListener = new OnItemClickListener() {
@Override
public void onItemClick(int position) {
startActivity(new Intent(getActivity(), OrderDetailActivity.class), true);
}
};
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mRecyclerView.setAdapter(new OrderRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
}, 3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
}, 3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例10: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
public void init() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mRecyclerView.setAdapter(new ComboRecyclerViewAdapter(DummyContent.ITEMS, position -> {
}));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例11: initXRecyclerView
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
private void initXRecyclerView() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mAdapter=new ShopCartAdapter(DummyContent.ITEMS, null);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例12: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
public void init() {
mListener=new OnListFragmentInteractionListener() {
@Override
public void onListFragmentInteraction(DummyContent.DummyItem item) {
startActivity(new Intent(getActivity(), ShopActivity.class));
}
};
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mRecyclerView.setAdapter(new ShopRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例13: init
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
@Override
public void init() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
mRecyclerView.setAdapter(new OMYOListRecyclerViewAdapter(DummyContent.ITEMS, mListener));
mRecyclerView.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getActivity().getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mRecyclerView.loadMoreComplete();
}
},3000);
}
});
mRecyclerView.setRefreshProgressStyle(ProgressStyle.BallBeat);
mRecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例14: initRecylcer
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
private void initRecylcer() {
mXRecylcer.setLayoutManager(new LinearLayoutManager(context));
mXRecylcer.setAdapter(new ChargeRecordAdapter(DummyContent.ITEMS, position -> {
}));
mXRecylcer.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
//refresh data here
new Handler(getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mXRecylcer.refreshComplete();
}
},3000);
}
@Override
public void onLoadMore() {
// load more data here
new Handler(getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
mXRecylcer.loadMoreComplete();
}
},3000);
}
});
mXRecylcer.setRefreshProgressStyle(ProgressStyle.BallBeat);
mXRecylcer.setLoadingMoreProgressStyle(ProgressStyle.BallPulseSync);
}
示例15: setLinearLayout
import com.jcodecraeer.xrecyclerview.ProgressStyle; //导入依赖的package包/类
public void setLinearLayout(Context context, XRecyclerView mRecy) {
LinearLayoutManager layoutManager = new LinearLayoutManager(context);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecy.setLayoutManager(layoutManager);
//设置分隔线
// mRecy.addItemDecoration(new SpacesItemDecoration(1));
mRecy.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
mRecy.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
mRecy.setArrowImageView(R.drawable.abc_icon_down_arrow);
}