PageRenderTime 56ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/dateLoveInternational/src/main/java/com/datelove/online/International/fragment/SearchFragment.java

https://bitbucket.org/juzhiwiscom/datelove
Java | 610 lines | 494 code | 61 blank | 55 comment | 54 complexity | ec336669d232041b32f6a803cda7e398 MD5 | raw file
  1. package com.datelove.online.International.fragment;
  2. import android.graphics.Color;
  3. import android.os.Bundle;
  4. import android.os.Handler;
  5. import android.os.SystemClock;
  6. import android.support.v4.view.ViewPager;
  7. import android.support.v4.widget.SwipeRefreshLayout;
  8. import android.support.v7.widget.LinearLayoutManager;
  9. import android.text.TextUtils;
  10. import android.util.Log;
  11. import android.view.LayoutInflater;
  12. import android.view.MotionEvent;
  13. import android.view.View;
  14. import android.view.ViewGroup;
  15. import android.view.animation.Animation;
  16. import android.view.animation.AnimationUtils;
  17. import android.view.animation.DecelerateInterpolator;
  18. import android.view.animation.LayoutAnimationController;
  19. import android.view.animation.TranslateAnimation;
  20. import android.widget.AdapterView;
  21. import android.widget.FrameLayout;
  22. import android.widget.ImageView;
  23. import android.widget.LinearLayout;
  24. import android.widget.RelativeLayout;
  25. import android.widget.TextView;
  26. import com.alibaba.fastjson.JSON;
  27. import com.datelove.online.International.R;
  28. import com.datelove.online.International.activity.BuyServiceActivity;
  29. import com.datelove.online.International.activity.MatchInfoActivity;
  30. import com.datelove.online.International.activity.UserInfoDetailActivity;
  31. import com.datelove.online.International.adapter.BannerAdapter;
  32. import com.datelove.online.International.adapter.SearchAdapter;
  33. import com.datelove.online.International.base.BaseApplication;
  34. import com.datelove.online.International.base.BaseTitleFragment;
  35. import com.datelove.online.International.bean.MatcherInfo;
  36. import com.datelove.online.International.bean.Search;
  37. import com.datelove.online.International.bean.SearchUser;
  38. import com.datelove.online.International.constant.IConfigConstant;
  39. import com.datelove.online.International.constant.IUrlConstant;
  40. import com.datelove.online.International.event.MatchInfoChangeEvent;
  41. import com.datelove.online.International.event.SayHelloEvent;
  42. import com.datelove.online.International.event.ShowInterceptEvent;
  43. import com.datelove.online.International.event.UnlikeEvent;
  44. import com.datelove.online.International.haoping.ActionSheetDialog;
  45. import com.datelove.online.International.haoping.OnOperItemClickL;
  46. import com.datelove.online.International.utils.Utils;
  47. import com.datelove.online.International.xml.PlatformInfoXml;
  48. import com.datelove.online.International.xml.UserInfoXml;
  49. import com.library.adapter.recyclerview.CommonRecyclerViewAdapter;
  50. import com.library.adapter.recyclerview.RecyclerViewHolder;
  51. import com.library.utils.SharedPreferenceUtil;
  52. import com.library.utils.Util;
  53. import com.library.widgets.RefreshRecyclerView;
  54. import com.zhy.http.okhttp.OkHttpUtils;
  55. import com.zhy.http.okhttp.callback.Callback;
  56. import org.greenrobot.eventbus.EventBus;
  57. import org.greenrobot.eventbus.Subscribe;
  58. import org.greenrobot.eventbus.ThreadMode;
  59. import java.util.ArrayList;
  60. import java.util.HashMap;
  61. import java.util.List;
  62. import java.util.Map;
  63. import butterknife.BindView;
  64. import butterknife.ButterKnife;
  65. import butterknife.Unbinder;
  66. import okhttp3.Call;
  67. import okhttp3.Response;
  68. /**
  69. * 搜索
  70. */
  71. public class SearchFragment extends BaseTitleFragment {
  72. @BindView(R.id.search_recyclerview)
  73. RefreshRecyclerView mRefreshRecyclerView;
  74. @BindView(R.id.search_fail)
  75. TextView mTvSearchFail;
  76. @BindView(R.id.iv_loading_heart)
  77. ImageView ivLoadingHeart;
  78. @BindView(R.id.fl_loading)
  79. FrameLayout flLoading;
  80. @BindView(R.id.tv_loading)
  81. TextView tvLoading;
  82. @BindView(R.id.viewpager)
  83. ViewPager mViewPager;
  84. @BindView(R.id.tv_bannertext)
  85. TextView mTextView;
  86. @BindView(R.id.points)
  87. LinearLayout mLinearLayout;
  88. @BindView(R.id.rl_foot)
  89. RelativeLayout rlFoot;
  90. Unbinder unbinder;
  91. private int i = 0;
  92. // 声明控件
  93. private List<ImageView> mlist;
  94. // 广告图素材
  95. private int[] bannerImages = { R.drawable.blue, R.drawable.green, R.drawable.orange, R.drawable.purple };
  96. // 广告语
  97. private String[] bannerTexts = {BaseApplication.getGlobalContext().getString(R.string.singles), BaseApplication.getGlobalContext().getString(R.string.Filter),
  98. BaseApplication.getGlobalContext().getString(R.string.complete), BaseApplication.getGlobalContext().getString(R.string.visited) };
  99. // ViewPager适配器与监听器
  100. private BannerAdapter mAdapter;
  101. private BannerListener bannerListener;
  102. // 圆圈标志位
  103. private int pointIndex = 0;
  104. // 线程标志
  105. private boolean isStop = false;
  106. private boolean isFirst=true;
  107. @Override
  108. public void onResume() {
  109. super.onResume();
  110. System.out.println("wwwwwwwwSearchFragment");
  111. }
  112. private SearchAdapter mSearchAdapter;
  113. private int pageNum = 1;
  114. private final String pageSize = "10";
  115. private String country=PlatformInfoXml.getPlatformInfo().getCountry().trim();
  116. /**
  117. * 搜索随机因子,避免搜索重复
  118. */
  119. private String randomNum = "0";
  120. /**
  121. * 记录当前查看的用户处于列表中的索引
  122. */
  123. private int mCurrentPosition = -1;
  124. @Override
  125. protected int getLayoutResId() {
  126. LayoutInflater from = LayoutInflater.from(getActivity());
  127. View view = from.inflate(R.layout.fragment_search, null);
  128. // mRefreshRecyclerView = (RefreshRecyclerView) view.findViewById(R.id.search_recyclerview);
  129. return R.layout.fragment_search;
  130. }
  131. @Override
  132. protected void initViewsAndVariables() {
  133. setTitle(getString(R.string.tab_search));
  134. mIvRight.setImageResource(R.drawable.selector_search);
  135. // 设置下拉刷新样式
  136. mRefreshRecyclerView.setColorSchemeResources(R.color.lucency_color);
  137. mRefreshRecyclerView.setProgressBackgroundColorSchemeColor(Color.alpha(0));
  138. mRefreshRecyclerView.setRefreshing(false);
  139. // 设置加载动画
  140. mRefreshRecyclerView.setLoadingView(Utils.getLoadingView(getActivity()));
  141. LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
  142. linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
  143. mRefreshRecyclerView.setLayoutManager(linearLayoutManager);
  144. /**加载读信拦截对话框**/
  145. boolean isIntercept = SharedPreferenceUtil.getBooleanValue(Utils.getContext(), "INTERCEPT_DIALOG", "DIALOG", true);
  146. mSearchAdapter = new SearchAdapter(getActivity(), R.layout.item_fragment_search,isIntercept);
  147. mRefreshRecyclerView.setAdapter(mSearchAdapter);
  148. }
  149. @Override
  150. protected void addListeners() {
  151. mIvRight.setOnClickListener(new View.OnClickListener() {
  152. @Override
  153. public void onClick(View v) {
  154. Util.gotoActivity(getActivity(), MatchInfoActivity.class, false);
  155. }
  156. });
  157. mTvSearchFail.setOnClickListener(new View.OnClickListener() {
  158. @Override
  159. public void onClick(View v) {
  160. Util.gotoActivity(getActivity(), MatchInfoActivity.class, false);
  161. }
  162. });
  163. // 下拉刷新
  164. mRefreshRecyclerView.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
  165. @Override
  166. public void onRefresh() {
  167. i++;
  168. if (i == 1) {
  169. refresh();
  170. flLoading.setVisibility(View.INVISIBLE);
  171. Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(getActivity(), R.anim.anim_show_loading);
  172. ivLoadingHeart.startAnimation(hyperspaceJumpAnimation);
  173. } else {
  174. flLoading.setVisibility(View.VISIBLE);
  175. tvLoading.setVisibility(View.VISIBLE);
  176. Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(getActivity(), R.anim.anim_show_loading);
  177. ivLoadingHeart.startAnimation(hyperspaceJumpAnimation);
  178. }
  179. /**加载读信拦截对话框**/
  180. if(!(country.equals(BaseApplication.getGlobalContext().getString(R.string.united_states).trim()) || country.equals("America"))){
  181. boolean isIntercept = SharedPreferenceUtil.getBooleanValue(Utils.getContext(), "INTERCEPT_DIALOG", "DIALOG", true);
  182. if(isIntercept && UserInfoXml.isMale()){
  183. new Handler().postDelayed(new Runnable() {
  184. @Override
  185. public void run() {
  186. flLoading.setVisibility(View.GONE);
  187. tvLoading.setVisibility(View.GONE);
  188. }
  189. }, 1000);
  190. }else{
  191. refresh();
  192. }
  193. }else{
  194. refresh();
  195. }
  196. }
  197. });
  198. /**加载读信拦截对话框**/
  199. boolean isIntercept;
  200. if(!(country.equals(getString(R.string.united_states).trim()) || country.equals("America"))){
  201. isIntercept=false;
  202. }else{
  203. isIntercept = SharedPreferenceUtil.getBooleanValue(Utils.getContext(), "INTERCEPT_DIALOG", "DIALOG", true);
  204. }
  205. // 上拉加载更多
  206. mRefreshRecyclerView.setOnLoadingMoreListener(new RefreshRecyclerView.OnLoadingMoreListener() {
  207. @Override
  208. public void onLoadMore() {
  209. /**加载读信拦截对话框**/
  210. if(!(country.equals(getString(R.string.united_states).trim()) || country.equals("America"))){
  211. boolean isIntercept = SharedPreferenceUtil.getBooleanValue(Utils.getContext(), "INTERCEPT_DIALOG", "DIALOG", true);
  212. if (isIntercept && UserInfoXml.isMale()) {
  213. // 弹出拦截对话框
  214. // interceptDialog();
  215. // 弹出会员的viewPager介绍
  216. flLoading.setVisibility(View.VISIBLE);
  217. tvLoading.setVisibility(View.VISIBLE);
  218. Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(getActivity(), R.anim.anim_show_loading);
  219. ivLoadingHeart.startAnimation(hyperspaceJumpAnimation);
  220. new Handler().postDelayed(new Runnable() {
  221. @Override
  222. public void run() {
  223. flLoading.setVisibility(View.GONE);
  224. tvLoading.setVisibility(View.GONE);
  225. }
  226. }, 1000);
  227. rlFoot.setVisibility(View.VISIBLE);
  228. // 只加载一次
  229. if(isFirst){
  230. isFirst=false;
  231. getViewPager();
  232. }
  233. } else {
  234. rlFoot.setVisibility(View.GONE);
  235. pageNum++;
  236. loadSearchData();
  237. flLoading.setVisibility(View.VISIBLE);
  238. tvLoading.setVisibility(View.VISIBLE);
  239. Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(getActivity(), R.anim.anim_show_loading);
  240. ivLoadingHeart.startAnimation(hyperspaceJumpAnimation);
  241. }
  242. }else{
  243. rlFoot.setVisibility(View.GONE);
  244. pageNum++;
  245. loadSearchData();
  246. flLoading.setVisibility(View.VISIBLE);
  247. tvLoading.setVisibility(View.VISIBLE);
  248. Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(getActivity(), R.anim.anim_show_loading);
  249. ivLoadingHeart.startAnimation(hyperspaceJumpAnimation);
  250. }
  251. }
  252. }, getActivity(), isIntercept);
  253. mSearchAdapter.setOnItemClickListener(new CommonRecyclerViewAdapter.OnItemClickListener() {
  254. @Override
  255. public void onItemClick(View view, int position, RecyclerViewHolder viewHolder) {
  256. mCurrentPosition = position;
  257. SearchUser searchUser = mSearchAdapter.getItemByPosition(position);
  258. if (searchUser != null) {
  259. UserInfoDetailActivity.toUserInfoDetailActivity(getActivity(), searchUser.getUserBaseEnglish().getId(),
  260. null, UserInfoDetailActivity.SOURCE_FROM_SEARCH);
  261. }
  262. }
  263. });
  264. }
  265. private void getViewPager() {
  266. initData();
  267. initAction();
  268. initAnim();
  269. // 开启新线程,2秒一次更新Banner
  270. new Thread(new Runnable() {
  271. @Override
  272. public void run() {
  273. while (!isStop) {
  274. SystemClock.sleep(2000);
  275. if(getActivity()==null){
  276. return;
  277. }
  278. getActivity().runOnUiThread(new Runnable() {
  279. @Override
  280. public void run() {
  281. mViewPager.setCurrentItem(mViewPager.getCurrentItem() + 1);
  282. }
  283. });
  284. }
  285. }
  286. }).start();
  287. }
  288. private void interceptDialog() {
  289. final String[] stringItems = {getString(R.string.buy_vip), getString(R.string.buy_vip_service)};
  290. final ActionSheetDialog dialog = new ActionSheetDialog(getActivity(), stringItems, mTvSearchFail);
  291. dialog.isTitleShow(false).show();
  292. dialog.setOnOperItemClickL(new OnOperItemClickL() {
  293. @Override
  294. public void onOperItemClick(AdapterView<?> parent, View view, int position, long id) {
  295. if (position == 1 || position == 0) {
  296. // 展示十个用户,之后跳转到付费界面
  297. BuyServiceActivity.toBuyServiceActivity(getActivity(), BuyServiceActivity.INTENT_FROM_INTERCEPT,
  298. IConfigConstant.PAY_TAG_FROM_CHAT, IConfigConstant.PAY_WAY_ALL);
  299. }
  300. dialog.dismiss();
  301. }
  302. });
  303. }
  304. private void refresh() {
  305. pageNum = 1;
  306. loadSearchData();
  307. }
  308. private void loadSearchData() {
  309. Map<String, MatcherInfo> map = new HashMap<>();
  310. MatcherInfo matcherInfo = new MatcherInfo();
  311. String matcherInfoStr = UserInfoXml.getMatchInfo();
  312. if (!TextUtils.isEmpty(matcherInfoStr)) {
  313. matcherInfo = JSON.parseObject(matcherInfoStr, MatcherInfo.class);
  314. }
  315. map.put("matcherInfo", matcherInfo);
  316. OkHttpUtils.post()
  317. .url(IUrlConstant.URL_SEARCH)
  318. .addHeader("token", PlatformInfoXml.getToken())
  319. .addParams("platformInfo", PlatformInfoXml.getPlatformJsonString())
  320. .addParams("pageNum", String.valueOf(pageNum))
  321. .addParams("pageSize", pageSize)
  322. .addParams("randomNum", randomNum)
  323. .addParams("matcherInfo", JSON.toJSONString(map))
  324. .build()
  325. .execute(new Callback<Search>() {
  326. @Override
  327. public Search parseNetworkResponse(Response response, int id) throws Exception {
  328. String resultJson = response.body().string();
  329. if (!TextUtils.isEmpty(resultJson)) {
  330. return JSON.parseObject(resultJson, Search.class);
  331. }
  332. return null;
  333. }
  334. @Override
  335. public void onError(Call call, Exception e, int id) {
  336. stopRefresh(3);
  337. new Handler().postDelayed(new Runnable() {
  338. @Override
  339. public void run() {
  340. flLoading.setVisibility(View.GONE);
  341. tvLoading.setVisibility(View.GONE);
  342. }
  343. }, 1000);
  344. }
  345. @Override
  346. public void onResponse(final Search response, int id) {
  347. if (response != null) {
  348. String isSucceed = response.getIsSucceed();
  349. if (!TextUtils.isEmpty(isSucceed) && "1".equals(isSucceed)) {
  350. if (Util.isListEmpty(response.getListSearch())) {
  351. mTvSearchFail.setVisibility(View.VISIBLE);
  352. }
  353. randomNum = String.valueOf(response.getRandomNum());
  354. // 延时1秒显示
  355. new Handler().postDelayed(new Runnable() {
  356. @Override
  357. public void run() {
  358. if (mSearchAdapter != null) {
  359. if (pageNum == 1) {
  360. mSearchAdapter.replaceAll(response.getListSearch());
  361. } else {
  362. mSearchAdapter.appendToList(response.getListSearch());
  363. }
  364. mTvSearchFail.setVisibility(View.GONE);
  365. }
  366. }
  367. }, 1000);
  368. }
  369. } else {
  370. // mTvSearchFail.setVisibility(View.VISIBLE);
  371. }
  372. stopRefresh(1);
  373. new Handler().postDelayed(new Runnable() {
  374. @Override
  375. public void run() {
  376. if(flLoading!=null){
  377. flLoading.setVisibility(View.GONE);
  378. tvLoading.setVisibility(View.GONE);
  379. }
  380. }
  381. }, 1000);
  382. }
  383. });
  384. }
  385. private void stopRefresh(int secs) {
  386. if (mRefreshRecyclerView != null) {
  387. mRefreshRecyclerView.refreshCompleted(secs);
  388. mRefreshRecyclerView.loadMoreCompleted(secs);
  389. }
  390. dismissLoading();
  391. }
  392. @Override
  393. protected void doRegister() {
  394. super.doRegister();
  395. EventBus.getDefault().register(this);
  396. }
  397. @Override
  398. protected void unregister() {
  399. super.unregister();
  400. EventBus.getDefault().unregister(this);
  401. }
  402. @Subscribe
  403. public void onEvent(MatchInfoChangeEvent event) {
  404. showLoading();
  405. refresh();
  406. }
  407. @Subscribe(threadMode = ThreadMode.MAIN)
  408. public void onEvent(SayHelloEvent event) {
  409. if (mCurrentPosition >= 0 && mSearchAdapter != null) {
  410. SearchUser searchUser = mSearchAdapter.getItemByPosition(mCurrentPosition);
  411. if (searchUser != null) {
  412. searchUser.setIsSayHello("1");
  413. mSearchAdapter.updateItem(mCurrentPosition, searchUser);
  414. Log.v("setIsSayHello","Search===");
  415. }
  416. }
  417. }
  418. @Subscribe(threadMode = ThreadMode.MAIN)
  419. public void onEvent(UnlikeEvent event) {
  420. if (mCurrentPosition >= 0 && mSearchAdapter != null) {
  421. SearchUser searchUser = mSearchAdapter.getItemByPosition(mCurrentPosition);
  422. if (searchUser != null) {
  423. searchUser.setIsSayHello("-1");
  424. mSearchAdapter.updateItem(mCurrentPosition, searchUser);
  425. Log.v("setIsSayHello","Search===");
  426. }
  427. }
  428. }
  429. // @Override
  430. // public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  431. // // TODO: inflate a fragment view
  432. // View rootView = super.onCreateView(inflater, container, savedInstanceState);
  433. // unbinder = ButterKnife.bind(this, rootView);
  434. // return rootView;
  435. // }
  436. @Override
  437. public void onDestroyView() {
  438. super.onDestroyView();
  439. unbinder.unbind();
  440. isStop=true;
  441. }
  442. @Override
  443. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  444. // TODO: inflate a fragment view
  445. View rootView = super.onCreateView(inflater, container, savedInstanceState);
  446. unbinder = ButterKnife.bind(this, rootView);
  447. return rootView;
  448. }
  449. /**
  450. * 上拉加载的viewPager初始化数据
  451. */
  452. private void initData() {
  453. mlist = new ArrayList<ImageView>();
  454. View view;
  455. LinearLayout.LayoutParams params;
  456. for (int i = 0; i < bannerImages.length; i++) {
  457. // 设置广告图
  458. ImageView imageView = new ImageView(getActivity());
  459. imageView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
  460. imageView.setBackgroundResource(bannerImages[i]);
  461. mlist.add(imageView);
  462. // 设置圆圈点
  463. view = new View(getActivity());
  464. params = new LinearLayout.LayoutParams(5, 5);
  465. params.leftMargin = 10;
  466. view.setBackgroundResource(R.drawable.point_background);
  467. view.setLayoutParams(params);
  468. view.setEnabled(false);
  469. mLinearLayout.addView(view);
  470. }
  471. mAdapter = new BannerAdapter(mlist);
  472. mViewPager.setAdapter(mAdapter);
  473. //由于ViewPager 没有点击事件,可以通过对VIewPager的setOnTouchListener进行监听已达到实现点击事件的效果
  474. mViewPager.setOnTouchListener(new View.OnTouchListener() {
  475. int flage = 0 ;
  476. @Override
  477. public boolean onTouch(View v, MotionEvent event) {
  478. switch (event.getAction()){
  479. case MotionEvent.ACTION_DOWN:
  480. flage=0;
  481. break;
  482. case MotionEvent.ACTION_MOVE:
  483. float x = event.getX();
  484. if(x>800){
  485. flage = 1 ;
  486. }
  487. break ;
  488. case MotionEvent.ACTION_UP :
  489. if(flage==0){
  490. // 展示十个用户,之后跳转到付费界面
  491. BuyServiceActivity.toBuyServiceActivity(getActivity(), BuyServiceActivity.INTENT_FROM_INTERCEPT,
  492. IConfigConstant.PAY_TAG_FROM_CHAT, IConfigConstant.PAY_WAY_ALL);
  493. }
  494. break ;
  495. }
  496. return false;
  497. }
  498. });
  499. }
  500. /**
  501. * 上拉加载的viewPager初始化事件
  502. */
  503. private void initAction() {
  504. bannerListener = new BannerListener();
  505. mViewPager.setOnPageChangeListener(bannerListener);
  506. //取中间数来作为起始位置
  507. int index = (Integer.MAX_VALUE / 2) - (Integer.MAX_VALUE / 2 % mlist.size());
  508. //用来出发监听器
  509. mViewPager.setCurrentItem(index);
  510. mLinearLayout.getChildAt(pointIndex).setEnabled(true);
  511. }
  512. //实现VierPager监听器接口
  513. class BannerListener implements ViewPager.OnPageChangeListener {
  514. @Override
  515. public void onPageScrollStateChanged(int arg0) {
  516. }
  517. @Override
  518. public void onPageScrolled(int arg0, float arg1, int arg2) {
  519. }
  520. @Override
  521. public void onPageSelected(int position) {
  522. int newPosition = position % bannerImages.length;
  523. mTextView.setText(bannerTexts[newPosition]);
  524. mLinearLayout.getChildAt(newPosition).setEnabled(true);
  525. mLinearLayout.getChildAt(pointIndex).setEnabled(false);
  526. // 更新标志位
  527. pointIndex = newPosition;
  528. }
  529. }
  530. private void initAnim() {
  531. /** LayoutAnimation */
  532. TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
  533. 0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
  534. animation.setInterpolator(new DecelerateInterpolator());
  535. animation.setDuration(800);
  536. animation.setStartOffset(150);
  537. LayoutAnimationController lac = new LayoutAnimationController(animation, 0.12f);
  538. lac.setInterpolator(new DecelerateInterpolator());
  539. rlFoot.setAnimation(animation);
  540. }
  541. @Subscribe
  542. public void onEvent(ShowInterceptEvent event) {
  543. if(event.getIsIntecept()){
  544. rlFoot.setVisibility(View.VISIBLE);
  545. }else{
  546. rlFoot.setVisibility(View.GONE);
  547. }
  548. }
  549. }