| | |
| | | import com.weikou.beibeivideo.ui.video.SuggestKeysAdapter; |
| | | import com.weikou.beibeivideo.ui.video.VideoCloumn1Adapter; |
| | | import com.weikou.beibeivideo.util.DimenUtils; |
| | | import com.weikou.beibeivideo.util.UmengEventUtil; |
| | | import com.weikou.beibeivideo.util.ad.ExpressAdManager; |
| | | import com.weikou.beibeivideo.util.ad.manager.SearchResultAdManager; |
| | | import com.weikou.beibeivideo.util.ui.DividerItemDecoration; |
| | |
| | | |
| | | List<VideoType> typeList; |
| | | |
| | | private LinearLayout ll_empty; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | |
| | | tv_search_cancel = findViewById(R.id.tv_search_cancel); |
| | | rv_video_search = findViewById(R.id.rv_video_search); |
| | | ll_top_bar = findViewById(R.id.ll_top_bar); |
| | | ll_empty = findViewById(R.id.ll_empty); |
| | | |
| | | tv_search_cancel.setOnClickListener(this); |
| | | et_search_key.addTextChangedListener(new TextWatcher() { |
| | |
| | | private List<ExpressAdContainer> adList = new ArrayList<>(); |
| | | |
| | | private void search(String key, String videoType) { |
| | | |
| | | UmengEventUtil.search(getApplicationContext(), videoType); |
| | | |
| | | SharedPreferences preferences = getSharedPreferences("user", |
| | | Context.MODE_PRIVATE); |
| | | String uid = preferences.getString("uid", ""); |
| | |
| | | mVideoInfos.addAll(videoContentList); |
| | | adapter.notifyDataSetChanged(); |
| | | |
| | | if (mVideoInfos != null && mVideoInfos.size() > 0) { |
| | | //有值 |
| | | ll_empty.setVisibility(View.GONE); |
| | | rl_search_result.setVisibility(View.VISIBLE); |
| | | } else { |
| | | //无值 |
| | | ll_empty.setVisibility(View.VISIBLE); |
| | | rl_search_result.setVisibility(View.GONE); |
| | | } |
| | | |
| | | //加载下一次要用的广告 |
| | | if (videoInfos.size() > 0) { |
| | | if (adList.size() < 1) |