From 6bcaf2ba9c355ab7bd05fc2024c22b6d6b8f85a0 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 23 Aug 2023 15:05:32 +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 --- app/src/main/AndroidManifest.xml | 55 +++++++++-------- .../java/com/shayu/phonelive/AppContext.java | 18 ++++++ common/build.gradle | 5 +- .../common/activity/WebViewActivity.java | 10 +++ .../yunbao/common/manager/IMLoginManager.java | 5 ++ .../yunbao/main/activity/MainActivity.java | 42 +++++++++++-- .../main/activity/MainListActivity.java | 8 ++- .../yunbao/main/activity/SearchActivity.java | 18 +++++- .../main/views/MainHomeLiveViewHolder.java | 61 ++++++++++++++----- .../yunbao/main/views/MainHomeViewHolder.java | 18 +++++- 10 files changed, 185 insertions(+), 55 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c6e47c1a3..b26c0e300 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -6,7 +6,8 @@ - - - + + - - + + - - - - - - + + + + + + + android:exported="false" + android:stopWithTask="false"> - + + tools:ignore="LockedOrientationActivity"> @@ -130,7 +131,8 @@ - + + @@ -162,13 +164,16 @@ - + + @@ -186,12 +191,12 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index b2674d02c..2dc5f808d 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -32,6 +32,8 @@ import com.tencent.imsdk.v2.V2TIMGroupMemberInfo; import com.tencent.imsdk.v2.V2TIMManager; import com.tencent.imsdk.v2.V2TIMSimpleMsgListener; import com.tencent.imsdk.v2.V2TIMUserInfo; +import com.umeng.analytics.MobclickAgent; +import com.umeng.commonsdk.UMConfigure; import com.yunbao.common.BuildConfig; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; @@ -163,7 +165,23 @@ public class AppContext extends CommonAppContext { if (isMainProcess()) { OpenInstall.init(this); } + //设置LOG开关,默认为false + UMConfigure.setLogEnabled(true); + //友盟预初始化 + UMConfigure.preInit(getApplicationContext(),"64e40ee55488fe7b3afa2c96","PDLive"); + //友盟正式初始化 + UMConfigure.init(getApplicationContext(), "64e40ee55488fe7b3afa2c96", "PDLive", UMConfigure.DEVICE_TYPE_PHONE, + "64e40ee55488fe7b3afa2c96"); + + //集成umeng-crash-vx.x.x.aar,则需要关闭原有统计SDK异常捕获功能 + MobclickAgent.setCatchUncaughtExceptions(false); + //PushSDK初始化(如使用推送SDK,必须调用此方法) + + //统计SDK是否支持采集在子进程中打点的自定义事件,默认不支持 + UMConfigure.setProcessEvent(true);//支持多进程打点 + MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO); + UMConfigure.submitPolicyGrantResult(getApplicationContext(), true); registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks()); //初始化 AndroidUtilCode diff --git a/common/build.gradle b/common/build.gradle index 680e2065e..40486453e 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -197,6 +197,7 @@ dependencies { //自定义圆角图片 api 'com.makeramen:roundedimageview:2.3.0' // 友盟统计SDK - implementation 'com.umeng.umsdk:common:9.6.3'// 必选 - implementation 'com.umeng.umsdk:asms:1.8.0'// 必选 + api 'com.umeng.umsdk:common:9.6.3'// 必选 + api 'com.umeng.umsdk:asms:1.8.0'// 必选 + api 'com.umeng.umsdk:uyumao:1.1.2' //高级运营分析功能依赖库,使用卸载分析、开启反作弊能力请务必集成,以免影响高级功能使用。common需搭配v9.6.3及以上版本,asms需搭配v1.7.0及以上版本。需更新隐私声明。 } diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index efa509052..80cbad69f 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -25,6 +25,7 @@ import androidx.annotation.RequiresApi; import com.alibaba.fastjson.JSON; import com.lxj.xpopup.XPopup; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; @@ -296,6 +297,7 @@ public class WebViewActivity extends AbsActivity { @Override protected void onResume() { super.onResume(); + MobclickAgent.onPageStart("WebViewActivity"); if (Constants.myIntoIndex == 2 && mWebView != null && indexInto == 1) { if (Build.VERSION.SDK_INT >= 21) { mWebView.post(new Runnable() { @@ -330,6 +332,7 @@ public class WebViewActivity extends AbsActivity { if (Constants.isShowPage != -1) { finish(); } + } @Subscribe(threadMode = ThreadMode.MAIN) @@ -434,4 +437,11 @@ public class WebViewActivity extends AbsActivity { } + @Override + protected void onPause() { + super.onPause(); + MobclickAgent.onPageEnd("WebViewActivity"); + } + + } diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index baa0d2a74..8b8fb66d0 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -10,6 +10,7 @@ import androidx.annotation.NonNull; import com.google.gson.Gson; import com.lzf.easyfloat.EasyFloat; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.event.DataUserInfoEvent; @@ -301,6 +302,8 @@ public class IMLoginManager extends BaseCacheManager { * @param model */ public void setupLoginUser(@NonNull IMLoginModel model) { + //当用户使用自有账号登录时,可以这样统计: + MobclickAgent.onProfileSignIn(String.valueOf(model.getId())); this.userInfo = model; if (userInfo != null && !TextUtils.isEmpty(userInfo.getToken())) { token = userInfo.getToken(); @@ -425,6 +428,8 @@ public class IMLoginManager extends BaseCacheManager { // IMCenter.getInstance().clearConversations(null, Conversation.ConversationType.PRIVATE); RongcloudIMManager.logoutIM(); MessageIMManager.get(activity).logout(); + //登出 + MobclickAgent.onProfileSignOff(); put(IS_HINT, 0); APPEasyFloat.getInstance().dismiss(activity); if (EasyFloat.isShow("LiveFloatView")) { diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index b14376874..1d5ae4a6d 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -52,6 +52,7 @@ import com.tencent.imsdk.v2.V2TIMManager; import com.tencent.imsdk.v2.V2TIMSDKConfig; import com.tencent.imsdk.v2.V2TIMSDKListener; import com.tencent.imsdk.v2.V2TIMUserFullInfo; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; @@ -80,6 +81,8 @@ import com.yunbao.common.event.UpdateTablePointMe; import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.LiveHttpConsts; +import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.main.MainNetManager; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.APKManager; @@ -89,6 +92,7 @@ import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.GiftCacheUtil; +import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.LocationUtil; import com.yunbao.common.utils.ProcessResultUtil; import com.yunbao.common.utils.RouteUtil; @@ -101,9 +105,6 @@ import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.weight.LiveFloatView; import com.yunbao.live.activity.LiveAudienceActivity; -import com.yunbao.common.http.LiveHttpConsts; -import com.yunbao.common.http.LiveHttpUtil; -import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.live.utils.LiveStorge; import com.yunbao.main.R; import com.yunbao.main.adapter.FullAdToBannerTransition; @@ -206,6 +207,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene } + @Override + protected void onPause() { + super.onPause(); + + } + @Override protected void main() { ActivityCompat.postponeEnterTransition(this); @@ -279,7 +286,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene } } else if (getIntent().getStringExtra("type") != null && getIntent().getStringExtra("type").equals("8")) { - WebViewActivity.forward(mContext, getIntent().getStringExtra("activityUrl"), true,false); + WebViewActivity.forward(mContext, getIntent().getStringExtra("activityUrl"), true, false); } FirebaseMessaging.getInstance().getToken() .addOnCompleteListener(new OnCompleteListener() { @@ -327,6 +334,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void onPageSelected(int position) { + if (mTabButtonGroup.getCurPosition() != position) { System.err.println("重连IM:" + IMLoginManager.isLogin(mContext)); if (!IMLoginManager.isLogin(mContext)) { @@ -708,11 +716,15 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene showStartDialog(); } else if (i == R.id.btn_search) { SearchActivity.forward(mContext); + + MobclickAgent.onEvent(mContext, "home_page_search", "右上角搜索按钮"); + } else if (i == R.id.btn_follow) { //关注 FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0); } else if (i == R.id.img_trophy) { MainListActivity.forward(mContext, 0); + MobclickAgent.onEvent(mContext, "home_page_ranking", "右上角排行榜按钮"); //RandomPkDialogFragment fragment = new RandomPkDialogFragment(); //fragment.show(this.getSupportFragmentManager(), "RandomPkDialogFragment"); } @@ -847,6 +859,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene NoviceInstructorManager.get(mContext).getNoviceInstructor(); NoviceInstructorManager.get(mContext).checktHomeZdyPop(); initAnchorRecommendBanner(); + } /** @@ -1068,7 +1081,21 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene ToastUtil.showDebug("Holders为空"); return; } - + switch (position) { + case 0: + //点击埋点 + MobclickAgent.onEvent(mContext, "home_page", "首页"); + break; + case 1: + MobclickAgent.onEvent(mContext, "community", "社区"); + break; + case 2: + MobclickAgent.onEvent(mContext, "information", "消息"); + break; + case 3: + MobclickAgent.onEvent(mContext, "my", "我的"); + break; + } AbsMainViewHolder vh = mViewHolders[position]; if (vh == null) { if (mViewList != null && position < mViewList.size()) { @@ -1079,15 +1106,20 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene if (position == 0) { mainHomeViewHolder = new MainHomeViewHolder(mContext, parent); vh = mainHomeViewHolder; + } else if (position == 1) { mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//社区 vh = mMainHomeCommunityViewHolder; + } else if (position == 2) { mainMessageViewHolder = new MainMessageViewHolder(this, parent); vh = mainMessageViewHolder; + + } else if (position == 3) { mMeViewHolder = new MainMeViewHolder(mContext, parent); vh = mMeViewHolder; + } if (vh == null) { return; diff --git a/main/src/main/java/com/yunbao/main/activity/MainListActivity.java b/main/src/main/java/com/yunbao/main/activity/MainListActivity.java index d90c7a479..636b0b161 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainListActivity.java @@ -20,6 +20,7 @@ import com.opensource.svgaplayer.SVGADrawable; import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.adapter.RefreshAdapter; import com.yunbao.common.adapter.ViewPagerAdapter; @@ -100,7 +101,7 @@ public class MainListActivity extends AbsActivity implements OnItemClickListener @Override protected void onResume() { super.onResume(); - + MobclickAgent.onPageStart("MainListActivity"); } @Override @@ -309,6 +310,11 @@ public class MainListActivity extends AbsActivity implements OnItemClickListener public void onItemClick(ListBean bean, int position) { } + @Override + protected void onPause() { + super.onPause(); + MobclickAgent.onPageEnd("MainListActivity"); + } } \ No newline at end of file diff --git a/main/src/main/java/com/yunbao/main/activity/SearchActivity.java b/main/src/main/java/com/yunbao/main/activity/SearchActivity.java index 31f7a975a..1fb2728f1 100644 --- a/main/src/main/java/com/yunbao/main/activity/SearchActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/SearchActivity.java @@ -17,16 +17,17 @@ import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import com.alibaba.fastjson.JSON; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.event.CloseEvent; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.manager.SearchHistoryRecordManager; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.WordsTypeUtil; -import com.yunbao.common.http.LiveHttpUtil; -import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.main.R; import com.yunbao.main.event.JumpUserHomeEvent; import com.yunbao.main.fragment.SearchRecommendFragment; @@ -176,7 +177,7 @@ public class SearchActivity extends AbsActivity { new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { @Override public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { - RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal)); + RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal)); } @Override @@ -220,4 +221,15 @@ public class SearchActivity extends AbsActivity { } + @Override + protected void onPause() { + super.onPause(); + MobclickAgent.onPageEnd("SearchActivity"); + } + + @Override + protected void onResume() { + super.onResume(); + MobclickAgent.onPageStart("SearchActivity"); + } } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index f6fe2b2d1..3efa1ca7d 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -29,6 +29,7 @@ import com.bumptech.glide.request.target.DrawableImageViewTarget; import com.bumptech.glide.request.target.Target; import com.ms.banner.Banner; import com.ms.banner.listener.OnBannerClickListener; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.activity.WebViewActivity; @@ -40,18 +41,18 @@ import com.yunbao.common.bean.LiveClassBean; import com.yunbao.common.bean.WeekListBean; import com.yunbao.common.custom.CommonRefreshView; import com.yunbao.common.custom.ItemDecoration; +import com.yunbao.common.event.LiveRoomChangeEvent; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.LiveClassManager; import com.yunbao.common.utils.DialogUitl; +import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.CustomViewHolder; -import com.yunbao.common.event.LiveRoomChangeEvent; -import com.yunbao.common.http.LiveHttpUtil; -import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.live.utils.LiveStorge; import com.yunbao.live.views.LiveRoomViewHolder; import com.yunbao.main.R; @@ -289,6 +290,29 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement topAdapter.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(LiveClassBean bean, int position) { + switch (bean.getEnglish()) { + case "Hot": + MobclickAgent.onEvent(mContext, "home_page_recommend_hot", "热门"); + break; + case "New": + MobclickAgent.onEvent(mContext, "home_page_recommend_new", "热门"); + break; + case "Pretty": + MobclickAgent.onEvent(mContext, "home_page_recommend_pretty", "颜值"); + break; + case "Dance": + MobclickAgent.onEvent(mContext, "home_page_recommend_dance", "舞蹈"); + break; + case "Mr.Right": + MobclickAgent.onEvent(mContext, "home_page_recommend_mr.right", "男神"); + break; + case "Music": + MobclickAgent.onEvent(mContext, "home_page_recommend_music", "音乐"); + break; + default: + MobclickAgent.onEvent(mContext, "home_page_recommend_other", "其他"); + break; + } if (!canClick()) { return; } @@ -340,19 +364,19 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement return false; } }) - /* .addListener(new RequestListener() { - @Override - public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) { - ActivityCompat.startPostponedEnterTransition((Activity) mContext); - return false; - } + /* .addListener(new RequestListener() { + @Override + public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) { + ActivityCompat.startPostponedEnterTransition((Activity) mContext); + return false; + } - @Override - public boolean onResourceReady(Drawable resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) { - ActivityCompat.startPostponedEnterTransition((Activity) mContext); - return false; - } - })*/ + @Override + public boolean onResourceReady(Drawable resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) { + ActivityCompat.startPostponedEnterTransition((Activity) mContext); + return false; + } + })*/ .error(R.mipmap.ic_launcher) .into(new DrawableImageViewTarget(ad)); @@ -425,8 +449,13 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement } } showLoadingDialog(); + + Map map_ekv = new HashMap(); + map_ekv.put("link", link); + MobclickAgent.onEvent(mContext, "ome_page_recommend_banner", map_ekv); + if (link.contains("http")) { - WebViewActivity.forward(mContext, link, true,false); + WebViewActivity.forward(mContext, link, true, false); } else { gotoLive(link); } 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 551d97f44..57c5aee1d 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java @@ -5,6 +5,7 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; +import com.umeng.analytics.MobclickAgent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.main.R; @@ -18,7 +19,7 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder { private MainHomeLiveViewHolder mainHomeLiveViewHolder; private MainHomeRecomLiveViewHolder mainHomeRecomLiveViewHolder; private MainHomeRedPacketLiveViewHolder mainHomeRedPacketLiveViewHolder; - + private final String mPageName = "home_page"; private ImageView img_trophy; public MainHomeViewHolder(Context context, ViewGroup parentView) { @@ -37,10 +38,17 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder { img_trophy = (ImageView) findViewById(R.id.img_trophy); ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy); - + MobclickAgent.onPageStart(mPageName); } - public void setCurPosition(int position){ + + @Override + public void release() { + super.release(); + MobclickAgent.onPageEnd(mPageName); + } + + public void setCurPosition(int position) { mViewPager.setCurrentItem(position); } @@ -60,15 +68,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) {