fix: 神策数据埋点第二期—0907测试(2) https://jira.shanqu.cc/browse/GHZS-3432
This commit is contained in:
@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
@ -33,6 +34,7 @@ import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -754,9 +756,13 @@ public class DialogUtils {
|
||||
View contentView = binding.getRoot();
|
||||
|
||||
binding.gameIcon.displayGameIcon(gameEntity);
|
||||
|
||||
AtomicBoolean dismissByTouchInside = new AtomicBoolean(false);
|
||||
|
||||
binding.closeIv.setOnClickListener(v -> {
|
||||
dismissByTouchInside.set(true);
|
||||
SensorsBridge.trackOverseasAddressDialogClick(
|
||||
"关闭弹窗",
|
||||
"取消",
|
||||
gameEntity.getId(),
|
||||
gameEntity.getName() != null ? gameEntity.getName() : "",
|
||||
gameEntity.getCategoryChinese()
|
||||
@ -770,6 +776,7 @@ public class DialogUtils {
|
||||
binding.urlTv.setText(gameEntity.getOverseasAddressDialog().getLink());
|
||||
binding.downloadBtn.setText("下载(" + gameEntity.getApk().get(0).getSize() + ")");
|
||||
binding.downloadBtn.setOnClickListener(v -> {
|
||||
dismissByTouchInside.set(true);
|
||||
SensorsBridge.trackOverseasAddressDialogClick(
|
||||
"下载",
|
||||
gameEntity.getId(),
|
||||
@ -785,6 +792,17 @@ public class DialogUtils {
|
||||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
}
|
||||
|
||||
dialog.setOnDismissListener(dialog1 -> {
|
||||
if (!dismissByTouchInside.get()) {
|
||||
SensorsBridge.trackOverseasAddressDialogClick(
|
||||
"关闭弹窗",
|
||||
gameEntity.getId(),
|
||||
gameEntity.getName() != null ? gameEntity.getName() : "",
|
||||
gameEntity.getCategoryChinese()
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setContentView(contentView);
|
||||
dialog.show();
|
||||
|
||||
Reference in New Issue
Block a user