From 233469c7e44aa3f4b4a8a7681300350e53257baf Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 30 Aug 2023 13:44:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=8B=E7=82=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/main/views/MainHomeViewHolder.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java index 57c5aee1d..74ad6b9e4 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java @@ -54,6 +54,20 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder { @Override protected void loadPageData(int position) { + switch (position) { + case 0: + MobclickAgent.onEvent(mContext, "home_page_follow", "首页关注列表按钮"); + break; + case 1: + MobclickAgent.onEvent(mContext, "home_page_hot", "首页热门列表按钮"); + break; + case 2: + MobclickAgent.onEvent(mContext, "home_page_recommend", "首页推荐列表按钮"); + break; + case 3: + MobclickAgent.onEvent(mContext, "home_page_redpk", "首页红包列表按钮"); + break; + } if (mViewHolders == null) { return; } @@ -68,19 +82,19 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder { } else if (position == 0) { mainHomeFollLiveViewHolder = new MainHomeFollLiveViewHolder(mContext, parent); vh = mainHomeFollLiveViewHolder; - MobclickAgent.onEvent(mContext, "home_page_follow", "首页关注列表按钮"); + } else if (position == 1) { mainHomeLiveViewHolder = new MainHomeLiveViewHolder(mContext, parent); vh = mainHomeLiveViewHolder; - MobclickAgent.onEvent(mContext, "home_page_hot", "首页热门列表按钮"); + } else if (position == 2) { mainHomeRecomLiveViewHolder = new MainHomeRecomLiveViewHolder(mContext, parent); vh = mainHomeRecomLiveViewHolder; - MobclickAgent.onEvent(mContext, "home_page_recommend", "首页推荐列表按钮"); + } else if (position == 3) { mainHomeRedPacketLiveViewHolder = new MainHomeRedPacketLiveViewHolder(mContext, parent); vh = mainHomeRedPacketLiveViewHolder; - MobclickAgent.onEvent(mContext, "home_page_redpk", "首页红包列表按钮"); + } if (vh == null) {