|
|
|
@ -4,6 +4,8 @@ import android.content.Context; |
|
|
|
import android.content.res.TypedArray; |
|
|
|
import android.content.res.TypedArray; |
|
|
|
import android.util.AttributeSet; |
|
|
|
import android.util.AttributeSet; |
|
|
|
import android.view.MotionEvent; |
|
|
|
import android.view.MotionEvent; |
|
|
|
|
|
|
|
import android.view.View; |
|
|
|
|
|
|
|
import android.view.ViewGroup; |
|
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull; |
|
|
|
import androidx.annotation.NonNull; |
|
|
|
import androidx.annotation.Nullable; |
|
|
|
import androidx.annotation.Nullable; |
|
|
|
@ -34,6 +36,7 @@ public class CustomRecyclerView extends RecyclerView { |
|
|
|
private void init(Context context, AttributeSet attrs) { |
|
|
|
private void init(Context context, AttributeSet attrs) { |
|
|
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CustomRecyclerView); |
|
|
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CustomRecyclerView); |
|
|
|
maxHeight = a.getLayoutDimension(R.styleable.CustomRecyclerView_maxHeight, maxHeight); |
|
|
|
maxHeight = a.getLayoutDimension(R.styleable.CustomRecyclerView_maxHeight, maxHeight); |
|
|
|
|
|
|
|
setOverScrollMode(View.OVER_SCROLL_NEVER); |
|
|
|
a.recycle(); |
|
|
|
a.recycle(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|