I am using the codes below to add vibration effects to Recycle view when I switch items, but I got the vibration to keep triggered the whole time I touch the Recycle View, I want it to activate vibrator only one time when items are changed.
recyclerView.setOnScrollChangeListener( new View.OnScrollChangeListener() {
@Override
public void onScrollChange(View view, int i, int i1, int i2, int i3) {
Vibrator v = (Vibrator) TeacherMain.this.getSystemService( Context.VIBRATOR_SERVICE);
v.vibrate(5);}
} );