| | |
| | | import com.yeshi.base.entity.video.VideoInfo; |
| | | import com.yeshi.base.entity.video.VideoType; |
| | | import com.yeshi.base.ui.BaseActivity; |
| | | import com.yeshi.base.utils.JsonUtil; |
| | | import com.yeshi.base.utils.RouteConstant; |
| | | import com.yeshi.base.utils.ad.AdUtil; |
| | | import com.yeshi.base.utils.ad.ExpressAdManager; |
| | |
| | | if (albumCount >= 1) { |
| | | VideoContent videoContent = VideoContent.createAdContent(adList.get(0)); |
| | | mVideoInfos.add(0, videoContent); |
| | | adapter.notifyItemInserted(0); |
| | | adapter.notifyDataSetChanged(); |
| | | rl_search_result.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | rl_search_result.scrollTo(0,0); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | throws Exception { |
| | | |
| | | if (jsonObject.getBoolean("IsPost")) { |
| | | Gson gson = new GsonBuilder().setFieldNamingPolicy( |
| | | FieldNamingPolicy.UPPER_CAMEL_CASE) |
| | | .create(); |
| | | JSONObject rootData = jsonObject.getJSONObject("Data"); |
| | | List<VideoInfo> videoInfos = gson.fromJson( |
| | | List<VideoInfo> videoInfos = JsonUtil.videoGson.fromJson( |
| | | |
| | | rootData.getJSONArray("data").toString(), |
| | | new TypeToken<List<VideoInfo>>() { |
| | |
| | | //设置导航栏 |
| | | if (rootData.opt("typeList") != null) { |
| | | if (typeList == null) { |
| | | typeList = gson.fromJson( |
| | | typeList = JsonUtil.videoGson.fromJson( |
| | | rootData |
| | | .getJSONArray("typeList").toString(), |
| | | new TypeToken<List<VideoType>>() { |