There is an Adapter for RecyclerView :
class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { private String[] items = {"My items"}; public static class ViewHolder extends RecyclerView.ViewHolder { public View mTextView; public ViewHolder(View v) { super(v); mTextView = v; } } public MyAdapter(String[] myDataset) { //items = myDataset; } @Override public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_view_text_item, parent, false); ViewHolder vh = new ViewHolder(v); return vh; } @Override public void onBindViewHolder(ViewHolder holder, int position) { ((TextView)holder.mTextView.findViewById(R.id.textItemTextView)).setText(items[position]); } @Override public int getItemCount() { return items.length; } } The cells are of different heights and when scrolling this list, the slider on the right side of the screen changes its size and generally does not behave adequately, this is due to the fact that the cells are of different sizes. How to fix this? In iOS, the heightForRowAtIndexPath method is heightForRowAtIndexPath for each cell, and it returns its height, it makes the scroll height from this data, and I didn’t find this in Android.