游戏下载面板增加公告

This commit is contained in:
kehaoyuan
2019-02-16 15:46:15 +08:00
parent 39e5e2e9f9
commit 4a93d129bb
4 changed files with 42 additions and 10 deletions

View File

@ -16,6 +16,7 @@ import android.widget.PopupWindow;
import android.widget.TextView;
import com.gh.common.exposure.ExposureEvent;
import com.gh.common.util.DirectUtils;
import com.gh.common.util.DisplayUtils;
import com.gh.common.util.PackageUtils;
import com.gh.common.util.PlatformUtils;
@ -27,6 +28,7 @@ import com.gh.gamecenter.entity.ApkEntity;
import com.gh.gamecenter.entity.ApkLink;
import com.gh.gamecenter.entity.GameCollectionEntity;
import com.gh.gamecenter.entity.GameEntity;
import com.gh.gamecenter.entity.LinkEntity;
import com.gh.gamecenter.eventbus.EBDownloadStatus;
import com.gh.gamecenter.eventbus.EBPackage;
import com.gh.gamecenter.eventbus.EBReuse;
@ -68,6 +70,7 @@ public class DownloadDialog implements OnCollectionCallBackListener {
private PlatformPagerAdapter adapter;
private LinearLayout dialog_ll_hint;
private LinearLayout dialog_ll_collection;
private TextView dialogAd;
private ViewPager collectionViewPager;
private PlatformPagerAdapter collectionAdapter;
private DataWatcher dataWatcher = new DataWatcher() {
@ -153,6 +156,23 @@ public class DownloadDialog implements OnCollectionCallBackListener {
dialog_ll_collection = contentView.findViewById(R.id.dialog_ll_collection);
dialog_ll_collection_hint = contentView.findViewById(R.id.dialog_ll_collection_hint);
collectionViewPager = contentView.findViewById(R.id.dialog_collection_viewPager);
dialogAd = contentView.findViewById(R.id.dialog_ad);
LinkEntity downloadAd = gameEntity.getDownloadAd();
if (downloadAd != null) {
dialogAd.setVisibility(View.VISIBLE);
dialogAd.setText(downloadAd.getTitle());
dialogAd.setOnClickListener(v -> {
if ("imprint".equals(downloadAd.getType())) {
// todo show imprint dialog
} else {
DirectUtils.directToLinkPage(
mContext,
downloadAd,
entrance, "下载多平台弹窗");
}
});
}
isLoadPlatform = false;