闲来蛋疼写个qq侧滑删除

话说这也不是我自己发明的,参考谁来着也忘了,用起来方便,可控性也强,代码也易懂

直接上代码

MainActivity 我就不说了实例化控件初始化adapter main的布局里面就一个RecycleView也不贴了

 
 
public class MainActivity extends AppCompatActivity {
    private RecyclerView recyclerView;

    private RecycleAdapter recycleAdapter;
    private List<DataBean> list = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();

    }

    private void initView() {
        recyclerView = (RecyclerView) findViewById(R.id.recycleview);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        list= Datas.getDatas();
        recycleAdapter = new RecycleAdapter(MainActivity.this,list);
        recyclerView.setAdapter(recycleAdapter);
    }
}
下面是adapter

public class RecycleAdapter extends RecyclerView.Adapter<RecycleAdapter.MyViewHolder>{
    private Context mMontext;
    private List<DataBean> beanList;
    public RecycleAdapter(Context context, List<DataBean> list){
        this.mMontext=context;
        this.beanList=list;

    }
    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View itemView= LayoutInflater.from(mMontext).inflate(R.layout.item_rec_view,null);
        return new MyViewHolder(itemView);
    }

    @Override
    public void onBindViewHolder(final MyViewHolder holder, final int position) {
        final DataBean dataBean=beanList.get(position);
        Glide.with(mMontext).load(dataBean.getImgUrl()).into(holder.iv_avatar);
        holder.tv_title.setText(dataBean.getName());
        holder.tv_subTitle.setText(dataBean.getContent());

        holder.contentView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                Toast.makeText(mMontext, dataBean.getContent(), Toast.LENGTH_SHORT).show();
            }
        });
        holder.view_del.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                beanList.remove(position);
                notifyDataSetChanged();
            }
        });

        holder.tv_top.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                DataBean data = beanList.get(position);
                beanList.remove(position);
                beanList.add(0, data);
                notifyDataSetChanged();
            }
        });
        holder.view_edit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                holder.swipeMenuLayout.collapseSmooth();
                Toast.makeText(mMontext, "编辑", Toast.LENGTH_SHORT).show();

            }
        });

    }

    @Override
    public int getItemCount() {
        return beanList.size();
    }


    class MyViewHolder extends RecyclerView.ViewHolder{
        TextView tv_title;
        TextView tv_subTitle;
        TextView view_del;
        TextView view_edit;
        TextView tv_top;
        ImageView iv_avatar;
        SwipeMenuLayout swipeMenuLayout;
        View contentView;

        private MyViewHolder(View itemView) {
            super(itemView);
            tv_title = (TextView) itemView.findViewById(R.id.item_tv_title);
            tv_subTitle = (TextView) itemView.findViewById(R.id.item_tv_subTitle);
            tv_top = (TextView) itemView.findViewById(R.id.item_tv_top);
            contentView = itemView.findViewById(R.id.item_content);

            view_del = (TextView) itemView.findViewById(R.id.item_tv_del);
            view_edit = (TextView) itemView.findViewById(R.id.item_tv_edit);
            swipeMenuLayout = (SwipeMenuLayout) itemView.findViewById(R.id.item_layout_swip);
            iv_avatar = (ImageView) itemView.findViewById(R.id.item_avatar);
        }
    }
}

这个item布局有必要贴出来因为主要靠他里面的一个控件来实现的

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:qdx="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.swipemenulayoutdeleted.SwipeMenuLayout
        android:id="@+id/item_layout_swip"
        android:layout_width="match_parent"
        android:layout_height="70dp"
        qdx:isLeftMenu="false">//设置侧滑从那边,这个设置false就是从右边划出来,这个控件是自定义的下面会贴出来


        <LinearLayout
            android:id="@+id/item_content"
            android:layout_width="match_parent"
            android:layout_height="70dp"
            android:background="?android:attr/selectableItemBackground"
            android:orientation="horizontal">


            <ImageView
                android:id="@+id/item_avatar"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_margin="10dp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                android:paddingBottom="10dp"
                android:paddingTop="10dp">

                <TextView
                    android:id="@+id/item_tv_title"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:gravity="center_vertical"
                    android:textColor="#000"
                    android:textSize="18sp"
                    tools:text="雷军" />

                <TextView
                    android:id="@+id/item_tv_subTitle"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:gravity="center_vertical"
                    android:singleLine="true"
                    android:textColor="#808080"
                    android:textSize="15sp"
                    tools:text="how are you?" />
            </LinearLayout>


        </LinearLayout>

        <TextView
            android:id="@+id/item_tv_top"
            android:layout_width="85dp"
            android:layout_height="match_parent"
            android:background="#c7c7cd"
            android:gravity="center"
            android:onClick="btn_del"
            android:text="置顶"
            android:textColor="#fff" />

        <TextView
            android:id="@+id/item_tv_edit"
            android:layout_width="85dp"
            android:layout_height="70dp"
            android:background="#ff9d00"
            android:gravity="center"
            android:onClick="btn_edit"
            android:text="编辑"
            android:textColor="#fff" />

        <TextView
            android:id="@+id/item_tv_del"
            android:layout_width="85dp"
            android:layout_height="70dp"
            android:background="#ff3a30"
            android:gravity="center"
            android:onClick="btn_del"
            android:text="删除"
            android:textColor="#fff" />


    </com.swipemenulayoutdeleted.SwipeMenuLayout>


    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#eceded" />
</LinearLayout>
自定义SwipeMenuLayout

public class SwipeMenuLayout extends ViewGroup {
    public SwipeMenuLayout(Context context) {
        this(context, null);
    }

    public SwipeMenuLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public SwipeMenuLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);

        TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.SwipeMenuLayout, defStyleAttr, 0);
        int count = ta.getIndexCount();
        for (int i = 0; i < count; i++) {
            int attr = ta.getIndex(i);
            if (attr == R.styleable.SwipeMenuLayout_isLeftMenu) {
                isLeftMenu = ta.getBoolean(attr, true);
            } else if (attr == R.styleable.SwipeMenuLayout_enableParentLongClick) {
                enableParentLongClick = ta.getBoolean(attr, false);
            } else if (attr == R.styleable.SwipeMenuLayout_expandRatio) {
                expandRatio = ta.getFloat(attr, 0.3f);
            } else if (attr == R.styleable.SwipeMenuLayout_collapseRatio) {
                collapseRatio = 1 - ta.getFloat(attr, 0.3f);
            } else if (attr == R.styleable.SwipeMenuLayout_expandDuration) {
                expandDuration = ta.getInt(attr, 150);
            } else if (attr == R.styleable.SwipeMenuLayout_collapseDuration) {
                collapseDuration = ta.getInt(attr, 150);
            }
        }
        ta.recycle();


        mScaleTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
        mMaxVelocity = ViewConfiguration.get(context).getScaledMaximumFlingVelocity();
    }

    private int mExpandLimit;//展开的阈值
    private int mCollapseLimit;//关闭的阈值
    private float expandRatio = 0.3f;
    private float collapseRatio = 0.7f;

    private int expandDuration = 150;
    private int collapseDuration = 150;

    private boolean isLeftMenu = true;     //左侧为菜单

    private int mWidthofMenu;       //菜单布局宽度
    private boolean isExpand = false;       //菜单是否打开
    private boolean isClickEvent = true;    //是否是单击事件

    private int mScaleTouchSlop;            //滑动的最小判断距离
    private int mMaxVelocity;               //scrollView抛掷的最大速度
    private VelocityTracker mVelocityTracker;//滑动速度变量
    private int mPointerId;                 //多点触摸只算第一根手指的速度


    private static boolean sIsTouching = false;         //是否已经有手指触碰。防止第二个手指捣乱
    private static SwipeMenuLayout sSwipeMenuLayout;    //静态类写入内存共享。用来判断当前界面是否有menu打开

    private boolean enableParentLongClick = false;//拦截子类的点击事件,给父类享用

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        setClickable(true);

        mWidthofMenu = 0;       //防止多次measure导致累加
        int widthOfContent = 0;//content的宽度
        int heightOfContent = 0;//content的高度
        int childCount = getChildCount();
        for (int i = 0; i < childCount; i++) {
            View childView = getChildAt(i);
            childView.setClickable(true);
            if (childView.getVisibility() == GONE)
                continue;

            measureChild(childView, widthMeasureSpec, heightMeasureSpec);
            heightOfContent = Math.max(heightOfContent, childView.getMeasuredHeight());
            if (i == 0) {
                widthOfContent = getMeasuredWidth();
            } else {
                mWidthofMenu += childView.getMeasuredWidth();
            }

        }

        mExpandLimit = (int) (mWidthofMenu * expandRatio);
        mCollapseLimit = (int) (mWidthofMenu * collapseRatio);
        setMeasuredDimension(widthOfContent, heightOfContent);
    }


    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        int childCount = getChildCount();
        int left = l;
        int right = r;
        for (int i = 0; i < childCount; i++) {
            View childView = getChildAt(i);
            if (childView.getVisibility() == GONE)
                continue;
            if (i == 0) {
                childView.layout(left, getPaddingTop(), left + childView.getMeasuredWidth(), getPaddingTop() + childView.getMeasuredHeight());
            } else {
                if (isLeftMenu) {
                    childView.layout(left - childView.getMeasuredWidth(), getPaddingTop(), left, getPaddingTop() + childView.getMeasuredHeight());
                    left = left - childView.getMeasuredWidth();
                } else {//菜单在右边
                    childView.layout(right, getPaddingTop(), right + childView.getMeasuredWidth(), getPaddingTop() + childView.getMeasuredHeight());
                    right = right + childView.getMeasuredWidth();
                }
            }
        }
    }


    @Override
    public LayoutParams generateLayoutParams(AttributeSet attrs) {
        return new MarginLayoutParams(getContext(), attrs);
    }

    private PointF mPointDownF = new PointF();//记录手指第一次点击down的位置
    private PointF mPointGapF = new PointF();//用来设置scrollX,即展开/关闭menu

    private boolean isInterceptTouch = false;//已经有menu打开,再次点击的时候需要拦截父滑动事件,还要拦截子view事件
    private boolean isInterceptParent = false;//是否拦截了父滑动,即是否要自己要处理滑动

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        if (null == mVelocityTracker) {
            mVelocityTracker = VelocityTracker.obtain();
        }
        mVelocityTracker.addMovement(ev);
        switch (ev.getAction()) {
            case MotionEvent.ACTION_DOWN://如果return false,那么后续事件将不会传达到此
                if (sIsTouching) {
                    return false;
                }
                sIsTouching = true;
                isClickEvent = true;        //down的时候默认为单击事件
                isInterceptTouch = false;   //没有menu开启
                isInterceptParent = false;  //不拦截父类滑动


                if (sSwipeMenuLayout != null) {//判断一下是否有Menu已经开启过了
                    if (sSwipeMenuLayout != this) {
                        sSwipeMenuLayout.collapseSmooth();
                        sIsTouching = false;

                        getParent().requestDisallowInterceptTouchEvent(true);//如果已经有menu打开,不让父类拦截down事件
                        isInterceptTouch = true;//有menu开启了.
                        //return false;
                        //如果down事件return false,后面一系列事件不再进入。只能交给parent,这样的话parent就能滑动了
                        //所以只能先拦截父类,然后自己move/up不处理,子view也不给它处理。
                    }

                }
                mPointGapF.x = ev.getX();

                mPointDownF.x = ev.getX();
                mPointDownF.y = ev.getY();
                mPointerId = ev.getPointerId(0);
                break;
            case MotionEvent.ACTION_MOVE:
                if (isInterceptTouch) {
                    return false;//已经有menu开启,不处理事件,也不给子view处理
                }
                isClickEvent = (Math.abs(mPointDownF.x - ev.getX()) < mScaleTouchSlop);//判断是否为点击事件

                float gapX = mPointDownF.x - ev.getX();
                float gapY = mPointDownF.y - ev.getY();

                if (Math.abs(gapX) < mScaleTouchSlop && Math.abs(gapX) > Math.abs(gapY) * 2f) {
                    isInterceptParent = true;
                } else if (Math.abs(gapX) > mScaleTouchSlop || Math.abs(getScrollX()) > mScaleTouchSlop) {
                    isInterceptParent = true;
                }

                if (!isInterceptParent) {
                    break;
                }

                getParent().requestDisallowInterceptTouchEvent(true);
                scrollBy((int) (mPointGapF.x - ev.getX()), 0);
                mPointGapF.x = ev.getX();
                if (isLeftMenu) {//如果左边是菜单,允许向右滑动
                    if (-getScrollX() < 0) {//向右滑动getScrollX()是<0的
                        scrollTo(0, 0);
                        isExpand = false;
                    }
                    if (getScrollX() <= -mWidthofMenu) {
                        scrollTo(-mWidthofMenu, 0);
                        isExpand = true;
                    }

                } else {//右边是菜单,向左滑动
                    if (getScrollX() < 0) {//向左滑动getScrollX()是>0的
                        scrollTo(0, 0);
                        isExpand = false;
                    }
                    if (getScrollX() >= mWidthofMenu) {
                        scrollTo(mWidthofMenu, 0);
                        isExpand = true;
                    }
                }


                break;
            case MotionEvent.ACTION_CANCEL:
            case MotionEvent.ACTION_UP:
                sIsTouching = false;
                if (isInterceptTouch) {
                    return false;
                }

                mVelocityTracker.computeCurrentVelocity(1000, mMaxVelocity);
                final float velocityX = mVelocityTracker.getXVelocity(mPointerId);


                if (isLeftMenu) {//左侧是菜单
                    if (!isExpand) { //如果还没展开
                        if (-getScrollX() > mExpandLimit || (velocityX > 1000 && isInterceptParent)) {
                            expandSmooth();
                        } else {
                            collapseSmooth();
                        }
                    } else {//已经展开的
                        if (-getScrollX() < mCollapseLimit || (velocityX < -1000 && isInterceptParent)) {
                            collapseSmooth();
                        } else if (!isClickEvent) {
                            expandSmooth();
                        } else if (ev.getX() > -getScrollX()) {
                            collapseSmooth();
                        }

                    }

                } else { //右侧是菜单
                    if (!isExpand) { //如果还没展开
                        if (getScrollX() > mExpandLimit || (velocityX < -1000 && isInterceptParent)) {
                            expandSmooth();
                        } else {
                            collapseSmooth();
                        }
                    } else {//已经展开的
                        if (getScrollX() < mCollapseLimit || (velocityX > 1000 && isInterceptParent)) {
                            collapseSmooth();
                        } else if (!isClickEvent) {//如果是滑动
                            expandSmooth();
                        } else if (ev.getX() < getWidth() - getScrollX()) {
                            collapseSmooth();
                        }
                    }

                }

                //释放eVelocityTracker
                releaseVelocityTracker();
                break;
        }


        return super.dispatchTouchEvent(ev);
    }

    /**
     * 事件拦截,即事件不传递给子view
     */
    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {

        if (isInterceptTouch || (!isInterceptParent && !isClickEvent) || !isClickEvent) {//如果滑动了或已经有菜单打开,就不分发给子view
            return true;
        } else if (isExpand) {//如果是点击,且除了menu范围,其他都拦截
            if (isLeftMenu && ev.getX() > mWidthofMenu) {
                return true;
            } else if (!isLeftMenu && ev.getX() < getWidth() - mWidthofMenu) {
                return true;
            }
        } else if (enableParentLongClick) {
            return true;
        }


        return super.onInterceptTouchEvent(ev);
    }

    /**
     * 处理长按拖拽事件,展开menu的时候不能长按
     */
    @Override
    public boolean performLongClick() {
        if (Math.abs(getScrollX()) > mScaleTouchSlop || isInterceptTouch) {
            return false;
        }
        return super.performLongClick();
    }

    /**
     * 平滑展开
     */
    private ValueAnimator mExpandAnim, mCollapseAnim;

    public void expandSmooth() {
        sSwipeMenuLayout = SwipeMenuLayout.this;
        cancelAnim();
        mExpandAnim = ValueAnimator.ofInt(getScrollX(), isLeftMenu ? -mWidthofMenu : mWidthofMenu);
        mExpandAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scrollTo((Integer) animation.getAnimatedValue(), 0);
            }
        });
        mExpandAnim.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                isExpand = true;

            }
        });
        mExpandAnim.setInterpolator(new LinearInterpolator());
        mExpandAnim.setDuration(expandDuration).start();
    }

    /**
     * 平滑关闭
     */
    public void collapseSmooth() {
        sSwipeMenuLayout = null;
        cancelAnim();

        mCollapseAnim = ValueAnimator.ofInt(getScrollX(), 0);
        mCollapseAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public void onAnimationUpdate(ValueAnimator animation) {
                scrollTo((Integer) animation.getAnimatedValue(), 0);
            }
        });
        mCollapseAnim.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                isExpand = false;
            }
        });
        mCollapseAnim.setInterpolator(new AccelerateInterpolator());
        mCollapseAnim.setDuration(collapseDuration).start();
    }

    /**
     * 每次执行动画之前都应该先取消之前的动画
     */
    private void cancelAnim() {
        if (mCollapseAnim != null && mCollapseAnim.isRunning()) {
            mCollapseAnim.cancel();
        }
        if (mExpandAnim != null && mExpandAnim.isRunning()) {
            mExpandAnim.cancel();
        }
    }

    private void releaseVelocityTracker() {
        if (null != mVelocityTracker) {
            mVelocityTracker.clear();
            mVelocityTracker.recycle();
            mVelocityTracker = null;
        }
    }

    @Override
    protected void onDetachedFromWindow() {
        if (sSwipeMenuLayout != null) {
            sSwipeMenuLayout.collapseInstant();
            sSwipeMenuLayout = null;
        }
        super.onDetachedFromWindow();
    }

    /**
     * 立刻关闭,不显示动画
     */
    public void collapseInstant() {
        if (this == sSwipeMenuLayout) {
            cancelAnim();
            sSwipeMenuLayout.scrollTo(0, 0);
            sSwipeMenuLayout = null;
        }
    }

    public void setLeftMenu(boolean leftMenu) {
        isLeftMenu = leftMenu;
    }

    public void setEnableParentLongClick(boolean enableParentLongClick) {
        this.enableParentLongClick = enableParentLongClick;
    }

    public void setExpandRatio(float expandRatio) {
        this.expandRatio = expandRatio;
    }

    public void setCollapseRatio(float collapseRatio) {
        this.collapseRatio = 1 - collapseRatio;
    }

    public void setExpandDuration(int expandDuration) {
        this.expandDuration = expandDuration;
    }

    public void setCollapseDuration(int collapseDuration) {
        this.collapseDuration = collapseDuration;
    }

}
attr.xml资源文件

<resources>
    <declare-styleable name="SwipeMenuLayout">
        <attr name="isLeftMenu" format="boolean" />
        <attr name="enableParentLongClick" format="boolean" />

        <attr name="expandRatio" format="float" />
        <attr name="collapseRatio" format="float" />

        <attr name="collapseDuration" format="integer" />
        <attr name="expandDuration" format="integer" />
    </declare-styleable>
</resources>
 下面是造的数据一个Bean一个造的数据类 

public class DataBean {
    public DataBean(String name, String content, String imgId) {
        this.name = name;
        this.content = content;
        this.imgUrl = imgId;
    }

    private String name;
    private String content;
    private String imgUrl;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }
}

public class Datas {

    public static List<DataBean> getDatas() {
        List<DataBean> dataBeanList = new ArrayList<>();

        dataBeanList.add(new DataBean("科比.布莱恩特", "见过凌晨四点的洛杉矶吗?", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3142209274,1753676811&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德维恩.韦德", "This Is My Hours !", "https://imgsa.baidu.com/forum/pic/item/ab18972bd40735fa37677c8f95510fb30f240874.jpg"));
        dataBeanList.add(new DataBean("克里斯.保罗", "是时候体验下西决了!", "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1882901515,1514764982&fm=58&u_exp_0=1315867900,1181459572&fm_exp_0=86&bpow=800&bpoh=1133"));
        dataBeanList.add(new DataBean("阿伦.艾弗森", "我把每一场比赛都当作我最后的一场比赛来打.", "http://img1.imgtn.bdimg.com/it/u=384498292,3316619853&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德里克.罗斯", "我是德里克·罗斯,我只用速度说话.", "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2210626121,1092632305&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德玛尔.德罗赞", "在下北境之王,不服来战!", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1203996391,3870196012&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("约翰.沃尔", "踏上球场,我的前方就是挑战。", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2099877378,2068666598&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("拉塞尔.威斯布鲁克", "我拉的大便都比你硬", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4144160776,1788896978&fm=27&gp=0.jpg"));

        dataBeanList.add(new DataBean("科比.布莱恩特", "见过凌晨四点的洛杉矶吗?", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3142209274,1753676811&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德维恩.韦德", "This Is My Hours !", "https://imgsa.baidu.com/forum/pic/item/ab18972bd40735fa37677c8f95510fb30f240874.jpg"));
        dataBeanList.add(new DataBean("克里斯.保罗", "是时候体验下西决了!", "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1882901515,1514764982&fm=58&u_exp_0=1315867900,1181459572&fm_exp_0=86&bpow=800&bpoh=1133"));
        dataBeanList.add(new DataBean("阿伦.艾弗森", "我把每一场比赛都当作我最后的一场比赛来打.", "http://img1.imgtn.bdimg.com/it/u=384498292,3316619853&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德里克.罗斯", "我是德里克·罗斯,我只用速度说话.", "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2210626121,1092632305&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德玛尔.德罗赞", "在下北境之王,不服来战!", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1203996391,3870196012&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("约翰.沃尔", "踏上球场,我的前方就是挑战。", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2099877378,2068666598&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("拉塞尔.威斯布鲁克", "我拉的大便都比你硬", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4144160776,1788896978&fm=27&gp=0.jpg"));

        dataBeanList.add(new DataBean("科比.布莱恩特", "见过凌晨四点的洛杉矶吗?", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3142209274,1753676811&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德维恩.韦德", "This Is My Hours !", "https://imgsa.baidu.com/forum/pic/item/ab18972bd40735fa37677c8f95510fb30f240874.jpg"));
        dataBeanList.add(new DataBean("克里斯.保罗", "是时候体验下西决了!", "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1882901515,1514764982&fm=58&u_exp_0=1315867900,1181459572&fm_exp_0=86&bpow=800&bpoh=1133"));
        dataBeanList.add(new DataBean("阿伦.艾弗森", "我把每一场比赛都当作我最后的一场比赛来打.", "http://img1.imgtn.bdimg.com/it/u=384498292,3316619853&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德里克.罗斯", "我是德里克·罗斯,我只用速度说话.", "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2210626121,1092632305&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("德玛尔.德罗赞", "在下北境之王,不服来战!", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1203996391,3870196012&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("约翰.沃尔", "踏上球场,我的前方就是挑战。", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2099877378,2068666598&fm=27&gp=0.jpg"));
        dataBeanList.add(new DataBean("拉塞尔.威斯布鲁克", "我拉的大便都比你硬", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4144160776,1788896978&fm=27&gp=0.jpg"));



        return dataBeanList;
    }
}






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值