图片 视频播放

布局信息

依赖  和权限

// okhttp相关依赖
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
// retrofit相关依赖
    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
//EventBus 依赖
    // compile 'de.greenrobot:eventbus:3.0.0-beta1'
//recyclerView 依赖
    compile 'com.android.support:recyclerview-v7:25.3.1'
//fresco 圆形图片
    implementation 'com.facebook.fresco:fresco:0.12.0'
//静态图的依赖
    implementation 'com.facebook.fresco:fresco:0.12.0'
// 支持 GIF 动图,需要添加
    compile 'com.facebook.fresco:animated-gif:0.12.0'
    implementation 'com.android.support:support-v4:27.1.1'


adapter 包里面的类  Myadapter

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.bawei.waglboday21.R;
import com.bawei.waglboday21.bean.Movbean;
import com.bawei.waglboday21.view.movfragment.v.ShowActivity;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.controller.AbstractDraweeController;
import com.facebook.drawee.view.SimpleDraweeView;

import java.util.List;

/**
 * Created by   on 2018/5/21.
 */

public class Myadapter extends RecyclerView.Adapter<Myadapter.Myviewholder> {
    List<Movbean.DataBean> data;
    Context context;

    public Myadapter(List<Movbean.DataBean> data, Context context) {
        this.data = data;
        this.context = context;
    }

    @NonNull
    @Override
    public Myviewholder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.mov_item, parent, false);
        Myviewholder myviewholder = new Myviewholder(inflate);

        return myviewholder;
    }

    @Override
    public void onBindViewHolder(@NonNull Myviewholder holder, int position) {
        final Movbean.DataBean db = data.get(position);
        holder.tvname.setText(db.getName());
        holder.tvtime.setText(db.getPasstime());
        //头像
        holder.iv.setImageURI(db.getProfile_image());

        holder.talk.setText(db.getRepost()+"品论");
        holder.like.setText(db.getLove()+"喜欢");
        holder.sharp.setText(db.getComment()+"飞享");
        holder.notlike.setText(db.getHate()+"不喜欢");
        Log.e("qqqqqq",11111111+"");
        Log.e("qqqqqq",db.getBimageuri());
        Log.e("qqqqqq",333333333+"");
         holder.tvsdv.setImageURI(Uri.parse(db.getImage0()));
       // holder.tvsdv.setImageURI(db.getProfile_image());
/*
        final AbstractDraweeController controller = Fresco.newDraweeControllerBuilder()
                //图片地址
                .setUri(db.getBimageuri())
                //播放gif 图片
                .setAutoPlayAnimations(true)
                //点击重新加载时 可以重新加载4 次
                .setTapToRetryEnabled(true)
                .build();

        holder.tvsdv.setController(controller);*/

//监听
        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(context, ShowActivity.class);
                intent.putExtra("url",db.getVideouri());
                context.startActivity(intent);
            }
        });

    }
    public interface Onitemclicklistener {
        void click(int position);
    }

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

    public class Myviewholder  extends RecyclerView.ViewHolder{
        public TextView tvname;
        public TextView tvtime;
        public TextView talk;
        public TextView like;
        public TextView notlike;
        public SimpleDraweeView iv;
        public  SimpleDraweeView tvsdv;
        public  TextView sharp;
        public Myviewholder(View itemView) {
            super(itemView);
            tvname=itemView.findViewById(R.id.tvname);
            tvtime=itemView.findViewById(R.id.tvtime);
            talk=itemView.findViewById(R.id.talk);
            like=itemView.findViewById(R.id.like);
            notlike=itemView.findViewById(R.id.notlike);
            tvsdv=itemView.findViewById(R.id.tvsdv);
            iv=itemView.findViewById(R.id.iv);
            sharp=itemView.findViewById(R.id.sharp);
        }
    }
}

Myimgadapter

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.bawei.waglboday21.R;
import com.bawei.waglboday21.bean.Userbean;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.controller.AbstractDraweeController;
import com.facebook.drawee.view.SimpleDraweeView;

import java.util.List;

/**
 * Created by   on 2018/5/21.
 */

public class Myimgadapter extends RecyclerView.Adapter<Myimgadapter.Myviewholder> {
      List<Userbean.DataBean> data;
      Context context;

    public Myimgadapter(List<Userbean.DataBean> data, Context context) {
        this.data = data;
        this.context = context;
    }

    @NonNull
    @Override
    public Myviewholder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
     //   Log.e("vvvvv",viewType+"");
       // View inflate = LayoutInflater.from(context).inflate(R.layout.img_item, parent, false);
        View inflate = LayoutInflater.from(context).inflate(R.layout.img_item, parent, false);
        Myviewholder myviewholder = new Myviewholder(inflate);
        return myviewholder;
    }

    @Override
    public void onBindViewHolder(@NonNull Myviewholder holder, int position) {
        Userbean.DataBean db = data.get(position);
        holder.name.setText(db.getName());

        holder.time1.setText(db.getPasstime()+"");
        holder.sdv.setImageURI(db.getProfile_image());
        //判断是否为  gif  tupian
        if (db.isIs_gif()){
            AbstractDraweeController controller = Fresco.newDraweeControllerBuilder()
                    //图片地址
                    .setUri(db.getImage0())
                    //播放gif 图片
                    .setAutoPlayAnimations(true)
                    //点击重新加载时 可以重新加载4 次
                    .setTapToRetryEnabled(true)
                    .build();

            holder.sdv__.setController(controller);
        }else{
            AbstractDraweeController controller = Fresco.newDraweeControllerBuilder()
                    //图片地址
                    .setUri(db.getImage0())
                    //播放gif 图片
                    .setAutoPlayAnimations(false)
                    //点击重新加载时 可以重新加载4 次
                    .setTapToRetryEnabled(true)
                    .build();

            holder.sdv__.setController(controller);
        }
    }

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

    public class Myviewholder extends RecyclerView.ViewHolder{
        public TextView name;
        public TextView time1;
        public SimpleDraweeView sdv;
        public  SimpleDraweeView sdv__;

        public Myviewholder(View itemView) {
            super(itemView);
            name=itemView.findViewById(R.id.name);
            time1=itemView.findViewById(R.id.time1);
            sdv=itemView.findViewById(R.id.sdv);
            sdv__=itemView.findViewById(R.id.sdv__);
        }
    }
}

  bean包里面的  Movbean

import java.util.List;

/**
 * Created by   on 2018/5/21.
 */

public class Movbean {

    /**
     * code : 200
     * msg : 成功!
     * data : [{"type":"41","text":"我竟然被一只猫撩了\u2026\u2026","user_id":"21393596","name":"日曰日日","screen_name":"日曰日日","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/01/13/5a5a0f74c0e14_mini.jpg","created_at":"2018-05-04 17:00:01","create_time":null,"passtime":"2018-05-04 17:00:01","love":"182","hate":"6","comment":"32","repost":"25","bookmark":"27","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"124","theme_name":"萌宠","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.mp4","videotime":19,"original_pid":"0","cache_version":2,"playcount":"7797","playfcount":"498","cai":"6","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg","width":"540","height":"960","tag":"","t":1525424401,"ding":"182","favourite":"27","top_cmt":null,"themes":null},{"type":"41","text":"当看到她长头发时,我感觉自己恋爱了!","user_id":"11202304","name":"清风明月丶","screen_name":"清风明月丶","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/07/26/597800d42ad61_mini.jpg","created_at":"2017-09-22 21:09:02","create_time":null,"passtime":"2017-09-22 21:09:02","love":"2606","hate":"191","comment":"547","repost":"314","bookmark":"1385","bimageuri":"http://wimg.spriteapp.cn/picture/2017/0922/59c3e7f64dca8__b.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"54779","theme_name":"性感","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2017/0922/59c3e7f698654_wpd.mp4","videotime":64,"original_pid":"0","cache_version":2,"playcount":"222052","playfcount":"11748","cai":"191","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/0922/59c3e7f64dca8__b.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/0922/59c3e7f64dca8__b.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/0922/59c3e7f64dca8__b.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/0922/59c3e7f64dca8__b.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/0922/59c3e7f64dca8__b.jpg","width":"480","height":"848","tag":"","t":1506085742,"ding":"2606","favourite":"1385","top_cmt":null,"themes":null},{"type":"41","text":"减肥路上你和我,哈哈太形象了。。","user_id":"17071501","name":"白头人间_","screen_name":"白头人间_","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/04/28/5ae412c90ee7b_mini.jpg","created_at":"2018-04-30 16:08:01","create_time":null,"passtime":"2018-04-30 16:08:01","love":"182","hate":"10","comment":"47","repost":"13","bookmark":"4","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0430/5ae6c84dd9e28__b.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"58191","theme_name":"搞笑视频","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0430/5ae6c84de276e_wpd.mp4","videotime":17,"original_pid":"0","cache_version":2,"playcount":"7149","playfcount":"1245","cai":"10","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0430/5ae6c84dd9e28__b.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0430/5ae6c84dd9e28__b.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0430/5ae6c84dd9e28__b.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0430/5ae6c84dd9e28__b.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0430/5ae6c84dd9e28__b.jpg","width":"528","height":"960","tag":"","t":1525075681,"ding":"182","favourite":"4","top_cmt":null,"themes":null},{"type":"41","text":"蠢萌猫星人,看完感觉我要养猫!!!别拦着我!!!","user_id":"20746690","name":"漫天香草","screen_name":"漫天香草","profile_image":"http://wimg.spriteapp.cn/profile/20170512115607.jpg","created_at":"2018-02-24 20:52:02","create_time":null,"passtime":"2018-02-24 20:52:02","love":"978","hate":"37","comment":"62","repost":"206","bookmark":"135","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0223/27257899_874.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"http://wvideo.spriteapp.cn/video/2018/0223/fc06516c186a11e89e24842b2b4c75ab_wpd.mp4","videotime":109,"original_pid":"0","cache_version":2,"playcount":"48724","playfcount":"5146","cai":"37","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0223/27257899_874.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0223/27257899_874.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0223/27257899_874.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0223/27257899_874.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0223/27257899_874.jpg","width":"600","height":"600","tag":"","t":1519476722,"ding":"978","favourite":"135","top_cmt":null,"themes":null},{"type":"41","text":"蠢贼上线,逃犯跟妹子吹牛 没想到周围有11名便衣在吃饭\u2026","user_id":"17874820","name":"神思化伐","screen_name":"神思化伐","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/01/14/5a5b3dfd34258_mini.jpg","created_at":"2018-04-13 16:45:02","create_time":null,"passtime":"2018-04-13 16:45:02","love":"468","hate":"24","comment":"37","repost":"54","bookmark":"30","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0413/5ad04d0bec888_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"473","theme_name":"社会新闻","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0413/5ad04d0bec888_wpd.mp4","videotime":66,"original_pid":"0","cache_version":2,"playcount":"23993","playfcount":"3193","cai":"24","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0413/5ad04d0bec888_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0413/5ad04d0bec888_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0413/5ad04d0bec888_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0413/5ad04d0bec888_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0413/5ad04d0bec888_wpd.jpg","width":"480","height":"272","tag":"","t":1523609102,"ding":"468","favourite":"30","top_cmt":null,"themes":null},{"type":"41","text":"怀孕期间尽量控制一下饮食,不要再造成这样的悲剧了。","user_id":"21149592","name":"趣味中转站","screen_name":"趣味中转站","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/07/29/597c637514687_mini.jpg","created_at":"2017-09-04 19:28:01","create_time":null,"passtime":"2017-09-04 19:28:01","love":"3380","hate":"113","comment":"133","repost":"1294","bookmark":"357","bimageuri":"http://wimg.spriteapp.cn/picture/2017/0903/26232453_733.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"473","theme_name":"社会新闻","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2017/0903/59ab773f9c3ab_wpd.mp4","videotime":86,"original_pid":"0","cache_version":2,"playcount":"124215","playfcount":"6698","cai":"113","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/0903/26232453_733.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/0903/26232453_733.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/0903/26232453_733.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/0903/26232453_733.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/0903/26232453_733.jpg","width":"854","height":"432","tag":"","t":1504524481,"ding":"3380","favourite":"357","top_cmt":null,"themes":null},{"type":"41","text":"「混剪」你这一生到底有没有真正爱过一个人?","user_id":"19345936","name":"江湖大佬精彩视频","screen_name":"江湖大佬精彩视频","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/03/03/58b96188d0caf_mini.jpg","created_at":"2017-10-07 09:20:02","create_time":null,"passtime":"2017-10-07 09:20:02","love":"1852","hate":"56","comment":"217","repost":"530","bookmark":"710","bimageuri":"http://wimg.spriteapp.cn/picture/2017/1004/6eafec62-a8fb-11e7-bbdf-1866daeb0df1_wpd_11.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"407","theme_name":"影视分享","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2017/1004/6eafec62-a8fb-11e7-bbdf-1866daeb0df1_wpd.mp4","videotime":420,"original_pid":"0","cache_version":2,"playcount":"66921","playfcount":"917","cai":"56","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/1004/6eafec62-a8fb-11e7-bbdf-1866daeb0df1_wpd_11.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/1004/6eafec62-a8fb-11e7-bbdf-1866daeb0df1_wpd_11.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/1004/6eafec62-a8fb-11e7-bbdf-1866daeb0df1_wpd_11.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/1004/6eafec62-a8fb-11e7-bbdf-1866daeb0df1_wpd_11.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/1004/6eafec62-a8fb-11e7-bbdf-1866daeb0df1_wpd_11.jpg","width":"640","height":"360","tag":"","t":1507339202,"ding":"1852","favourite":"710","top_cmt":null,"themes":null},{"type":"41","text":"好可爱的狗狗,最后真是忍不住笑出了声!","user_id":"17003528","name":"红颜纷扰红尘梦","screen_name":"红颜纷扰红尘梦","profile_image":"http://wimg.spriteapp.cn/profile/large/2015/12/31/56850d019c4aa_mini.jpg","created_at":"2017-10-03 13:25:03","create_time":null,"passtime":"2017-10-03 13:25:03","love":"1797","hate":"50","comment":"53","repost":"494","bookmark":"183","bimageuri":"http://wimg.spriteapp.cn/picture/2017/1002/044aa382-a70a-11e7-b4ed-1866daeb0df1_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"58191","theme_name":"搞笑视频","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2017/1002/044aa382-a70a-11e7-b4ed-1866daeb0df1_wpd.mp4","videotime":14,"original_pid":"0","cache_version":2,"playcount":"101562","playfcount":"17555","cai":"50","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/1002/044aa382-a70a-11e7-b4ed-1866daeb0df1_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/1002/044aa382-a70a-11e7-b4ed-1866daeb0df1_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/1002/044aa382-a70a-11e7-b4ed-1866daeb0df1_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/1002/044aa382-a70a-11e7-b4ed-1866daeb0df1_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/1002/044aa382-a70a-11e7-b4ed-1866daeb0df1_wpd.jpg","width":"544","height":"672","tag":"","t":1507008303,"ding":"1797","favourite":"183","top_cmt":null,"themes":null},{"type":"41","text":"一波漂亮小姐姐合集,看完有种恋爱的感觉!","user_id":"11202304","name":"清风明月丶","screen_name":"清风明月丶","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/07/26/597800d42ad61_mini.jpg","created_at":"2017-09-25 14:17:02","create_time":null,"passtime":"2017-09-25 14:17:02","love":"2942","hate":"183","comment":"371","repost":"464","bookmark":"1882","bimageuri":"http://wimg.spriteapp.cn/picture/2017/0922/59c531236eaf8__b.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"54779","theme_name":"性感","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2017/0922/59c5312430526_wpd.mp4","videotime":123,"original_pid":"0","cache_version":2,"playcount":"160219","playfcount":"8056","cai":"183","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/0922/59c531236eaf8__b.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/0922/59c531236eaf8__b.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/0922/59c531236eaf8__b.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/0922/59c531236eaf8__b.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/0922/59c531236eaf8__b.jpg","width":"540","height":"960","tag":"","t":1506320222,"ding":"2942","favourite":"1882","top_cmt":null,"themes":null},{"type":"41","text":"神车就是神车!五菱遇到劳斯莱斯都不怂","user_id":"22323849","name":"出家人从不打狂雨","screen_name":"出家人从不打狂雨","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/04/17/5ad5ba9170d55_mini.jpg","created_at":"2018-05-19 12:55:01","create_time":null,"passtime":"2018-05-19 12:55:01","love":"693","hate":"36","comment":"291","repost":"46","bookmark":"24","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0519/5aff5f1725db7_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"58191","theme_name":"搞笑视频","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0519/5aff5f1725db7_wpd.mp4","videotime":19,"original_pid":"0","cache_version":2,"playcount":"81935","playfcount":"23217","cai":"36","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0519/5aff5f1725db7_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0519/5aff5f1725db7_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0519/5aff5f1725db7_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0519/5aff5f1725db7_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0519/5aff5f1725db7_wpd.jpg","width":"368","height":"640","tag":"","t":1526705701,"ding":"693","favourite":"24","top_cmt":null,"themes":null},{"type":"41","text":"千万不要乱停车,后果很严重的哦","user_id":"18380255","name":"敏智的选择","screen_name":"敏智的选择","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/05/16/5afc215d237fc_mini.jpg","created_at":"2018-05-20 06:00:02","create_time":null,"passtime":"2018-05-20 06:00:02","love":"199","hate":"15","comment":"32","repost":"14","bookmark":"5","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0518/5afe52b6a810a__b_35.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"58191","theme_name":"搞笑视频","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0518/5afe52b6db607_wpd.mp4","videotime":105,"original_pid":"0","cache_version":2,"playcount":"12326","playfcount":"2622","cai":"15","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0518/5afe52b6a810a__b_35.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0518/5afe52b6a810a__b_35.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0518/5afe52b6a810a__b_35.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0518/5afe52b6a810a__b_35.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0518/5afe52b6a810a__b_35.jpg","width":"352","height":"592","tag":"","t":1526767202,"ding":"199","favourite":"5","top_cmt":null,"themes":null},{"type":"41","text":"一条毛巾弄成一只可爱的小熊","user_id":"22403180","name":"用户E6sS0x","screen_name":"用户E6sS0x","profile_image":"http://thirdwx.qlogo.cn/mmopen/vi_32/r7WknjKuyBHBib0W9reDBjW0XNnt5picicTkvPnX8jjTib3tV0FeOjDjgB5LHL6nVbias1CHJqHEDEH8dWCXMBs5A0g/132","created_at":"2018-04-21 12:17:01","create_time":null,"passtime":"2018-04-21 12:17:01","love":"157","hate":"10","comment":"31","repost":"19","bookmark":"50","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0421/27666211_238.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"8466","theme_name":"生活技巧","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0421/5ada2cbcc05e0_wpd.mp4","videotime":65,"original_pid":"0","cache_version":2,"playcount":"6922","playfcount":"493","cai":"10","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0421/27666211_238.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0421/27666211_238.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0421/27666211_238.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0421/27666211_238.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0421/27666211_238.jpg","width":"270","height":"270","tag":"","t":1524284221,"ding":"157","favourite":"50","top_cmt":null,"themes":null},{"type":"41","text":"一路上有你  再苦我都愿意","user_id":"20226826","name":"污姐开车了","screen_name":"污姐开车了","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/10/13/59e0d549b9a60_mini.jpg","created_at":"2018-04-16 09:00:02","create_time":null,"passtime":"2018-04-16 09:00:02","love":"168","hate":"15","comment":"38","repost":"28","bookmark":"38","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0412/27519979_943.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"http://wvideo.spriteapp.cn/video/2018/0412/1e27627a3e6011e882bc842b2b4c75ab_wpd.mp4","videotime":189,"original_pid":"0","cache_version":2,"playcount":"5929","playfcount":"87","cai":"15","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0412/27519979_943.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0412/27519979_943.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0412/27519979_943.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0412/27519979_943.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0412/27519979_943.jpg","width":"480","height":"272","tag":"","t":1523840402,"ding":"168","favourite":"38","top_cmt":null,"themes":null},{"type":"41","text":"为什么加油站不能打电话 看看你就知道了","user_id":"20681256","name":"百思海洋哥","screen_name":"百思海洋哥","profile_image":"http://wx.qlogo.cn/mmopen/2EzJggZltBM7yAnc7PPgfkOyXIss9EF841dfiaLbkSfpJLTRUFrsKA91eVhm40LeX7Pk1BSeZib2k67E2oeiaBicGA/0","created_at":"2017-09-25 19:00:01","create_time":null,"passtime":"2017-09-25 19:00:01","love":"1681","hate":"79","comment":"188","repost":"428","bookmark":"95","bimageuri":"http://wimg.spriteapp.cn/picture/2017/0924/59c79dbe7b95b__b.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"473","theme_name":"社会新闻","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2017/0924/59c79dbe84ac9_wpd.mp4","videotime":13,"original_pid":"0","cache_version":2,"playcount":"169247","playfcount":"68120","cai":"79","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/0924/59c79dbe7b95b__b.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/0924/59c79dbe7b95b__b.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/0924/59c79dbe7b95b__b.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/0924/59c79dbe7b95b__b.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/0924/59c79dbe7b95b__b.jpg","width":"400","height":"400","tag":"","t":1506337201,"ding":"1681","favourite":"95","top_cmt":null,"themes":null},{"type":"41","text":"沈腾和贾玲打嘴仗,句句都是段子!笑得我前仰后翻哈哈哈","user_id":"20746609","name":"Evil丿硕哥","screen_name":"Evil丿硕哥","profile_image":"http://wimg.spriteapp.cn/profile/20170512105414.jpg","created_at":"2018-05-04 20:59:01","create_time":null,"passtime":"2018-05-04 20:59:01","love":"277","hate":"18","comment":"58","repost":"11","bookmark":"32","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0502/eac4ea244db411e89517842b2b4c75ab_wpd_64_38.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"http://dvideo.spriteapp.cn/video/2018/0502/eac4ea244db411e89517842b2b4c75ab_wpd.mp4","videotime":184,"original_pid":"0","cache_version":2,"playcount":"16165","playfcount":"2243","cai":"18","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0502/eac4ea244db411e89517842b2b4c75ab_wpd_64_38.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0502/eac4ea244db411e89517842b2b4c75ab_wpd_64_38.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0502/eac4ea244db411e89517842b2b4c75ab_wpd_64_38.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0502/eac4ea244db411e89517842b2b4c75ab_wpd_64_38.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0502/eac4ea244db411e89517842b2b4c75ab_wpd_64_38.jpg","width":"852","height":"480","tag":"","t":1525438741,"ding":"277","favourite":"32","top_cmt":null,"themes":null},{"type":"41","text":"不得不佩服这猫主人的口才~~~","user_id":"19804142","name":"有猫酱-","screen_name":"有猫酱-","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/03/19/58ce8d813c461_mini.jpg","created_at":"2017-09-06 21:51:03","create_time":null,"passtime":"2017-09-06 21:51:03","love":"2204","hate":"103","comment":"168","repost":"424","bookmark":"293","bimageuri":"http://wimg.spriteapp.cn/picture/2017/0831/ad6902ba8e2d11e7af74842b2b4c75ab_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"http://wvideo.spriteapp.cn/video/2017/0831/ad6902ba8e2d11e7af74842b2b4c75ab_wpd.mp4","videotime":127,"original_pid":"0","cache_version":2,"playcount":"96438","playfcount":"6007","cai":"103","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/0831/ad6902ba8e2d11e7af74842b2b4c75ab_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/0831/ad6902ba8e2d11e7af74842b2b4c75ab_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/0831/ad6902ba8e2d11e7af74842b2b4c75ab_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/0831/ad6902ba8e2d11e7af74842b2b4c75ab_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/0831/ad6902ba8e2d11e7af74842b2b4c75ab_wpd.jpg","width":"852","height":"480","tag":"","t":1504705863,"ding":"2204","favourite":"293","top_cmt":null,"themes":null},{"type":"41","text":"史上最美味的莲藕做法,只需三步轻松搞定","user_id":"17969403","name":"小博主i","screen_name":"小博主i","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/07/26/59779c54ed439_mini.jpg","created_at":"2017-09-04 17:08:01","create_time":null,"passtime":"2017-09-04 17:08:01","love":"1992","hate":"50","comment":"144","repost":"763","bookmark":"1693","bimageuri":"http://wimg.spriteapp.cn/picture/2017/0902/b47dce12-8f9c-11e7-b776-1866daeb0df1_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"8466","theme_name":"生活技巧","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2017/0902/b47dce12-8f9c-11e7-b776-1866daeb0df1_wpd.mp4","videotime":186,"original_pid":"0","cache_version":2,"playcount":"40384","playfcount":"4125","cai":"50","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2017/0902/b47dce12-8f9c-11e7-b776-1866daeb0df1_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2017/0902/b47dce12-8f9c-11e7-b776-1866daeb0df1_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2017/0902/b47dce12-8f9c-11e7-b776-1866daeb0df1_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2017/0902/b47dce12-8f9c-11e7-b776-1866daeb0df1_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2017/0902/b47dce12-8f9c-11e7-b776-1866daeb0df1_wpd.jpg","width":"848","height":"480","tag":"","t":1504516081,"ding":"1992","favourite":"1693","top_cmt":null,"themes":null},{"type":"41","text":"这样拍出来的婚纱照,一辈子都看不厌!","user_id":"18380255","name":"敏智的选择","screen_name":"敏智的选择","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/07/11/59645b78871e2_mini.jpg","created_at":"2018-03-12 13:25:02","create_time":null,"passtime":"2018-03-12 13:25:02","love":"1043","hate":"48","comment":"209","repost":"271","bookmark":"338","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0312/27311039_577.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"53647","theme_name":"创意脑洞","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0312/d316a48a25b411e8a4b6842b2b4c75ab_wpd.mp4","videotime":81,"original_pid":"0","cache_version":2,"playcount":"62108","playfcount":"6801","cai":"48","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0312/27311039_577.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0312/27311039_577.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0312/27311039_577.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0312/27311039_577.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0312/27311039_577.jpg","width":"640","height":"360","tag":"","t":1520832302,"ding":"1043","favourite":"338","top_cmt":null,"themes":null},{"type":"41","text":"来来来,她妈妈咱俩谈谈,你闺女以后的芭比娃娃我包了,就当我儿媳妇的彩礼了\u2026","user_id":"17932228","name":"用我双手成就你梦想","screen_name":"用我双手成就你梦想","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/05/10/5af3b626d5d7a_mini.jpg","created_at":"2018-05-18 07:37:02","create_time":null,"passtime":"2018-05-18 07:37:02","love":"79","hate":"2","comment":"30","repost":"2","bookmark":"6","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0517/76cbef22598611e88bb6842b2b4c75ab_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"http://wvideo.spriteapp.cn/video/2018/0517/76cbef22598611e88bb6842b2b4c75ab_wpd.mp4","videotime":31,"original_pid":"0","cache_version":2,"playcount":"2835","playfcount":"283","cai":"2","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0517/76cbef22598611e88bb6842b2b4c75ab_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0517/76cbef22598611e88bb6842b2b4c75ab_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0517/76cbef22598611e88bb6842b2b4c75ab_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0517/76cbef22598611e88bb6842b2b4c75ab_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0517/76cbef22598611e88bb6842b2b4c75ab_wpd.jpg","width":"540","height":"960","tag":"","t":1526600222,"ding":"79","favourite":"6","top_cmt":null,"themes":null},{"type":"41","text":"绝地求生:我仙某人一世英名,怎么会摊上你们这仨智商欠费的队友?","user_id":"21760200","name":"绝地游戏酱","screen_name":"绝地游戏酱","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/02/23/5a8f8517edd47_mini.jpg","created_at":"2018-05-15 08:21:02","create_time":null,"passtime":"2018-05-15 08:21:02","love":"132","hate":"16","comment":"14","repost":"3","bookmark":"5","bimageuri":"http://wimg.spriteapp.cn/picture/2018/0510/5af3b2ea58107_wpd.jpg","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"60386","theme_name":"吃鸡","theme_type":"1","videouri":"http://wvideo.spriteapp.cn/video/2018/0510/5af3b2ea58107_wpd.mp4","videotime":148,"original_pid":"0","cache_version":2,"playcount":"6130","playfcount":"347","cai":"16","weixin_url":null,"image1":"http://wimg.spriteapp.cn/picture/2018/0510/5af3b2ea58107_wpd.jpg","image2":"http://wimg.spriteapp.cn/picture/2018/0510/5af3b2ea58107_wpd.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/picture/2018/0510/5af3b2ea58107_wpd.jpg","image_small":"http://wimg.spriteapp.cn/picture/2018/0510/5af3b2ea58107_wpd.jpg","cdn_img":"http://wimg.spriteapp.cn/picture/2018/0510/5af3b2ea58107_wpd.jpg","width":"1066","height":"600","tag":"","t":1526343662,"ding":"132","favourite":"5","top_cmt":null,"themes":null}]
     */

    private int code;
    private String msg;
    private List<DataBean> data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * type : 41
         * text : 我竟然被一只猫撩了……
         * user_id : 21393596
         * name : 日曰日日
         * screen_name : 日曰日日
         * profile_image : http://wimg.spriteapp.cn/profile/large/2018/01/13/5a5a0f74c0e14_mini.jpg
         * created_at : 2018-05-04 17:00:01
         * create_time : null
         * passtime : 2018-05-04 17:00:01
         * love : 182
         * hate : 6
         * comment : 32
         * repost : 25
         * bookmark : 27
         * bimageuri : http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg
         * voiceuri : null
         * voicetime : null
         * voicelength : null
         * status : 4
         * theme_id : 124
         * theme_name : 萌宠
         * theme_type : 1
         * videouri : http://wvideo.spriteapp.cn/video/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.mp4
         * videotime : 19
         * original_pid : 0
         * cache_version : 2
         * playcount : 7797
         * playfcount : 498
         * cai : 6
         * weixin_url : null
         * image1 : http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg
         * image2 : http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg
         * is_gif : false
         * image0 : http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg
         * image_small : http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg
         * cdn_img : http://wimg.spriteapp.cn/picture/2018/0503/526b1414-4ecd-11e8-8743-1866daeb0df1_wpd.jpg
         * width : 540
         * height : 960
         * tag :
         * t : 1525424401
         * ding : 182
         * favourite : 27
         * top_cmt : null
         * themes : null
         */

        private String type;
        private String text;
        private String user_id;
        private String name;
        private String screen_name;
        private String profile_image;
        private String created_at;
        private Object create_time;
        private String passtime;
        private String love;
        private String hate;
        private String comment;
        private String repost;
        private String bookmark;
        private String bimageuri;
        private Object voiceuri;
        private Object voicetime;
        private Object voicelength;
        private String status;
        private String theme_id;
        private String theme_name;
        private String theme_type;
        private String videouri;
        private int videotime;
        private String original_pid;
        private int cache_version;
        private String playcount;
        private String playfcount;
        private String cai;
        private Object weixin_url;
        private String image1;
        private String image2;
        private boolean is_gif;
        private String image0;
        private String image_small;
        private String cdn_img;
        private String width;
        private String height;
        private String tag;
        private int t;
        private String ding;
        private String favourite;
        private Object top_cmt;
        private Object themes;

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public String getUser_id() {
            return user_id;
        }

        public void setUser_id(String user_id) {
            this.user_id = user_id;
        }

        public String getName() {
            return name;
        }

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

        public String getScreen_name() {
            return screen_name;
        }

        public void setScreen_name(String screen_name) {
            this.screen_name = screen_name;
        }

        public String getProfile_image() {
            return profile_image;
        }

        public void setProfile_image(String profile_image) {
            this.profile_image = profile_image;
        }

        public String getCreated_at() {
            return created_at;
        }

        public void setCreated_at(String created_at) {
            this.created_at = created_at;
        }

        public Object getCreate_time() {
            return create_time;
        }

        public void setCreate_time(Object create_time) {
            this.create_time = create_time;
        }

        public String getPasstime() {
            return passtime;
        }

        public void setPasstime(String passtime) {
            this.passtime = passtime;
        }

        public String getLove() {
            return love;
        }

        public void setLove(String love) {
            this.love = love;
        }

        public String getHate() {
            return hate;
        }

        public void setHate(String hate) {
            this.hate = hate;
        }

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public String getRepost() {
            return repost;
        }

        public void setRepost(String repost) {
            this.repost = repost;
        }

        public String getBookmark() {
            return bookmark;
        }

        public void setBookmark(String bookmark) {
            this.bookmark = bookmark;
        }

        public String getBimageuri() {
            return bimageuri;
        }

        public void setBimageuri(String bimageuri) {
            this.bimageuri = bimageuri;
        }

        public Object getVoiceuri() {
            return voiceuri;
        }

        public void setVoiceuri(Object voiceuri) {
            this.voiceuri = voiceuri;
        }

        public Object getVoicetime() {
            return voicetime;
        }

        public void setVoicetime(Object voicetime) {
            this.voicetime = voicetime;
        }

        public Object getVoicelength() {
            return voicelength;
        }

        public void setVoicelength(Object voicelength) {
            this.voicelength = voicelength;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getTheme_id() {
            return theme_id;
        }

        public void setTheme_id(String theme_id) {
            this.theme_id = theme_id;
        }

        public String getTheme_name() {
            return theme_name;
        }

        public void setTheme_name(String theme_name) {
            this.theme_name = theme_name;
        }

        public String getTheme_type() {
            return theme_type;
        }

        public void setTheme_type(String theme_type) {
            this.theme_type = theme_type;
        }

        public String getVideouri() {
            return videouri;
        }

        public void setVideouri(String videouri) {
            this.videouri = videouri;
        }

        public int getVideotime() {
            return videotime;
        }

        public void setVideotime(int videotime) {
            this.videotime = videotime;
        }

        public String getOriginal_pid() {
            return original_pid;
        }

        public void setOriginal_pid(String original_pid) {
            this.original_pid = original_pid;
        }

        public int getCache_version() {
            return cache_version;
        }

        public void setCache_version(int cache_version) {
            this.cache_version = cache_version;
        }

        public String getPlaycount() {
            return playcount;
        }

        public void setPlaycount(String playcount) {
            this.playcount = playcount;
        }

        public String getPlayfcount() {
            return playfcount;
        }

        public void setPlayfcount(String playfcount) {
            this.playfcount = playfcount;
        }

        public String getCai() {
            return cai;
        }

        public void setCai(String cai) {
            this.cai = cai;
        }

        public Object getWeixin_url() {
            return weixin_url;
        }

        public void setWeixin_url(Object weixin_url) {
            this.weixin_url = weixin_url;
        }

        public String getImage1() {
            return image1;
        }

        public void setImage1(String image1) {
            this.image1 = image1;
        }

        public String getImage2() {
            return image2;
        }

        public void setImage2(String image2) {
            this.image2 = image2;
        }

        public boolean isIs_gif() {
            return is_gif;
        }

        public void setIs_gif(boolean is_gif) {
            this.is_gif = is_gif;
        }

        public String getImage0() {
            return image0;
        }

        public void setImage0(String image0) {
            this.image0 = image0;
        }

        public String getImage_small() {
            return image_small;
        }

        public void setImage_small(String image_small) {
            this.image_small = image_small;
        }

        public String getCdn_img() {
            return cdn_img;
        }

        public void setCdn_img(String cdn_img) {
            this.cdn_img = cdn_img;
        }

        public String getWidth() {
            return width;
        }

        public void setWidth(String width) {
            this.width = width;
        }

        public String getHeight() {
            return height;
        }

        public void setHeight(String height) {
            this.height = height;
        }

        public String getTag() {
            return tag;
        }

        public void setTag(String tag) {
            this.tag = tag;
        }

        public int getT() {
            return t;
        }

        public void setT(int t) {
            this.t = t;
        }

        public String getDing() {
            return ding;
        }

        public void setDing(String ding) {
            this.ding = ding;
        }

        public String getFavourite() {
            return favourite;
        }

        public void setFavourite(String favourite) {
            this.favourite = favourite;
        }

        public Object getTop_cmt() {
            return top_cmt;
        }

        public void setTop_cmt(Object top_cmt) {
            this.top_cmt = top_cmt;
        }

        public Object getThemes() {
            return themes;
        }

        public void setThemes(Object themes) {
            this.themes = themes;
        }
    }
}

Userbean

import java.util.List;

/**
  */

public class Userbean {

    /**
     * code : 200
     * msg : 成功!
     * data : [{"type":"10","text":"好厉害的手绘,可以说非常非常的立体了","user_id":"17474065","name":"马小梅","screen_name":"马小梅","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/02/24/5a90448611639_mini.jpg","created_at":"2018-04-15 08:10:01","create_time":null,"passtime":"2018-04-15 08:10:01","love":"359","hate":"92","comment":"315","repost":"4","bookmark":"13","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"55163","theme_name":"主版块","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"92","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg","width":"460","height":"3445","tag":"","t":1523751001,"ding":"359","favourite":"13","top_cmt":null,"themes":null},{"type":"10","text":"那个用裸照换了一个2万块LV包包的女大学生","user_id":"19531820","name":"臭宝蛋蛋","screen_name":"臭宝蛋蛋","profile_image":"http://tva4.sinaimg.cn/crop.0.0.996.996.50/e7f9e94djw8f6ursgyso3j20ro0rp0wy.jpg","created_at":"2017-09-12 23:26:01","create_time":null,"passtime":"2017-09-12 23:26:01","love":"1556","hate":"249","comment":"361","repost":"249","bookmark":"205","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"3500","theme_name":"社会百态","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"249","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2017/08/29/59a564d98dbaa_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2017/08/29/59a564d98dbaa_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2017/08/29/59a564d98dbaa_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2017/08/29/59a564d98dbaa_1.jpg","width":"750","height":"17992","tag":"","t":1505229961,"ding":"1556","favourite":"205","top_cmt":null,"themes":null},{"type":"10","text":"还能怎么调???跑路吧,朋友 \u200b\u200b\u200b","user_id":"18996959","name":"为你改变love","screen_name":"为你改变love","profile_image":"http://wimg.spriteapp.cn/profile/large/2016/11/15/582b24d33dd0b_mini.jpg","created_at":"2018-05-11 06:36:02","create_time":null,"passtime":"2018-05-11 06:36:02","love":"407","hate":"8","comment":"64","repost":"37","bookmark":"16","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"58240","theme_name":"搞笑图片","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"8","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/05/10/5af3c24d813f7_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/05/10/5af3c24d813f7_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/05/10/5af3c24d813f7_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/05/10/5af3c24d813f7_1.jpg","width":"1440","height":"3482","tag":"","t":1525991762,"ding":"407","favourite":"16","top_cmt":null,"themes":null},{"type":"10","text":"被减肥药榨干的中国女孩~","user_id":"20385456","name":"摸咪校尉","screen_name":"摸咪校尉","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/11/28/5a1cd9941d213_mini.jpg","created_at":"2018-05-14 08:26:01","create_time":null,"passtime":"2018-05-14 08:26:01","love":"155","hate":"8","comment":"9","repost":"35","bookmark":"5","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"55163","theme_name":"主版块","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"8","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/05/09/5af2f58b96748_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/05/09/5af2f58b96748_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/05/09/5af2f58b96748_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/05/09/5af2f58b96748_1.jpg","width":"720","height":"21838","tag":"","t":1526257561,"ding":"155","favourite":"5","top_cmt":null,"themes":null},{"type":"10","text":"我还是个女生,这汗毛怎么办啊,又没有好的办法","user_id":"17474065","name":"马小梅","screen_name":"马小梅","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/02/24/5a90448611639_mini.jpg","created_at":"2018-04-01 07:36:01","create_time":null,"passtime":"2018-04-01 07:36:01","love":"78","hate":"8","comment":"39","repost":"1","bookmark":"2","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"8","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/03/31/5abef61436764.gif","image2":"http://wimg.spriteapp.cn/ugc/2018/03/31/5abef61436764.gif","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/03/31/5abef61436764.gif","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/03/31/5abef61436764.gif","width":"180","height":"255","tag":"","t":1522539361,"ding":"78","favourite":"2","top_cmt":null,"themes":null},{"type":"10","text":"单身狗们女票都找不到,还谈什么一胎啊~","user_id":"18682920","name":"黑皮咪咪眼","screen_name":"黑皮咪咪眼","profile_image":"http://wimg.spriteapp.cn/profile/large/2016/06/27/577119b7d372e_mini.jpg","created_at":"2018-04-14 17:35:47","create_time":null,"passtime":"2018-04-14 17:35:47","love":"203","hate":"21","comment":"87","repost":"29","bookmark":"20","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"21","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad170bcd4ad9_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad170bcd4ad9_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad170bcd4ad9_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/04/14/5ad170bcd4ad9_1.jpg","width":"690","height":"6545","tag":"","t":1523698547,"ding":"203","favourite":"20","top_cmt":null,"themes":null},{"type":"10","text":"\u201c对不起,我们公司不招35岁的人\u201d","user_id":"18682920","name":"黑皮别用嘴","screen_name":"黑皮别用嘴","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/05/02/5ae98642d81a2_mini.jpg","created_at":"2018-05-04 21:46:02","create_time":null,"passtime":"2018-05-04 21:46:02","love":"208","hate":"14","comment":"32","repost":"36","bookmark":"32","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"55163","theme_name":"主版块","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"14","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/05/04/5aec4a452cc97_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/05/04/5aec4a452cc97_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/05/04/5aec4a452cc97_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/05/04/5aec4a452cc97_1.jpg","width":"640","height":"12904","tag":"","t":1525441562,"ding":"208","favourite":"32","top_cmt":null,"themes":null},{"type":"10","text":"泰国韦小宝?58岁男子自曝娶妻120人 每周轮流宠幸\u201c雨露均沾\u201d~","user_id":"6281065","name":"爱笑de小公主","screen_name":"爱笑de小公主","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/09/20/59c21169151fc_mini.jpg","created_at":"2017-09-16 23:52:01","create_time":null,"passtime":"2017-09-16 23:52:01","love":"950","hate":"134","comment":"176","repost":"1","bookmark":"1","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"473","theme_name":"社会新闻","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"134","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2017/09/15/59bbac131381f_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2017/09/15/59bbac131381f_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2017/09/15/59bbac131381f_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2017/09/15/59bbac131381f_1.jpg","width":"750","height":"5559","tag":"","t":1505577121,"ding":"950","favourite":"1","top_cmt":null,"themes":null},{"type":"10","text":"这小崽子还吐舌头,好萌的啊","user_id":"20428549","name":"相思泪一线牵","screen_name":"相思泪一线牵","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/03/17/58cb936da1171_mini.jpg","created_at":"2018-04-13 02:56:02","create_time":null,"passtime":"2018-04-13 02:56:02","love":"98","hate":"32","comment":"4","repost":"8","bookmark":"3","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"32","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2017/03/20/58ceab695bbe4.gif","image2":"http://wimg.spriteapp.cn/ugc/2017/03/20/58ceab695bbe4.gif","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2017/03/20/58ceab695bbe4.gif","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2017/03/20/58ceab695bbe4.gif","width":"260","height":"188","tag":"","t":1523559362,"ding":"98","favourite":"3","top_cmt":null,"themes":null},{"type":"10","text":"朴树借钱、追债是要把我笑死吗?可真够有性格的~","user_id":"20385456","name":"摸咪校尉","screen_name":"摸咪校尉","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/11/28/5a1cd9941d213_mini.jpg","created_at":"2018-05-01 22:10:01","create_time":null,"passtime":"2018-05-01 22:10:01","love":"370","hate":"42","comment":"33","repost":"6","bookmark":"8","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"58240","theme_name":"搞笑图片","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"42","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/05/01/5ae74dc5dc90f_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/05/01/5ae74dc5dc90f_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/05/01/5ae74dc5dc90f_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/05/01/5ae74dc5dc90f_1.jpg","width":"576","height":"3216","tag":"","t":1525183801,"ding":"370","favourite":"8","top_cmt":null,"themes":null},{"type":"10","text":"地域黑到底有多伤人?","user_id":"19230940","name":"知乎专栏","screen_name":"知乎专栏","profile_image":"http://wimg.spriteapp.cn/profile/large/2018/03/03/5a99f25858592_mini.jpg","created_at":"2018-03-10 17:44:01","create_time":null,"passtime":"2018-03-10 17:44:01","love":"1464","hate":"143","comment":"719","repost":"9","bookmark":"23","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"5170","theme_name":"8090","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"143","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/03/09/5aa27d6d64d46_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/03/09/5aa27d6d64d46_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/03/09/5aa27d6d64d46_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/03/09/5aa27d6d64d46_1.jpg","width":"720","height":"1338","tag":"","t":1520675041,"ding":"1464","favourite":"23","top_cmt":null,"themes":null},{"type":"10","text":"这是每天早上的你吗?","user_id":"18682920","name":"黑皮咪咪眼","screen_name":"黑皮咪咪眼","profile_image":"http://wimg.spriteapp.cn/profile/large/2016/06/27/577119b7d372e_mini.jpg","created_at":"2018-04-06 10:23:23","create_time":null,"passtime":"2018-04-06 10:23:23","love":"171","hate":"10","comment":"61","repost":"4","bookmark":"1","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"10","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/04/05/5ac59a009baf0.gif","image2":"http://wimg.spriteapp.cn/ugc/2018/04/05/5ac59a009baf0.gif","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/04/05/5ac59a009baf0.gif","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/04/05/5ac59a009baf0.gif","width":"180","height":"354","tag":"","t":1522981403,"ding":"171","favourite":"1","top_cmt":null,"themes":null},{"type":"10","text":"未来餐厅的点餐系统,真的是直观又方便!!","user_id":"18619888","name":"搞笑小村","screen_name":"搞笑小村","profile_image":"http://wimg.spriteapp.cn/profile/large/2016/12/26/586059118dd30_mini.jpg","created_at":"2017-10-12 17:42:01","create_time":null,"passtime":"2017-10-12 17:42:01","love":"885","hate":"83","comment":"268","repost":"54","bookmark":"69","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"3500","theme_name":"社会百态","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"83","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2017/10/11/59dcfb4c6580a.gif","image2":"http://wimg.spriteapp.cn/ugc/2017/10/11/59dcfb4c6580a.gif","is_gif":true,"image0":"http://wimg.spriteapp.cn/ugc/2017/10/11/59dcfb4c6580a.gif","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2017/10/11/59dcfb4c6580a.gif","width":"193","height":"290","tag":"","t":1507801321,"ding":"885","favourite":"69","top_cmt":null,"themes":null},{"type":"10","text":"能把腰弯的这么低,真是辛苦了,做个服务员也真是不容易","user_id":"20208094","name":"黑皮喷喷水","screen_name":"黑皮喷喷水","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/02/10/589d54ae9d325_mini.jpg","created_at":"2018-04-03 23:00:02","create_time":null,"passtime":"2018-04-03 23:00:02","love":"181","hate":"20","comment":"44","repost":"1","bookmark":"2","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"56779","theme_name":"都是大奇葩","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"20","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/04/01/5ac0f4eb9b171.gif","image2":"http://wimg.spriteapp.cn/ugc/2018/04/01/5ac0f4eb9b171.gif","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/04/01/5ac0f4eb9b171.gif","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/04/01/5ac0f4eb9b171.gif","width":"175","height":"246","tag":"","t":1522767602,"ding":"181","favourite":"2","top_cmt":null,"themes":null},{"type":"10","text":"第一时间是找手机拍照,没毛病!","user_id":"19268252","name":"夏小檬","screen_name":"夏小檬","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/10/09/59db2392b3321_mini.jpg","created_at":"2017-10-02 22:22:02","create_time":null,"passtime":"2017-10-02 22:22:02","love":"1480","hate":"86","comment":"123","repost":"126","bookmark":"57","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"17083","theme_name":"爆笑Gif","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"86","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2017/10/02/59d175c800dd4.gif","image2":"http://wimg.spriteapp.cn/ugc/2017/10/02/59d175c800dd4.gif","is_gif":true,"image0":"http://wimg.spriteapp.cn/ugc/2017/10/02/59d175c800dd4.gif","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2017/10/02/59d175c800dd4.gif","width":"215","height":"239","tag":"","t":1506954122,"ding":"1480","favourite":"57","top_cmt":null,"themes":null},{"type":"10","text":"狗穿上衣服都比你帅!","user_id":"19531820","name":"臭宝蛋蛋","screen_name":"臭宝蛋蛋","profile_image":"http://tva4.sinaimg.cn/crop.0.0.996.996.50/e7f9e94djw8f6ursgyso3j20ro0rp0wy.jpg","created_at":"2018-03-27 20:30:02","create_time":null,"passtime":"2018-03-27 20:30:02","love":"1188","hate":"72","comment":"237","repost":"263","bookmark":"249","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"56779","theme_name":"都是大奇葩","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"72","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/03/26/5ab881c7f0173_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/03/26/5ab881c7f0173_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/03/26/5ab881c7f0173_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/03/26/5ab881c7f0173_1.jpg","width":"750","height":"16481","tag":"","t":1522153802,"ding":"1188","favourite":"249","top_cmt":null,"themes":null},{"type":"10","text":"经典小说排行榜前十名 强烈推荐必看的经典小说","user_id":"6281065","name":"爱笑de小公主","screen_name":"爱笑de小公主","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/09/20/59c21169151fc_mini.jpg","created_at":"2017-10-07 11:56:02","create_time":null,"passtime":"2017-10-07 11:56:02","love":"2114","hate":"166","comment":"1101","repost":"610","bookmark":"3706","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"0","theme_name":"","theme_type":"0","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"166","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2017/10/05/59d511cec276f_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2017/10/05/59d511cec276f_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2017/10/05/59d511cec276f_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2017/10/05/59d511cec276f_1.jpg","width":"750","height":"13720","tag":"","t":1507348562,"ding":"2114","favourite":"3706","top_cmt":null,"themes":null},{"type":"10","text":"段友们,加油","user_id":"17716501","name":"云海与jie","screen_name":"云海与jie","profile_image":"http://qzapp.qlogo.cn/qzapp/100336987/27778E1C296D23470B61A115571C2B65/100","created_at":"2018-04-10 23:11:18","create_time":null,"passtime":"2018-04-10 23:11:18","love":"303","hate":"21","comment":"248","repost":"2","bookmark":"2","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"58240","theme_name":"搞笑图片","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"21","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/04/10/5accbceb26071_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/04/10/5accbceb26071_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/04/10/5accbceb26071_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/04/10/5accbceb26071_1.jpg","width":"748","height":"748","tag":"","t":1523373078,"ding":"303","favourite":"2","top_cmt":null,"themes":null},{"type":"10","text":"孩子睡着的那一刻,我内心的喜悦你想象不到","user_id":"18809558","name":"喒你家玻璃","screen_name":"喒你家玻璃","profile_image":"http://wimg.spriteapp.cn/profile/large/2016/09/29/57ec70bf1adcb_mini.jpg","created_at":"2018-04-17 23:25:40","create_time":null,"passtime":"2018-04-17 23:25:40","love":"133","hate":"8","comment":"14","repost":"15","bookmark":"7","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"3500","theme_name":"社会百态","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"8","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/04/16/5ad4a36a5de9e_1.jpg","image2":"http://wimg.spriteapp.cn/ugc/2018/04/16/5ad4a36a5de9e_1.jpg","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/04/16/5ad4a36a5de9e_1.jpg","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/04/16/5ad4a36a5de9e_1.jpg","width":"1080","height":"19926","tag":"","t":1523978740,"ding":"133","favourite":"7","top_cmt":null,"themes":null},{"type":"10","text":"第一次看到这么大的鱼,现在该怎么办?","user_id":"19064947","name":"搞笑内涵侠","screen_name":"搞笑内涵侠","profile_image":"http://wimg.spriteapp.cn/profile/large/2017/03/01/58b6ed2126d85_mini.jpg","created_at":"2018-05-12 22:12:01","create_time":null,"passtime":"2018-05-12 22:12:01","love":"137","hate":"4","comment":"124","repost":"1","bookmark":"1","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"17083","theme_name":"爆笑Gif","theme_type":"1","videouri":"","videotime":0,"original_pid":"0","cache_version":2,"playcount":null,"playfcount":null,"cai":"4","weixin_url":null,"image1":"http://wimg.spriteapp.cn/ugc/2018/05/08/5af141fa11509.gif","image2":"http://wimg.spriteapp.cn/ugc/2018/05/08/5af141fa11509.gif","is_gif":false,"image0":"http://wimg.spriteapp.cn/ugc/2018/05/08/5af141fa11509.gif","image_small":null,"cdn_img":"http://wimg.spriteapp.cn/ugc/2018/05/08/5af141fa11509.gif","width":"188","height":"261","tag":"","t":1526134321,"ding":"137","favourite":"1","top_cmt":null,"themes":null}]
     */

    private int code;
    private String msg;
    private List<DataBean> data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * type : 10
         * text : 好厉害的手绘,可以说非常非常的立体了
         * user_id : 17474065
         * name : 马小梅
         * screen_name : 马小梅
         * profile_image : http://wimg.spriteapp.cn/profile/large/2018/02/24/5a90448611639_mini.jpg
         * created_at : 2018-04-15 08:10:01
         * create_time : null
         * passtime : 2018-04-15 08:10:01
         * love : 359
         * hate : 92
         * comment : 315
         * repost : 4
         * bookmark : 13
         * bimageuri :
         * voiceuri : null
         * voicetime : null
         * voicelength : null
         * status : 4
         * theme_id : 55163
         * theme_name : 主版块
         * theme_type : 1
         * videouri :
         * videotime : 0
         * original_pid : 0
         * cache_version : 2
         * playcount : null
         * playfcount : null
         * cai : 92
         * weixin_url : null
         * image1 : http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg
         * image2 : http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg
         * is_gif : false
         * image0 : http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg
         * image_small : null
         * cdn_img : http://wimg.spriteapp.cn/ugc/2018/04/14/5ad1bab50067a_1.jpg
         * width : 460
         * height : 3445
         * tag :
         * t : 1523751001
         * ding : 359
         * favourite : 13
         * top_cmt : null
         * themes : null
         */

        private String type;
        private String text;
        private String user_id;
        private String name;
        private String screen_name;
        private String profile_image;
        private String created_at;
        private Object create_time;
        private String passtime;
        private String love;
        private String hate;
        private String comment;
        private String repost;
        private String bookmark;
        private String bimageuri;
        private Object voiceuri;
        private Object voicetime;
        private Object voicelength;
        private String status;
        private String theme_id;
        private String theme_name;
        private String theme_type;
        private String videouri;
        private int videotime;
        private String original_pid;
        private int cache_version;
        private Object playcount;
        private Object playfcount;
        private String cai;
        private Object weixin_url;
        private String image1;
        private String image2;
        private boolean is_gif;
        private String image0;
        private Object image_small;
        private String cdn_img;
        private String width;
        private String height;
        private String tag;
        private int t;
        private String ding;
        private String favourite;
        private Object top_cmt;
        private Object themes;

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public String getUser_id() {
            return user_id;
        }

        public void setUser_id(String user_id) {
            this.user_id = user_id;
        }

        public String getName() {
            return name;
        }

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

        public String getScreen_name() {
            return screen_name;
        }

        public void setScreen_name(String screen_name) {
            this.screen_name = screen_name;
        }

        public String getProfile_image() {
            return profile_image;
        }

        public void setProfile_image(String profile_image) {
            this.profile_image = profile_image;
        }

        public String getCreated_at() {
            return created_at;
        }

        public void setCreated_at(String created_at) {
            this.created_at = created_at;
        }

        public Object getCreate_time() {
            return create_time;
        }

        public void setCreate_time(Object create_time) {
            this.create_time = create_time;
        }

        public String getPasstime() {
            return passtime;
        }

        public void setPasstime(String passtime) {
            this.passtime = passtime;
        }

        public String getLove() {
            return love;
        }

        public void setLove(String love) {
            this.love = love;
        }

        public String getHate() {
            return hate;
        }

        public void setHate(String hate) {
            this.hate = hate;
        }

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public String getRepost() {
            return repost;
        }

        public void setRepost(String repost) {
            this.repost = repost;
        }

        public String getBookmark() {
            return bookmark;
        }

        public void setBookmark(String bookmark) {
            this.bookmark = bookmark;
        }

        public String getBimageuri() {
            return bimageuri;
        }

        public void setBimageuri(String bimageuri) {
            this.bimageuri = bimageuri;
        }

        public Object getVoiceuri() {
            return voiceuri;
        }

        public void setVoiceuri(Object voiceuri) {
            this.voiceuri = voiceuri;
        }

        public Object getVoicetime() {
            return voicetime;
        }

        public void setVoicetime(Object voicetime) {
            this.voicetime = voicetime;
        }

        public Object getVoicelength() {
            return voicelength;
        }

        public void setVoicelength(Object voicelength) {
            this.voicelength = voicelength;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getTheme_id() {
            return theme_id;
        }

        public void setTheme_id(String theme_id) {
            this.theme_id = theme_id;
        }

        public String getTheme_name() {
            return theme_name;
        }

        public void setTheme_name(String theme_name) {
            this.theme_name = theme_name;
        }

        public String getTheme_type() {
            return theme_type;
        }

        public void setTheme_type(String theme_type) {
            this.theme_type = theme_type;
        }

        public String getVideouri() {
            return videouri;
        }

        public void setVideouri(String videouri) {
            this.videouri = videouri;
        }

        public int getVideotime() {
            return videotime;
        }

        public void setVideotime(int videotime) {
            this.videotime = videotime;
        }

        public String getOriginal_pid() {
            return original_pid;
        }

        public void setOriginal_pid(String original_pid) {
            this.original_pid = original_pid;
        }

        public int getCache_version() {
            return cache_version;
        }

        public void setCache_version(int cache_version) {
            this.cache_version = cache_version;
        }

        public Object getPlaycount() {
            return playcount;
        }

        public void setPlaycount(Object playcount) {
            this.playcount = playcount;
        }

        public Object getPlayfcount() {
            return playfcount;
        }

        public void setPlayfcount(Object playfcount) {
            this.playfcount = playfcount;
        }

        public String getCai() {
            return cai;
        }

        public void setCai(String cai) {
            this.cai = cai;
        }

        public Object getWeixin_url() {
            return weixin_url;
        }

        public void setWeixin_url(Object weixin_url) {
            this.weixin_url = weixin_url;
        }

        public String getImage1() {
            return image1;
        }

        public void setImage1(String image1) {
            this.image1 = image1;
        }

        public String getImage2() {
            return image2;
        }

        public void setImage2(String image2) {
            this.image2 = image2;
        }

        public boolean isIs_gif() {
            return is_gif;
        }

        public void setIs_gif(boolean is_gif) {
            this.is_gif = is_gif;
        }

        public String getImage0() {
            return image0;
        }

        public void setImage0(String image0) {
            this.image0 = image0;
        }

        public Object getImage_small() {
            return image_small;
        }

        public void setImage_small(Object image_small) {
            this.image_small = image_small;
        }

        public String getCdn_img() {
            return cdn_img;
        }

        public void setCdn_img(String cdn_img) {
            this.cdn_img = cdn_img;
        }

        public String getWidth() {
            return width;
        }

        public void setWidth(String width) {
            this.width = width;
        }

        public String getHeight() {
            return height;
        }

        public void setHeight(String height) {
            this.height = height;
        }

        public String getTag() {
            return tag;
        }

        public void setTag(String tag) {
            this.tag = tag;
        }

        public int getT() {
            return t;
        }

        public void setT(int t) {
            this.t = t;
        }

        public String getDing() {
            return ding;
        }

        public void setDing(String ding) {
            this.ding = ding;
        }

        public String getFavourite() {
            return favourite;
        }

        public void setFavourite(String favourite) {
            this.favourite = favourite;
        }

        public Object getTop_cmt() {
            return top_cmt;
        }

        public void setTop_cmt(Object top_cmt) {
            this.top_cmt = top_cmt;
        }

        public Object getThemes() {
            return themes;
        }

        public void setThemes(Object themes) {
            this.themes = themes;
        }
    }
}

module  的借楼和类


接口

MoIm

public interface MoIm {
    void getdata(String page);
}

Mod 类

import com.bawei.waglboday21.bean.Userbean;
import com.bawei.waglboday21.net.Api;
import com.bawei.waglboday21.net.OkhttpUntils;
import com.bawei.waglboday21.per.Per;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * Created by   on 2018/5/21.
 */

public class Mod implements MoIm {
    private Per p;

    public Mod(Per p) {
        this.p = p;
    }

    @Override
    public void getdata(String page) {
        OkhttpUntils.getmInstance().getRequestInterface(Api.URL).getDame(page).enqueue(new Callback<Userbean>() {
            @Override
            public void onResponse(Call<Userbean> call, Response<Userbean> response) {
                Userbean body = response.body();
               p.getsuccess(body);
            }

            @Override
            public void onFailure(Call<Userbean> call, Throwable t) {

            }
        });
    }
}

Myapp包里面的类

 

import android.app.Application;

import com.facebook.drawee.backends.pipeline.Fresco;

/**
 * Created by   on 2018/5/21.
 */

public class Myapp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Fresco.initialize(this);
    }
}

net 包

public interface Api {
    //https://www.apiopen.top/satinApi?type=3&page=1
    public String URL="https://www.apiopen.top/";
}

public interface GetRequest {
    //https://www.apiopen.top/satinApi?type=3&page=1
    @GET("satinApi")
    Call<Userbean> getDame(@Query("page") String page);
    //https://www.apiopen.top/satinApi?type=4&page=1
    @GET("satinApi")
    Call<Movbean> getData(@Query("page") String page);


}
import java.io.IOException;

import okhttp3.FormBody;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by   on 2018/5/21.
 */

public class MyInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Response response;
        //区分是GET请求还是POST请求
        Request originRequest = chain.request();
        if ("GET".equals(originRequest.method())) {
            HttpUrl httpUrl = originRequest.url()
                    .newBuilder()
                    .addQueryParameter("type", "3")
                    .build();
            Request request = new Request.Builder().url(httpUrl).build();
            //发送请求
            response = chain.proceed(request);
        } else {
            FormBody.Builder builder = new FormBody.Builder();

            FormBody body = (FormBody) originRequest.body();
            int size = body.size();
            for (int i = 0; i < size; i++) {
                builder.add(body.name(i), body.value(i));
            }
            builder.add("type", "3");
            FormBody formBody = builder.build();
            Request request = new Request.Builder()
                    .url(originRequest.url())
                    .post(formBody)
                    .build();
            response = chain.proceed(request);

        }
        return response;
    }
}
import okhttp3.OkHttpClient;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by   on 2018/5/21.
 */


public class OkhttpUntils {
    private volatile static OkhttpUntils util=null;
    private OkhttpUntils(){
    }
    public static OkhttpUntils getmInstance(){
        if (util==null){
            synchronized (OkhttpUntils.class){
                if (util==null){
                    util=new OkhttpUntils();
                }
            }
        }
        return util;
    }


    public GetRequest  getRequestInterface(String str){
        //okHttp拦截器
        OkHttpClient builder = new OkHttpClient.Builder()
                .addInterceptor(new MyInterceptor())//拦截器
                .build();

        //创建Retrofit实例
        retrofit2.Retrofit retrofit=new retrofit2.Retrofit.Builder()
                .baseUrl(str)//设置网路请求URL
                .client(builder)//设置okHttp拦截器
                .addConverterFactory(GsonConverterFactory.create())//设置数据解析器
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())//支持RXjava平台
                .build();

        GetRequest  anInterface = retrofit.create(GetRequest.class);

        return anInterface;
    }
}

P层  per

public interface PerIm {
    void getdata(String page);
    void getsuccess( Userbean body);
}
public class Per implements PerIm {
    private Mod mod;
    private DataView dataView;

    public Per(DataView dataView) {
        this.dataView = dataView;
        mod=new Mod(this);
    }

    @Override
    public void getdata(String page) {
        mod.getdata(page);
    }

    @Override
    public void getsuccess(Userbean body) {
        dataView.getSuccess(body);
    }
}

view包分为  imgfragment 和 movfragment 包

i美股fragment有接口和类

public interface DataView {

    void getSuccess(Userbean body);
}
public class Fragment_img extends Fragment implements DataView {
    private View view;
    /**
     * asdasd
     */
    private String page = "1";
    private RecyclerView rv;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.img_fragment, container, false);
        //Pceng
        new Per(this).getdata(page);


        initView(view);
        //布局管理
        rv.setLayoutManager( new LinearLayoutManager(getContext()));
        return view;
    }


    @Override
    public void getSuccess(Userbean body) {
        //获取成功的 数据
        List<Userbean.DataBean> data = body.getData();
        Myimgadapter myimgadapter = new Myimgadapter(data, getContext());
        rv.setAdapter(myimgadapter);
        Log.e("aaaaaaa",data.size()+"");

    }


    private void initView(View view) {
        rv = (RecyclerView) view.findViewById(R.id.rv);
    }
}

movfragment

 m  p  Untils  v 包

m包

public interface ModIm {
    void login(String string);
}
public class MMod implements ModIm{
  private Perer perer;

    public MMod(Perer perer) {
        this.perer = perer;
    }

    @Override
    public void login(String string) {
        OkhttpUntils1.getmInstance().getRequestInterface(Api.URL).getData(string).enqueue(new Callback<Movbean>() {
            @Override
            public void onResponse(Call<Movbean> call, Response<Movbean> response) {
                Movbean body = response.body();
                perer.getsuccess(body);
            }

            @Override
            public void onFailure(Call<Movbean> call, Throwable t) {

            }
        });
    }
}
p包

    

public interface PerIm {
    void getdata(String page);
    void getsuccess( Movbean body);
}
public class Perer implements PerIm  {
    private LoginView loginView;
    private MMod mMod;

    public Perer(LoginView loginView ) {
        this.loginView = loginView;
         mMod = new MMod(this);
    }

    @Override
    public void getdata(String page) {
    mMod.login(page);
    }

    @Override
    public void getsuccess(Movbean body) {
        loginView.getSuccess(body);
    }
}

Untils

public class OkhttpUntils1 {
    private volatile static OkhttpUntils1 util=null;
    private OkhttpUntils1(){
    }
    public static OkhttpUntils1 getmInstance(){
        if (util==null){
            synchronized (OkhttpUntils.class){
                if (util==null){
                    util=new OkhttpUntils1();
                }
            }
        }
        return util;
    }


    public GetRequest getRequestInterface(String str){
        //okHttp拦截器
        OkHttpClient builder = new OkHttpClient.Builder()
                .addInterceptor(new MyInterceptor1())//拦截器
                .build();

        //创建Retrofit实例
        retrofit2.Retrofit retrofit=new retrofit2.Retrofit.Builder()
                .baseUrl(str)//设置网路请求URL
                .client(builder)//设置okHttp拦截器
                .addConverterFactory(GsonConverterFactory.create())//设置数据解析器
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())//支持RXjava平台
                .build();

        GetRequest  anInterface = retrofit.create(GetRequest.class);

        return anInterface;
    }
}
public class MyInterceptor1 implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Response response;
        //区分是GET请求还是POST请求
        Request originRequest = chain.request();
        if ("GET".equals(originRequest.method())) {
            HttpUrl httpUrl = originRequest.url()
                    .newBuilder()
                    .addQueryParameter("type", "4")
                    .build();
            Request request = new Request.Builder().url(httpUrl).build();
            //发送请求
            response = chain.proceed(request);
        } else {
            FormBody.Builder builder = new FormBody.Builder();

            FormBody body = (FormBody) originRequest.body();
            int size = body.size();
            for (int i = 0; i < size; i++) {
                builder.add(body.name(i), body.value(i));
            }
            builder.add("type", "4");
            FormBody formBody = builder.build();
            Request request = new Request.Builder()
                    .url(originRequest.url())
                    .post(formBody)
                    .build();
            response = chain.proceed(request);

        }
        return response;
    }
}


public interface LoginView {
    void getSuccess(Movbean body);
}
public class Fragment_mov extends Fragment implements LoginView {
    private View view;
    private RecyclerView aaa;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.mov_freagment, container, false);
        new Perer(this).getdata(1 + "");
        initView(view);

        aaa.setLayoutManager(new LinearLayoutManager(getContext()));
        return view;
    }

    @Override
    public void getSuccess(Movbean body) {
        // Log.d("haha", "getSuccess: "+body.getMsg());
        List<Movbean.DataBean> data = body.getData();
        Myadapter myadapter = new Myadapter(data, getContext());
        aaa.setAdapter(myadapter);


    }

    private void initView(View view) {
        aaa = (RecyclerView) view.findViewById(R.id.aaa);
    }
}
public class ShowActivity extends AppCompatActivity {
    private SurfaceView surfaceView;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show);
        surfaceView = (SurfaceView) findViewById(R.id.surfaceView);

            Intent intent = getIntent();
            final String uri = intent.getStringExtra("url");
            Log.e("asdasdasdasd",uri);
            final MediaPlayer mediaPlayer = new MediaPlayer();
        SurfaceHolder surfaceHolder = surfaceView.getHolder();
        mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
            @Override
            public void onPrepared(MediaPlayer mp) {
                //准备完成后播放
                mediaPlayer.start();
            }
        });

        surfaceHolder.addCallback(new SurfaceHolder.Callback() {
            //当SurfaceView中Surface创建时回掉
            //该方法表示Surface已经创建完成,可以在该方法中进行绘图操作
            @Override
            public void surfaceCreated(SurfaceHolder holder) {
                mediaPlayer.reset();
                try {
                    //设置视屏文件图像的显示参数
                    mediaPlayer.setDisplay(holder);

                    //file.getAbsolutePath()本地视频
                    //uri 网络视频
                    mediaPlayer.setDataSource(ShowActivity.this, Uri.parse(uri));
                    //prepare();表示准备工作同步进行,(准备工作在UI线程中进行)
                    //当播放网络视频时,如果网络不要 会报ARN 所以不采用该方法
                    //mediaPlayer.prepare();
                    //异步准备 准备工作在子线程中进行 当播放网络视频时候一般采用此方法
                    mediaPlayer.prepareAsync();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }

            //当SurfaceView的大小发生改变时候触发该方法
            @Override
            public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {

            }
            //Surface销毁时回掉
            //当Surface销毁时候,同时把MediaPlayer也销毁
            @Override
            public void surfaceDestroyed(SurfaceHolder holder) {
                if (mediaPlayer!=null) {
                    mediaPlayer.stop();
                    //释放资源
                    mediaPlayer.release();
                }
            }
        });
        //设置 surfaceView点击监听
        surfaceView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                switch (event.getAction()) {
                    case MotionEvent.ACTION_DOWN:
                        if (mediaPlayer.isPlaying()) {
                            mediaPlayer.pause();
                        } else {
                            mediaPlayer.start();
                        }
                        break;
                }
                //返回True代表事件已经处理了
                return true;
            }
        });
    }

}

Main

public class MainActivity extends AppCompatActivity implements RadioGroup.OnCheckedChangeListener {

    private RadioGroup radio;
    private FrameLayout fl;
    private Fragment_img ig;
    private Fragment_mov mv;
    /**
     * 图片
     */
    private RadioButton img;
    /**
     * 视频
     */
    private RadioButton mov;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ig = new Fragment_img();
        mv = new Fragment_mov();


        initView();
        //默认显示
        getSupportFragmentManager().beginTransaction().add(R.id.fl, ig).commit();
    }

    private void initView() {
        radio = (RadioGroup) findViewById(R.id.radio);
        fl = (FrameLayout) findViewById(R.id.fl);
        //jainting
        radio.setOnCheckedChangeListener(this);
        img = (RadioButton) findViewById(R.id.img);
        mov = (RadioButton) findViewById(R.id.mov);
    }

    @Override
    public void onCheckedChanged(RadioGroup radioGroup, int i) {
        switch (i) {
            case R.id.img:
                img.setTextColor(Color.BLACK);
                mov.setTextColor(Color.WHITE);
                getSupportFragmentManager().beginTransaction().replace(R.id.fl, ig).commit();
                break;
            case R.id.mov:
                img.setTextColor(Color.WHITE);
                mov.setTextColor(Color.BLACK);
                getSupportFragmentManager().beginTransaction().replace(R.id.fl, mv).commit();
                break;
        }
    }
}

buju

public class MainActivity extends AppCompatActivity implements RadioGroup.OnCheckedChangeListener {

    private RadioGroup radio;
    private FrameLayout fl;
    private Fragment_img ig;
    private Fragment_mov mv;
    /**
     * 图片
     */
    private RadioButton img;
    /**
     * 视频
     */
    private RadioButton mov;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ig = new Fragment_img();
        mv = new Fragment_mov();


        initView();
        //默认显示
        getSupportFragmentManager().beginTransaction().add(R.id.fl, ig).commit();
    }

    private void initView() {
        radio = (RadioGroup) findViewById(R.id.radio);
        fl = (FrameLayout) findViewById(R.id.fl);
        //jainting
        radio.setOnCheckedChangeListener(this);
        img = (RadioButton) findViewById(R.id.img);
        mov = (RadioButton) findViewById(R.id.mov);
    }

    @Override
    public void onCheckedChanged(RadioGroup radioGroup, int i) {
        switch (i) {
            case R.id.img:
                img.setTextColor(Color.BLACK);
                mov.setTextColor(Color.WHITE);
                getSupportFragmentManager().beginTransaction().replace(R.id.fl, ig).commit();
                break;
            case R.id.mov:
                img.setTextColor(Color.WHITE);
                mov.setTextColor(Color.BLACK);
                getSupportFragmentManager().beginTransaction().replace(R.id.fl, mv).commit();
                break;
        }
    }
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.bawei.waglboday21.view.movfragment.v.ShowActivity">
  <!--  <WebView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:hardwareAccelerated="true"
        android:id="@+id/wb"></WebView>-->
  <SurfaceView
      android:layout_centerInParent="true"
      android:layout_width="match_parent"
      android:layout_height="400dp"
      android:id="@+id/surfaceView" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
     >

  <android.support.v7.widget.RecyclerView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/rv"
      />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:fresco="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">
 <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="horizontal">
     <com.facebook.drawee.view.SimpleDraweeView
         android:layout_width="50dp"
         android:layout_height="50dp"
         android:id="@+id/sdv"
         fresco:placeholderImage="@mipmap/ic_launcher"
         fresco:roundAsCircle="true"
         android:layout_weight="3"
         ></com.facebook.drawee.view.SimpleDraweeView>
     <LinearLayout
         android:layout_weight="7"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical">
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
             android:id="@+id/name"/>
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
             android:id="@+id/time1"/>
     </LinearLayout>
 </LinearLayout>
    <com.facebook.drawee.view.SimpleDraweeView
        android:layout_width="450dp"
        android:layout_height="800dp"

        fresco:placeholderImage="@mipmap/ic_launcher"
        android:id="@+id/sdv__"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
     >
<android.support.v7.widget.RecyclerView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/aaa"></android.support.v7.widget.RecyclerView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:fresco="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    >
 <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="horizontal">
     <com.facebook.drawee.view.SimpleDraweeView
         android:layout_width="50dp"
         android:layout_height="50dp"
         fresco:roundAsCircle="true"
         android:id="@+id/iv"/>
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical">
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
             android:id="@+id/tvname"/>
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="5dp"
             android:id="@+id/tvtime"/>
     </LinearLayout>


 </LinearLayout>
    <com.facebook.drawee.view.SimpleDraweeView
        android:layout_width="450dp"
        android:layout_height="300dp"
        fresco:placeholderImage="@mipmap/ic_launcher"
        android:id="@+id/tvsdv"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#fff"
        android:orientation="horizontal">
        <TextView
            android:padding="10dp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:id="@+id/like"
            android:gravity="center"
            android:text="dianzan"/>
        <TextView
            android:padding="10dp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:id="@+id/notlike"
            android:gravity="center"
            android:text="buxihuan"/>
        <TextView
            android:padding="10dp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:id="@+id/sharp"
            android:gravity="center"
            android:text="fenxiang"/>
        <TextView
            android:padding="10dp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:id="@+id/talk"
            android:text="pinglun"/>
    </LinearLayout>
</LinearLayout>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jonly_W

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值