Adapter

.getCount() - 1); } }); } private void initData() { mDataList = new ArrayList<>(); for (int i = 0; i < 10; i++) { mDataList.add("item " + i); } } private void initView() { mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view); mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); mAdapter = new MyAdapter(mDataList); mRecyclerView.setAdapter(mAdapter); } private class MyAdapter extends RecyclerView.Adapter { private List mDataList; public MyAdapter(List dataList) { mDataList = dataList; } @Override public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_recycler_view, parent, false); return new MyViewHolder(view); } @Override public void onBindViewHolder(MyViewHolder holder, int position) { holder.mTextView.setText(mDataList.get(position)); } @Override public int getItemCount() { return mDataList.size(); } public class MyViewHolder extends RecyclerView.ViewHolder { private TextView mTextView; public MyViewHolder(View itemView) { super(itemView); mTextView = (TextView) itemView.findViewById(R.id.text_view); } } }}

How it works
  • Submit an enquiry to a product.
  • Wait for a call from nearest supplier from your area.
  • Get quote and product details.
  • Choose best from them.
Recently Added Suppliers
New
Hydrant Valve Adapter
Sangam Engineers from Rajkot

Hydrant Valve Adapter .

530.00 519

per Piece