基本完成首页专题、专题详情、分类详情的曝光统计需求 http://gitlab.ghzhushou.com/pm/halo-app-issues/issues/253
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.gh.common.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v4.view.ViewPager.OnPageChangeListener;
|
||||
import android.view.Gravity;
|
||||
@ -14,6 +15,7 @@ import android.widget.LinearLayout.LayoutParams;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gh.common.exposure.ExposureEvent;
|
||||
import com.gh.common.util.DisplayUtils;
|
||||
import com.gh.common.util.PackageUtils;
|
||||
import com.gh.common.util.PlatformUtils;
|
||||
@ -84,6 +86,7 @@ public class DownloadDialog implements OnCollectionCallBackListener {
|
||||
private LinearLayout dialog_ll_collection_hint;
|
||||
private String entrance;
|
||||
private String location;
|
||||
private ExposureEvent traceEvent;
|
||||
private final int row = 3;
|
||||
private final int column = 3;
|
||||
private boolean isLoadPlatform;
|
||||
@ -101,6 +104,10 @@ public class DownloadDialog implements OnCollectionCallBackListener {
|
||||
}
|
||||
|
||||
public void showPopupWindow(View view, GameEntity gameEntity, String entrance, String location) {
|
||||
showPopupWindow(view, gameEntity, entrance, location, null);
|
||||
}
|
||||
|
||||
public void showPopupWindow(View view, GameEntity gameEntity, String entrance, String location, @Nullable ExposureEvent traceEvent) {
|
||||
|
||||
if (isShow && (popupWindow == null || !popupWindow.isShowing())) {
|
||||
isShow = false;
|
||||
@ -113,6 +120,7 @@ public class DownloadDialog implements OnCollectionCallBackListener {
|
||||
this.gameEntity = gameEntity;
|
||||
this.entrance = entrance;
|
||||
this.location = location;
|
||||
this.traceEvent = traceEvent;
|
||||
|
||||
gameApk = sortApk(new ArrayList<>(gameEntity.getApk()));
|
||||
|
||||
@ -340,7 +348,7 @@ public class DownloadDialog implements OnCollectionCallBackListener {
|
||||
currentItem = viewPager.getCurrentItem();
|
||||
}
|
||||
Utils.log("currentItem = " + currentItem);
|
||||
adapter = new PlatformPagerAdapter(mContext, this, gameEntity, apkList, entrance, location);
|
||||
adapter = new PlatformPagerAdapter(mContext, this, gameEntity, apkList, entrance, location, traceEvent);
|
||||
viewPager.setAdapter(adapter);
|
||||
viewPager.setCurrentItem(currentItem);
|
||||
}
|
||||
@ -428,7 +436,7 @@ public class DownloadDialog implements OnCollectionCallBackListener {
|
||||
addHintPoint(dialog_ll_collection_hint, size);
|
||||
|
||||
collectionAdapter = new PlatformPagerAdapter(
|
||||
mContext, null, gameEntity, gameCollectionEntity.getSaveApkEntity(), entrance, location);
|
||||
mContext, null, gameEntity, gameCollectionEntity.getSaveApkEntity(), entrance, location, traceEvent);
|
||||
collectionViewPager.setAdapter(collectionAdapter);
|
||||
|
||||
collectionViewPager.addOnPageChangeListener(new MyPageChangeListener(dialog_ll_collection_hint));
|
||||
|
||||
Reference in New Issue
Block a user