本文整理汇总了Java中com.jude.easyrecyclerview.EasyRecyclerView类的典型用法代码示例。如果您正苦于以下问题:Java EasyRecyclerView类的具体用法?Java EasyRecyclerView怎么用?Java EasyRecyclerView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EasyRecyclerView类属于com.jude.easyrecyclerview包,在下文中一共展示了EasyRecyclerView类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
private void init() {
personList = new ArrayList<>();
mAdapter = new PersonAdapter();
btn_send = (Button) this.findViewById(R.id.btn_send);
tips = (TextView) this.findViewById(R.id.tips);
btn_send_more = (Button) this.findViewById(R.id.btn_send_more);
btn_improt = (Button) this.findViewById(R.id.btn_improt);
phoneEt = (EditText) this.findViewById(R.id.phoneNumberEt);
contextEt = (EditText) this.findViewById(R.id.contextEt);
rg_all = (RadioGroup) this.findViewById(R.id.rg_all);
rv_list = (EasyRecyclerView) this.findViewById(R.id.rv_list);
progressDialog = new ProgressDialog(this);
btn_send.setOnClickListener(this);
btn_improt.setOnClickListener(this);
btn_send_more.setOnClickListener(this);
LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);
rv_list.setLayoutManager(mLayoutManager);
rv_list.setItemAnimator(new DefaultItemAnimator());
rv_list.setAdapter(mAdapter);
rg_all.setOnCheckedChangeListener(this);
}
示例2: onViewCreated
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mRecyclerView = (EasyRecyclerView) view.findViewById(R.id.recycler_fragment_comment);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mRecyclerView.setRefreshListener(this);
mAdatper = new CommentAdatper(getActivity());
mRecyclerView.setAdapterWithProgress(mAdatper);
mAdatper.setMore(R.layout.view_moreprogress, this);
mTopic = (Topic) getArguments().getSerializable("topic");
fetchData();
addHeader();
mAdatper.notifyDataSetChanged();
page = 1;
}
示例3: initWidget
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
private void initWidget(){
EasyRecyclerView recyclerView=(EasyRecyclerView)findViewById(R.id.rv);
DownAdapter adapter=new DownAdapter(this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
adapter.addAll(listData);
}
示例4: initView
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
private void initView() {
inflate(getContext(), R.layout.view_girls_content, this);
mNetworkErrorLayout = (ViewStub) findViewById(R.id.network_error_layout);
mGirlsRecyclerView = (EasyRecyclerView) findViewById(R.id.girls_recycler_view);
StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
mGirlsRecyclerView.setLayoutManager(staggeredGridLayoutManager);
mAdapter = new GirlsAdapter(getContext());
mGirlsRecyclerView.setAdapterWithProgress(mAdapter);
mGirlsRecyclerView.setRefreshingColor(
ContextCompat.getColor(getContext(), R.color.colorPrimary),
ContextCompat.getColor(getContext(), android.R.color.holo_blue_light),
ContextCompat.getColor(getContext(), android.R.color.holo_green_light)
);
mAdapter.setMore(R.layout.layout_load_more, this);
mAdapter.setNoMore(R.layout.layout_load_no_more);
mAdapter.setError(R.layout.layout_load_error);
mAdapter.setOnMyItemClickListener(new GirlsAdapter.OnMyItemClickListener() {
@Override
public void onItemClick(int position, BaseViewHolder holder) {
Intent intent = new Intent(Utils.getActivity(GirlsView.this), GirlActivity.class);
intent.putParcelableArrayListExtra(Constants.INTENT_GIRLS, mData);
intent.putExtra(Constants.INTENT_INDEX, position);
ActivityOptionsCompat options = ActivityOptionsCompat.makeScaleUpAnimation(holder.itemView, holder.itemView.getWidth() / 2, holder.itemView.getHeight() / 2, 0, 0);
Utils.getActivity(GirlsView.this).startActivity(intent, options.toBundle());
}
});
mGirlsRecyclerView.setRefreshListener(this);
mData = new ArrayList<>();
mActive = true;
}
示例5: createView
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
/**
* 初始化Recycleview
*/
public EasyRecyclerView createView(final Activity activity) {
cacheDir = activity.getCacheDir();
mAdapter = new TabHomeAdapter(activity);
final View view = activity.getLayoutInflater().inflate(R.layout.incd_content_recycleview, null);
mrecyclerView = ButterKnife.findById(view, R.id.recycler_view);
//
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(activity);
mrecyclerView.setLayoutManager(linearLayoutManager);
mrecyclerView.setAdapterWithProgress(mAdapter);
//
SpaceDecoration itemDecoration = new SpaceDecoration(DensityUtil.dip2px(activity, 5));//参数是距离宽度
itemDecoration.setPaddingEdgeSide(false);//是否为左右2边添加padding.默认true.
itemDecoration.setPaddingStart(true);//是否在给第一行的item添加上padding(不包含header).默认true.
itemDecoration.setPaddingHeaderFooter(false);//是否对Header于Footer有效,默认false.
mrecyclerView.addItemDecoration(itemDecoration);
//
mAdapter.setMore(R.layout.load_more_layout, this);
mAdapter.setNoMore(R.layout.no_more_layout);
mAdapter.setError(R.layout.error_layout);
mAdapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
//跳转到电视剧
JumpActivityUtil.JumpPageDetail(position, activity, mAdapter);
}
});
onRefresh();
mrecyclerView.setRefreshListener(this);
return mrecyclerView;
}
示例6: createView
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
/**
* 初始化Recycleview
*/
public EasyRecyclerView createView(final Activity activity) {
cacheDir = activity.getCacheDir();
mAdapter = new TabHomeAdapter(activity);
final View view = activity.getLayoutInflater().inflate(R.layout.incd_content_recycleview, null);
mrecyclerView = ButterKnife.findById(view, R.id.recycler_view);
//
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(activity);
mrecyclerView.setLayoutManager(linearLayoutManager);
//
SpaceDecoration itemDecoration = new SpaceDecoration(DensityUtil.dip2px(activity, 5));//参数是距离宽度
itemDecoration.setPaddingEdgeSide(false);//是否为左右2边添加padding.默认true.
itemDecoration.setPaddingStart(true);//是否在给第一行的item添加上padding(不包含header).默认true.
itemDecoration.setPaddingHeaderFooter(false);//是否对Header于Footer有效,默认false.
mrecyclerView.addItemDecoration(itemDecoration);
//
mAdapter.setMore(R.layout.load_more_layout, this);
mAdapter.setNoMore(R.layout.no_more_layout);
mAdapter.setError(R.layout.error_layout);
mrecyclerView.setAdapterWithProgress(mAdapter);
mAdapter.setOnItemClickListener(new RecyclerArrayAdapter.OnItemClickListener() {
@Override
public void onItemClick(int position) {
//跳转到电视剧
JumpActivityUtil.JumpPageDetail(position, activity, mAdapter);
}
});
onRefresh();
mrecyclerView.setRefreshListener(this);
return mrecyclerView;
}
示例7: initWidget
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
private void initWidget() {
EasyRecyclerView recyclerView = (EasyRecyclerView) findViewById(R.id.rv);
DownAdapter adapter = new DownAdapter(this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
adapter.addAll(listData);
}
示例8: onViewCreated
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mRecyclerView = (EasyRecyclerView) view.findViewById(R.id.recycler_fragment_topic);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mAdapter = new TopicAdapter(getActivity());
mRecyclerView.setAdapterWithProgress(mAdapter);
mRecyclerView.setRefreshListener(this);
mAdapter.setMore(R.layout.view_moreprogress, this);
mAdapter.setNoMore(R.layout.view_nomore);
fetchData();
page=1;
}
示例9: getRvEasy
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
public EasyRecyclerView getRvEasy() {
return rvEasy;
}
示例10: getListView
import com.jude.easyrecyclerview.EasyRecyclerView; //导入依赖的package包/类
public EasyRecyclerView getListView() {
return evMore;
}