package com.jr.jingren.view; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.animation.DecelerateInterpolator; import android.widget.AdapterView; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.Scroller; /** * Created by Administrator on 2016/7/20. * 可滑动LinearLayout */ public class SlideView extends LinearLayout { private float mLastY = -1; private float xDistance, yDistance, xLast, yLast; private AdapterView<?> mAdapterView; private ScrollView mScrollView; private View scrollContent; private final int SCROLL_DURATION = 200; // 滚动回时间 private Scroller mScroller; private boolean isIntercept; public SlideView(Context context) { super(context); init(context); } public SlideView(Context context, AttributeSet attrs) { super(context, attrs); init(context); } public SlideView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(context); }
Android 可上下拖拽LinearLayout
最新推荐文章于 2024-06-16 20:00:52 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)