mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 16:10:58 +01:00
46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package eu.faircode.email;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.MotionEvent;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
public class FixedRecyclerView extends RecyclerView {
|
|
public FixedRecyclerView(@NonNull Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public FixedRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
|
super(context, attrs);
|
|
}
|
|
|
|
public FixedRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) {
|
|
super(context, attrs, defStyle);
|
|
}
|
|
|
|
@Override
|
|
public boolean onTouchEvent(MotionEvent e) {
|
|
try {
|
|
return super.onTouchEvent(e);
|
|
} catch (IllegalStateException ex) {
|
|
// Range start point not set
|
|
Log.w(ex);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public boolean onInterceptTouchEvent(MotionEvent e) {
|
|
try {
|
|
return super.onInterceptTouchEvent(e);
|
|
} catch (IllegalStateException ex) {
|
|
// Range start point not set
|
|
Log.w(ex);
|
|
return false;
|
|
}
|
|
}
|
|
}
|