| | |
| | | import com.google.gson.FieldNamingPolicy; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.annotations.Expose; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.lcjian.library.RetainViewFragment; |
| | | import com.lcjian.library.content.ConnectivityChangeHelper; |
| | |
| | | type.setParams(obj.optString("Params")); |
| | | type.setIcon(obj.optString("Icon")); |
| | | type.setNeedAd(obj.optBoolean("NeedAd", false)); |
| | | type.setRefreshPosition(obj.optInt("RefreshPosition", 0)); |
| | | type.setMoreTag(obj.optString("MoreTag")); |
| | | type.setCount(obj.optInt("Count")); |
| | | type.setNumber(obj.optInt("Number")); |
| | | type.setCurrentPage(1); |
| | | |
| | | |
| | | if (obj.optJSONObject("Ad") != null) |
| | | type.setAd(gson.fromJson(obj.optJSONObject("Ad").toString(), HomeType.HomeTypeAd.class)); |
| | | |
| | |
| | | homeList.add(gson.fromJson(homeArray |
| | | .optJSONObject(j).toString(), |
| | | HomeVideo.class)); |
| | | //TODO 测试 |
| | | if (i == 1 && j == 0) { |
| | | homeList.get(0).setBigPicture(true); |
| | | } |
| | | } |
| | | } |
| | | |