| | |
| | | import com.weikou.beibeivideo.entity.HomeType; |
| | | import com.weikou.beibeivideo.entity.HomeTypeItem; |
| | | import com.weikou.beibeivideo.entity.HomeVideo; |
| | | import com.weikou.beibeivideo.entity.JumpDetail; |
| | | import com.weikou.beibeivideo.entity.VideoInfo; |
| | | import com.weikou.beibeivideo.entity.VideoType; |
| | | import com.weikou.beibeivideo.entity.ad.ExpressAdContainer; |
| | |
| | | import com.weikou.beibeivideo.ui.mine.BrowserActivity; |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | | import com.weikou.beibeivideo.util.DimenUtils; |
| | | import com.weikou.beibeivideo.util.JumpActivityUtil; |
| | | import com.weikou.beibeivideo.util.ad.AdUtil; |
| | | import com.weikou.beibeivideo.util.ad.ExpressAdManager; |
| | | import com.weikou.beibeivideo.util.ui.DividerItemDecoration; |
| | | import com.yeshi.ec.library_baiducpu.fragment.BaiDuNewsFragment; |
| | | import com.yeshi.ec.library_baiducpu.fragment.BaiDuVideosFragment; |
| | | import com.ysh.wpc.appupdate.GoReview; |
| | | import com.ysh.wpc.appupdate.service.DownLoadFileService; |
| | | import com.yeshi.appupdate.GoReview; |
| | | import com.yeshi.appupdate.service.DownLoadFileService; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONArray; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | vp_recommend = view.findViewById(R.id.vp_recommend); |
| | | ll_ad_containner = view.findViewById(R.id.ll_ad_containner); |
| | | rl_recommend_top = view.findViewById(R.id.rl_recommend_top); |
| | | if (position == 1) |
| | | if (position > 0) |
| | | rl_recommend_top.setRatio(0.56f); |
| | | indicator_recommend = view.findViewById(R.id.indicator_recommend); |
| | | mRecommendNewAdapter.setHeaderView(view); |
| | |
| | | if (jsonObject.getBoolean("IsPost")) { |
| | | JSONObject obj = jsonObject.optJSONObject("Data"); |
| | | content = obj.optString("Content"); |
| | | JSONObject jumpDetailJson = obj.optJSONObject("jumpDetail"); |
| | | JumpDetail jumpDetail = null; |
| | | if (jumpDetailJson != null) { |
| | | jumpDetail = new Gson().fromJson(jumpDetailJson.toString(), JumpDetail.class); |
| | | } |
| | | JSONObject paramsJson = obj.optJSONObject("Params"); |
| | | com.alibaba.fastjson.JSONObject params = null; |
| | | if (paramsJson != null) |
| | | params = com.alibaba.fastjson.JSONObject.parseObject(paramsJson.toString()); |
| | | |
| | | |
| | | final JumpDetail fJumpDetail = jumpDetail; |
| | | final com.alibaba.fastjson.JSONObject fParams = params; |
| | | |
| | | // 0-不显示 |
| | | // 1-显示 |
| | | final String url = obj.optString("Url"); |
| | | if (position > 0)//只有第一页才显示通知 |
| | | content = null; |
| | | if (!StringUtils.isBlank(content)) { |
| | | tv_notice.setVisibility(View.VISIBLE); |
| | | tv_notice.setText(content); |
| | | if (!StringUtils.isBlank(url)) { |
| | | tv_notice |
| | | .setOnClickListener(new OnClickListener() { |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(new Intent( |
| | | context, |
| | | BrowserActivity.class) |
| | | .putExtra("url", url)); |
| | | |
| | | JumpActivityUtil.jumpPage(getActivity(), fJumpDetail, fParams); |
| | | } |
| | | }); |
| | | } |