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) {