I am implementing a RecyclerView with drag and drop functionality using ItemTouch.Callback. Right now the device vibrates slightly when I start dragging a ViewHolder.
How can I stop the device vibration when the drag begins?
I am implementing a RecyclerView with drag and drop functionality using ItemTouch.Callback. Right now the device vibrates slightly when I start dragging a ViewHolder.
How can I stop the device vibration when the drag begins?
Solved it by disabling haptic feedback of my ViewHolder.
public CustomViewHolder(View view)
{
super(view);
view.setHapticFeedbackEnabled(false);
}
You can also disable it for any view in XML by using the following.
android:hapticFeedbackEnabled="false"