TabLayout+ViewPager无限轮播加小圆点,XRecyclerView下拉刷新,加载更多
效果图
要导入的依赖
compile files('libs/okhttp-3.9.0.jar')
compile files('libs/okio-1.13.0.jar')
compile files('libs/gson-2.2.4.jar')
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
要记得加网络权限
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:name=".Appliction.MyAppliction"
MainActivity
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.widget.RadioGroup;
import com.example.montchcode.R;
import com.example.montchcode.fragment.FragmentOne;
import com.example.montchcode.fragment.FragmentSi;
import com.example.montchcode.fragment.FragmentThree;
import com.example.montchcode.fragment.FragmentTwo;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends FragmentActivity{
private TabLayout mTb;
private ViewPager mVp;
String[] title={"最新日报","专栏","热门","主题日报"};
private List<Fragment> list;
private RadioGroup rg;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
initView();
showFragment();
//创建适配器
MyViewPager adapter=new MyViewPager(getSupportFragmentManager());
mVp.setAdapter(adapter);
//设置可以滑动
mTb.setTabMode(TabLayout.MODE_SCROLLABLE);
//在TabLayout和ViewPager关联后,标题会消失
//所以要在PagerAdapter中重写一个方法
mTb.setupWithViewPager(mVp);
//默认选中状态
rg.check(R.id.rb1);
//ViewPager和RadioGroup的联动
rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
switch (i){
case R.id.rb1:
mVp.setCurrentItem(0);
break;
case R.id.rb2:
mVp.setCurrentItem(1);
break;
case R.id.rb3:
mVp.setCurrentItem(2);
break;
case R.id.rb4:
mVp.setCurrentItem(3);
break;
default:
break;
}
}
});
}
//初始化控件
private void initView() {
mTb = (TabLayout) findViewById(R.id.tb);
mVp = (ViewPager) findViewById(R.id.vp);
rg = (RadioGroup) findViewById(R.id.rg);
}
private void showFragment() {
list = new ArrayList<Fragment>();
list.add(new FragmentOne());
list.add(new FragmentTwo());
list.add(new FragmentThree());
list.add(new FragmentSi());
}
//创建适配器
public class MyViewPager extends FragmentPagerAdapter {
public MyViewPager(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int arg0) {
return list.get(arg0);
}
@Override
public int getCount() {
return list.size();
}
@Override
public CharSequence getPageTitle(int position) {
return title[position];
}
}
}
drawable里的selector样式
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/holo_orange_light" android:state_checked="true"></item>
<item android:drawable="@android:color/holo_green_light"></item>
</selector>
activity_main布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.montchcode.activity.HomeActivity">
<android.support.design.widget.TabLayout
android:id="@+id/tb"
android:layout_width="match_parent"
android:layout_height="30dp"></android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/vp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tb"
></android.support.v4.view.ViewPager>
<RadioGroup
android:id="@+id/rg"
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
>
<RadioButton
android:id="@+id/rb1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="页面一"
android:button="@null"
android:gravity="center"
android:background="@drawable/seleroct"
/>
<RadioButton
android:id="@+id/rb2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="页面二"
android:button="@null"
android:gravity="center"
android:background="@drawable/seleroct"
/>
<RadioButton
android:id="@+id/rb3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="页面三"
android:button="@null"
android:gravity="center"
android:background="@drawable/seleroct"
/>
<RadioButton
android:id="@+id/rb4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="页面四"
android:button="@null"
android:gravity="center"
android:background="@drawable/seleroct"
/>
</RadioGroup>
</RelativeLayout>
ViewPager+小圆点联动
drawable的圆点的样式
doc_check
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
>
<solid android:color="#0ff"/>
<size android:width="15dp" android:height="15dp"/>
<stroke android:color="#0ff" android:width="1dp"/>
</shape>
doc_uncheck
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
>
<solid android:color="#fff"/>
<size android:width="10dp" android:height="10dp"/>
<stroke android:color="#0ff" android:width="1dp"/>
</shape>
布局
fragone
<?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"
>
<RelativeLayout
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="150dp"
>
<android.support.v4.view.ViewPager
android:id="@+id/main_vp"
android:layout_width="match_parent"
android:layout_height="150dp"
></android.support.v4.view.ViewPager>
<LinearLayout
android:id="@+id/ll_doc"
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal"
android:gravity="center"
android:layout_alignParentBottom="true"
></LinearLayout>
</RelativeLayout>
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/xlv"
android:layout_width="match_parent"
android:layout_height="match_parent"
></com.jcodecraeer.xrecyclerview.XRecyclerView>
</LinearLayout>
FragmentOne
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.example.montchcode.Adapter.MyViewPager;
import com.example.montchcode.Adapter.MyXRecyclerView;
import com.example.montchcode.Bean.Max;
import com.example.montchcode.Bean.XRBean;
import com.example.montchcode.R;
import com.example.montchcode.Utis.OkHttp3Utils;
import com.google.gson.Gson;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.nostra13.universalimageloader.core.ImageLoader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
public class FragmentOne extends Fragment {
List<ImageView> list_doc;
private View view;
private ViewPager vp;
private XRecyclerView mXlv;
List<Max.TopStoriesEntity> list1=new ArrayList<>();
List<XRBean.StoriesEntity> list=new ArrayList<>();
private List<ImageView> listVp;
private MyViewPager adapter;
int type=20131119;
private List<ImageView> listimg;
Handler handler=new Handler();
String str1="http://news-at.zhihu.com/api/4/news/latest";
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view = View.inflate(getActivity(), R.layout.fragone, null);
vp = (ViewPager) view.findViewById(R.id.main_vp);
mXlv = (XRecyclerView)view.findViewById(R.id.xlv);
initDatas();
initData();
LinearLayoutManager ll=new LinearLayoutManager(getActivity());
// GridLayoutManager gl=new GridLayoutManager(getActivity(),2);
mXlv.setLayoutManager(ll);
//想要添加分割线,必须要写上这行代码
mXlv.addItemDecoration(new DividerItemDecoration(getActivity(),DividerItemDecoration.VERTICAL));
//允许加载
mXlv.setLoadingMoreEnabled(true);
//允许刷新
mXlv.setPullRefreshEnabled(true);
//加载样式(加载进度的小圆圈)
mXlv.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
mXlv.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
type++;
initData();
mXlv.refreshComplete();
}
@Override
public void onLoadMore() {
type++;
initData();
mXlv.refreshComplete();
}
});
return view;
}
//ViewPager轮播
private void initDatas() {
OkHttp3Utils.doGet(str1, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
}
@Override
public void onResponse(Call call, Response response) throws IOException {
Gson gson=new Gson();
String strs = response.body().string();
Max max = gson.fromJson(strs, Max.class);
list1=max.getTop_stories();
if (response.isSuccessful()){
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
initVp();
}
});
}
}
});
}
//XRecyclerView
private void initData() {
String str="http://news-at.zhihu.com/api/4/news/before/"+type;
OkHttp3Utils.doGet(str, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
}
@Override
public void onResponse(Call call, Response response) throws IOException {
Gson gson=new Gson();
String strs = response.body().string();
XRBean xrBean = gson.fromJson(strs, XRBean.class);
list=xrBean.getStories();
if (response.isSuccessful()){
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
//initVp();
MyXRecyclerView xlAdapter=new MyXRecyclerView(getActivity(),list);
mXlv.setAdapter(xlAdapter);
xlAdapter.notifyDataSetChanged();
}
});
}
}
});
}
//小圆点
public void initDoc() {
LinearLayout doc = (LinearLayout) view.findViewById(R.id.ll_doc);
listimg = new ArrayList<ImageView>();
if (list1 != null && list1.size() > 0) {
for (int i = 0; i < list1.size(); i++) {
ImageView img = new ImageView(getActivity());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params.rightMargin = 10;
img.setLayoutParams(params);
if (i == 0) {
img.setBackgroundResource(R.drawable.doc_check);
} else {
img.setBackgroundResource(R.drawable.doc_uncheck);
}
doc.addView(img);
listimg.add(img);
}
}
}
//轮播的方法
private void initVp() {
listVp = new ArrayList<ImageView>();
for (int i = 0; i < list1.size(); i++) {
ImageView imageview = new ImageView(getActivity());
imageview.setScaleType(ImageView.ScaleType.FIT_XY);
ImageLoader.getInstance().displayImage(list1.get(i).getImage(), imageview);
listVp.add(imageview);
}
//创建适配器
adapter = new MyViewPager(getActivity(),listVp);
vp.setAdapter(adapter);
initDoc();
vp.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
position %= listimg.size();
for (int i = 0; i < listimg.size(); i++) {
listimg.get(i).setBackgroundResource(R.drawable.doc_uncheck);
}
listimg.get(position).setBackgroundResource(R.drawable.doc_check);
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
handler.postDelayed(new Runnable() {
@Override
public void run() {
int currentItem = vp.getCurrentItem();
currentItem++;
vp.setCurrentItem(currentItem);
handler.postDelayed(this, 2000);
}
}, 2000);
}
//创建ViewPager适配器
public class MyViewPager extends PagerAdapter {
@Override
public int getCount() {
return listVp==null?0:Integer.MAX_VALUE;
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
position =position%listVp.size();
container.addView(listVp.get(position));
return listVp.get(position);
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
// super.destroyItem(container, position, object);
container.removeView((View) object);
}
}
}
OkHttp3Utils封装类
import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.FormBody;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
/**
* 封装类
*/
public class OkHttp3Utils {
private static OkHttpClient okHttpClient = null;
public OkHttp3Utils() {
}
private static OkHttpClient getOkHttpClient() {
synchronized (OkHttp3Utils.class) {
if (okHttpClient == null) {
okHttpClient = new OkHttpClient();
}
}
return okHttpClient;
}
//上传文件
public static void loadFile(String url, File file,String fileName){
OkHttpClient okHttpClient = getOkHttpClient();
//设置文件类型
RequestBody requestBody = RequestBody.create(MediaType.parse("application/octet-stream"),file);
//设置请求体
RequestBody body = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("image",fileName,requestBody)
.build();
//请求方式
Request request = new Request.Builder().url(url).post(body).build();
okHttpClient.newCall(request).enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
}
@Override
public void onResponse(Call call, Response response) throws IOException {
Log.i("成功","成功");
}
});
}
/**
* 1.接口地址
* 2.接口回调
*/
public static void doGet(String url,Callback callback){
OkHttpClient okHttpClient = getOkHttpClient();
Request request = new Request.Builder().url(url).build();
okHttpClient.newCall(request).enqueue(callback);
}
/**
* 1.地址
* 2.接口回调
* 3.请求体
*/
public static void doPost(String url, Map<String,String> map,Callback callback){
OkHttpClient okHttpClient = getOkHttpClient();
FormBody.Builder builder = new FormBody.Builder();
//遍历map集合 设置请求体
for (String mapKey : map.keySet()){
builder.add(mapKey,map.get(mapKey));
}
//设置请求方式
Request request = new Request.Builder().url(url).post(builder.build()).build();
//执行请求方式 接口回调
okHttpClient.newCall(request).enqueue(callback);
}
/**
*1.下载地址
*/
public static void doDown(String url,Callback callback){
OkHttpClient okHttpClient = getOkHttpClient();
Request build = new Request.Builder().url(url).build();
okHttpClient.newCall(build).enqueue(callback);
}
}
Application
import android.app.Application;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
public class MyAppliction extends Application {
@Override
public void onCreate() {
super.onCreate();
ImageLoaderConfiguration cofn = ImageLoaderConfiguration.createDefault(this);
ImageLoader.getInstance().init(cofn);
}
}
XRecyclerView
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.montchcode.Bean.XRBean;
import com.example.montchcode.R;
import com.nostra13.universalimageloader.core.ImageLoader;
import java.util.List;
public class MyXRecyclerView extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
Context context;
List<XRBean.StoriesEntity> list;
private MyViewHolder1 holder1;
public MyXRecyclerView(Context context, List<XRBean.StoriesEntity> list) {
this.context = context;
this.list = list;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
//item1布局
View view1=View.inflate(context, R.layout.item1,null);
//实例化Holder1
holder1 = new MyViewHolder1(view1);
return holder1;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
((MyViewHolder1) holder1).tv.setText(list.get(position).getTitle());
ImageLoader.getInstance().displayImage(list.get(position).getImages().get(0),holder1.iv);
}
@Override
public int getItemCount() {
return list==null ? 0:list.size();
}
//ViewHolder1
class MyViewHolder1 extends RecyclerView.ViewHolder{
TextView tv;
ImageView iv;
public MyViewHolder1(View itemView) {
super(itemView);
tv=itemView.findViewById(R.id.item_tv);
iv=itemView.findViewById(R.id.item_iv);
}
}
}
item1布局
<?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="wrap_content"
android:orientation="vertical"
>
<ImageView
android:id="@+id/item_iv"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:src="@mipmap/ic_launcher"
/>
<TextView
android:id="@+id/item_tv"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:text="haha"
android:textSize="8sp"
android:layout_marginLeft="20dp"
/>
</LinearLayout>
ViewPager解析数据的Bean类
import java.util.List;
public class Max {
/**
* date : 20171025
* stories : [{"images":["https://pic3.zhimg.com/v2-ed8af5cd65b6bca6c9b4966b05e1b72a.jpg"],"type":0,"id":9653414,"ga_prefix":"102510","title":"虽说「人心狠毒」,为什么很少见到真正有毒的哺乳动物?"},{"images":["https://pic4.zhimg.com/v2-c48d2c752ec7b8b183055667b76596c7.jpg"],"type":0,"id":9653540,"ga_prefix":"102509","title":"没和身边人一起进大律所,可后来,我却学得比他们多"},{"images":["https://pic3.zhimg.com/v2-8d3803d6014153f1aa9835b47ccd7db2.jpg"],"type":0,"id":9653658,"ga_prefix":"102508","title":"没有「爆裂脑花」、细思
bug 极多\u2026\u2026唯一的亮点只剩特工代号"},{"images":["https://pic3.zhimg.com/v2-8569d560d951c65cc1c712b8976c8fba.jpg"],"type":0,"id":9653620,"ga_prefix":"102507","title":"身为杂食性动物的两脚兽,我们要吃蔬菜水果,喵汪星人呢?"},{"images":["https://pic2.zhimg.com/v2-340313b0e29d374f9a7fbe3cb45483e1.jpg"],"type":0,"id":9653718,"ga_prefix":"102507","title":"姚老板的球队能卖多少钱,起决定作用的是他另一个身份"},{"images":["https://pic3.zhimg.com/v2-d839d13157eb525ed60c34e39fee4d1a.jpg"],"type":0,"id":9653251,"ga_prefix":"102507","title":"《天才枪手》式的造富神话:非典型批片、中国采购团和弯道超车梦"},{"images":["https://pic1.zhimg.com/v2-ea05acac99ff29b8d1b60de506dbcfe4.jpg"],"type":0,"id":9653582,"ga_prefix":"102506","title":"瞎扯
· 如何正确地吐槽"}]
* top_stories : [{"image":"https://pic2.zhimg.com/v2-e7582788c34b9d40b7b849ea3458d0dd.jpg","type":0,"id":9653718,"ga_prefix":"102507","title":"姚老板的球队能卖多少钱,起决定作用的是他另一个身份"},{"image":"https://pic1.zhimg.com/v2-e5b5e2342378517d1ddeb3f26496367c.jpg","type":0,"id":9653251,"ga_prefix":"102507","title":"《天才枪手》式的造富神话:非典型批片、中国采购团和弯道超车梦"},{"image":"https://pic3.zhimg.com/v2-3820a42752377cd7cbceff405d79e182.jpg","type":0,"id":9653770,"ga_prefix":"102419","title":"对我来说,《英雄联盟》全球总决赛就是最好的体育赛事"},{"image":"https://pic1.zhimg.com/v2-035ee11f84858c12173d1004d49b5d88.jpg","type":0,"id":9653488,"ga_prefix":"102415","title":"为什么
AI 都打败李世石、柯洁了,还是没法帮我洗裤衩、做饭?"},{"image":"https://pic3.zhimg.com/v2-2d2d4ab0075d0fa149e52bcc170164e6.jpg","type":0,"id":9653668,"ga_prefix":"102414","title":"印度送餐产业:多少商学院和大企业想学习,却很难复制"}]
*/
private String date;
/**
* images : ["https://pic3.zhimg.com/v2-ed8af5cd65b6bca6c9b4966b05e1b72a.jpg"]
* type : 0
* id : 9653414
* ga_prefix : 102510
* title : 虽说「人心狠毒」,为什么很少见到真正有毒的哺乳动物?
*/
private List<StoriesEntity> stories;
/**
* image : https://pic2.zhimg.com/v2-e7582788c34b9d40b7b849ea3458d0dd.jpg
* type : 0
* id : 9653718
* ga_prefix : 102507
* title : 姚老板的球队能卖多少钱,起决定作用的是他另一个身份
*/
private List<TopStoriesEntity> top_stories;
public void setDate(String date) {
this.date = date;
}
public void setStories(List<StoriesEntity> stories) {
this.stories = stories;
}
public void setTop_stories(List<TopStoriesEntity> top_stories) {
this.top_stories = top_stories;
}
public String getDate() {
return date;
}
public List<StoriesEntity> getStories() {
return stories;
}
public List<TopStoriesEntity> getTop_stories() {
return top_stories;
}
public static class StoriesEntity {
private int type;
private int id;
private String ga_prefix;
private String title;
private List<String> images;
public void setType(int type) {
this.type = type;
}
public void setId(int id) {
this.id = id;
}
public void setGa_prefix(String ga_prefix) {
this.ga_prefix = ga_prefix;
}
public void setTitle(String title) {
this.title = title;
}
public void setImages(List<String> images) {
this.images = images;
}
public int getType() {
return type;
}
public int getId() {
return id;
}
public String getGa_prefix() {
return ga_prefix;
}
public String getTitle() {
return title;
}
public List<String> getImages() {
return images;
}
}
public static class TopStoriesEntity {
private String image;
private int type;
private int id;
private String ga_prefix;
private String title;
public void setImage(String image) {
this.image = image;
}
public void setType(int type) {
this.type = type;
}
public void setId(int id) {
this.id = id;
}
public void setGa_prefix(String ga_prefix) {
this.ga_prefix = ga_prefix;
}
public void setTitle(String title) {
this.title = title;
}
public String getImage() {
return image;
}
public int getType() {
return type;
}
public int getId() {
return id;
}
public String getGa_prefix() {
return ga_prefix;
}
public String getTitle() {
return title;
}
}
}
XRecyclerView解析数据的XRBean
import java.util.List;
public class XRBean {
/**
* date : 20131118
* stories : [{"images":["http://p4.zhimg.com/7b/c8/7bc8ef5947b069513c51e4b9521b5c82.jpg"],"type":0,"id":1747159,"ga_prefix":"111822","title":"深夜食堂 · 我的张曼妮"},{"images":["http://p3.zhimg.com/21/0c/210c7b63b931932fa7a1e62bf0113e7b.jpg"],"type":0,"id":1858551,"ga_prefix":"111822","title":"清朝皇帝上朝的时候说的是满语还是汉语?"},{"images":["http://p4.zhimg.com/7c/d1/7cd1496541c7964b2cf8614b9fa664b0.jpg"],"type":0,"id":1848791,"ga_prefix":"111821","title":"淘宝上那些适合送爸妈的东西"},{"images":["http://p2.zhimg.com/11/05/1105cfa3d12f3539ef35fa603614ed92.jpg"],"type":0,"id":1849914,"ga_prefix":"111820","title":"恋爱里的男子汉,迎头专心刷榜才是正经事"},{"images":["http://p4.zhimg.com/cf/1f/cf1fd58f22d3c5fd2fd2a5543d70f81d.jpg"],"type":0,"id":1854693,"ga_prefix":"111819","title":"鸡蛋黄和蛋清长成了的话分别是鸡的什么部位?"},{"images":["http://p2.zhimg.com/e3/d1/e3d15e98b3db498d53d9ed1b85d2fab5.jpg"],"type":0,"id":1861205,"ga_prefix":"111818","title":"鲜柚游戏周报\r\n回顾一周
iOS 精品游戏"},{"title":"吃很重要 · 第一口就开始 high 了(多图)","ga_prefix":"111818","images":["http://p2.zhimg.com/14/3b/143bd74ec7a0299b76d17e6b095799aa.jpg"],"multipic":true,"type":0,"id":1858917},{"images":["http://p2.zhimg.com/51/32/51324fa89e1aba7a337e20e98c9664f1.jpg"],"type":0,"id":1856401,"ga_prefix":"111818","title":"追女孩教练传授:妹子玩手机的话,你就也玩手机,挺好的"},{"images":["http://p3.zhimg.com/f0/97/f0973d30830eed315d46b531f38719cf.jpg"],"type":0,"id":1854400,"ga_prefix":"111817","title":"最美应用
· 给你一种新邮箱Molto"},{"images":["http://p1.zhimg.com/d6/11/d611dd7d57d144621779ec36c8df42fb.jpg"],"type":0,"id":1848590,"ga_prefix":"111817","title":"谁在维护比特币的核心算法?"},{"images":["http://p3.zhimg.com/f8/70/f870fac8fea14e56d2cddf926a4800f2.jpg"],"type":0,"id":1847175,"ga_prefix":"111816","title":"离岸金融:一种光明正大的钻空子行为"},{"images":["http://p1.zhimg.com/d4/30/d430ba0d8d9e51482b6a0bd8ff5ef6ee.jpg"],"type":0,"id":1846706,"ga_prefix":"111815","title":"银泰全面支持支付宝钱包付款,两个初学者的第一次"},{"images":["http://p1.zhimg.com/4b/8c/4b8c8f9c40f08fa9a1a830095131c67c.jpg"],"type":0,"id":1846781,"ga_prefix":"111814","title":"仅售
179 美元,Moto G 为什么定价这么低"},{"images":["http://p3.zhimg.com/2c/ce/2cce90676f6841e01ab683384f4daaf0.jpg"],"type":0,"id":1844934,"ga_prefix":"111813","title":"导演张一白:青春小说到青春电影,中间有层面纱"},{"images":["http://p4.zhimg.com/39/ff/39ff45effc9f6083bb8da5a6f768eaa2.jpg"],"type":0,"id":1838196,"ga_prefix":"111812","title":"知天下
· 圆顶事实上是宗教建筑中常用的一种造型"},{"images":["http://p1.zhimg.com/80/26/802617acf921694c7a2e732008e6c2cf.jpg"],"type":0,"id":1844302,"ga_prefix":"111811","title":"PrimeSense:苹果正在试图收购这个革命性体感控制设备"},{"images":["http://p2.zhimg.com/a6/42/a6423122d959de347cc8a8c61d150c21.jpg"],"type":0,"id":1844263,"ga_prefix":"111810","title":"家庭用
100M 光纤使用什么无线路由器才能发挥最大网速?"},{"images":["http://p2.zhimg.com/52/94/52941a00e16bffffe480e19c387d07d9.jpg"],"type":0,"id":1843578,"ga_prefix":"111809","title":"金融产品也有物流,并且好处多多"},{"images":["http://p1.zhimg.com/86/79/86799f8608bf39171b78456675a9f4f0.jpg"],"type":0,"id":1839454,"ga_prefix":"111807","title":"召回六十多万辆车,大众继续焦头烂额处理变速箱问题"},{"images":["http://p4.zhimg.com/3a/dd/3adda8a964695f3d0c84944fbb676cda.jpg"],"type":0,"id":1843290,"ga_prefix":"111807","title":"全方位冬日晨跑注意事项已供上,假设你已起床"},{"images":["http://p2.zhimg.com/a8/a6/a8a677d04d27a96cdb457e6c1a430d68.jpg"],"type":0,"id":1838920,"ga_prefix":"111807","title":"独处时才是了解自己的最好机会,你上完厕所会冲吗?"},{"images":["http://p4.zhimg.com/c5/7d/c57d1d0ee1ba83df700982a4f8e5ac26.jpg"],"type":0,"id":1843557,"ga_prefix":"111807","title":"李宗盛:既然青春留不住,不如听大叔讲故事"},{"images":["http://p3.zhimg.com/b7/b2/b7b223eaa3a6daaf680f266973803c75.jpg"],"type":0,"id":1839693,"ga_prefix":"111807","title":"创业公司财务怎么做,绝大多数创业初期年轻人不知道这个"},{"images":["http://p3.zhimg.com/21/32/21328ba459bee7961dc71de398002638.jpg"],"type":0,"id":1841395,"ga_prefix":"111806","title":"瞎扯
· 如何正确地吐槽"}]
*/
private String date;
/**
* images : ["http://p4.zhimg.com/7b/c8/7bc8ef5947b069513c51e4b9521b5c82.jpg"]
* type : 0
* id : 1747159
* ga_prefix : 111822
* title : 深夜食堂 · 我的张曼妮
*/
private List<StoriesEntity> stories;
public void setDate(String date) {
this.date = date;
}
public void setStories(List<StoriesEntity> stories) {
this.stories = stories;
}
public String getDate() {
return date;
}
public List<StoriesEntity> getStories() {
return stories;
}
public static class StoriesEntity {
private int type;
private int id;
private String ga_prefix;
private String title;
private List<String> images;
public void setType(int type) {
this.type = type;
}
public void setId(int id) {
this.id = id;
}
public void setGa_prefix(String ga_prefix) {
this.ga_prefix = ga_prefix;
}
public void setTitle(String title) {
this.title = title;
}
public void setImages(List<String> images) {
this.images = images;
}
public int getType() {
return type;
}
public int getId() {
return id;
}
public String getGa_prefix() {
return ga_prefix;
}
public String getTitle() {
return title;
}
public List<String> getImages() {
return images;
}
}
}