public class

RecyclerViewTouchActionGuardManager

extends Object
java.lang.Object
   ↳ com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager

Class Overview

Hooks touch events to avoid unexpected scrolling.

Summary

Public Constructors
RecyclerViewTouchActionGuardManager()
Constructor.
Public Methods
void attachRecyclerView(RecyclerView rv)
Attaches android.support.v7.widget.RecyclerView instance.
boolean isEnabled()
Checks whether the touch guard feature is enabled.
boolean isInterceptScrollingWhileAnimationRunning()
Checks whether the interception of "vertical scroll while animation running" is enabled.
boolean isReleased()
Indicates this manager instance has released or not.
void release()
Detach the android.support.v7.widget.RecyclerView instance and release internal field references.
void setEnabled(boolean enabled)
Sets whether to use touch guard feature.
void setInterceptVerticalScrollingWhileAnimationRunning(boolean enabled)
Sets whether to use interception of "vertical scroll while animation running".
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public RecyclerViewTouchActionGuardManager ()

Constructor.

Public Methods

public void attachRecyclerView (RecyclerView rv)

Attaches android.support.v7.widget.RecyclerView instance.

Parameters
rv The android.support.v7.widget.RecyclerView instance

public boolean isEnabled ()

Checks whether the touch guard feature is enabled.

Returns
  • True for currently touch guard feature is enabled, otherwise false

public boolean isInterceptScrollingWhileAnimationRunning ()

Checks whether the interception of "vertical scroll while animation running" is enabled.

Returns
  • enabled / disabled

public boolean isReleased ()

Indicates this manager instance has released or not.

Returns
  • True if this manager instance has released

public void release ()

Detach the android.support.v7.widget.RecyclerView instance and release internal field references. This method should be called in order to avoid memory leaks.

public void setEnabled (boolean enabled)

Sets whether to use touch guard feature. If set false, all touch event interceptions will be disabled.

Parameters
enabled enabled / disabled

public void setInterceptVerticalScrollingWhileAnimationRunning (boolean enabled)

Sets whether to use interception of "vertical scroll while animation running".

Parameters
enabled enabled / disabled