Skip to content

Commit

Permalink
add the new type of gank data which the name is App
Browse files Browse the repository at this point in the history
  • Loading branch information
maoruibin committed Oct 20, 2015
1 parent 247208d commit f0437cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/me/drakeet/meizhi/data/GankData.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ public class Result {
@SerializedName("福利") public List<Gank> 妹纸List;
@SerializedName("拓展资源") public List<Gank> 拓展资源List;
@SerializedName("瞎推荐") public List<Gank> 瞎推荐List;
@SerializedName("App") public List<Gank>appList;
}
}
12 changes: 8 additions & 4 deletions app/src/main/java/me/drakeet/meizhi/ui/GankFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,25 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

import com.bumptech.glide.Glide;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import com.squareup.otto.Subscribe;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import me.drakeet.meizhi.LoveBus;
import me.drakeet.meizhi.R;
import me.drakeet.meizhi.adapter.GankListAdapter;
import me.drakeet.meizhi.data.GankData;
import me.drakeet.meizhi.LoveBus;
import me.drakeet.meizhi.event.OnKeyBackClickEvent;
import me.drakeet.meizhi.model.Gank;
import me.drakeet.meizhi.ui.base.BaseActivity;
Expand Down Expand Up @@ -178,6 +181,7 @@ private void getAndParseVideoPreview() {
private List<Gank> addAllResults(GankData.Result results) {
if (results.androidList != null) mGankList.addAll(results.androidList);
if (results.iOSList != null) mGankList.addAll(results.iOSList);
if (results.appList != null) mGankList.addAll(results.appList);
if (results.拓展资源List != null) mGankList.addAll(results.拓展资源List);
if (results.瞎推荐List != null) mGankList.addAll(results.瞎推荐List);
if (results.休息视频List != null) mGankList.addAll(0, results.休息视频List);
Expand Down

0 comments on commit f0437cb

Please sign in to comment.