1

I have used the following code to autoscroll the Horizontal recyclerview.

private final Runnable SCROLLING_RUNNABLE = new Runnable() {

        @Override
        public void run() {
            recyclerViewDate.smoothScrollBy(pixelsToMove, 0);
            setDateValue();
            mHandler.postDelayed(this, duration);
        }
    };


@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_center_item_finder);
        txtSelected=(TextView)findViewById(R.id.txtSelected);
        getRecyclerviewData();
        mHandler.postDelayed(SCROLLING_RUNNABLE, 100);
    }

But I'm not able to perform click on recycler items, while scrolling. Found this solution, created a custom recyclerview. Android - the item inside RecyclerView can't be clicked after scroll Still click not working.

Manikandan
  • 1,479
  • 6
  • 48
  • 89
  • I amde a custom class extend Recylerview and put this answer into this and it worked good for me. https://stackoverflow.com/a/46569656/5773037 – Nikunj Paradva May 22 '20 at 10:27

0 Answers0