折叠评论UI

This commit is contained in:
张玉久
2020-07-16 09:11:05 +08:00
parent 2d09f8c008
commit 9dc9add896
20 changed files with 335 additions and 77 deletions

View File

@ -1341,6 +1341,38 @@ public class DialogUtils {
dialog.show();
}
public static void showStopServerExplanationDialog(Context context, String content, String gameName) {
context = checkDialogContext(context);
final Dialog dialog = new TrackableDialog(context, R.style.GhAlertDialog, "评论说明弹窗", "弹窗", gameName, null, null, true);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_kaifu_remind, null);
TextView titleTv = contentView.findViewById(R.id.titleTv);
TextView contentTv = contentView.findViewById(R.id.contentTv);
MaxHeightNestedScrollView scrollView = contentView.findViewById(R.id.scrollView);
titleTv.setText("特殊停服状态说明:");
contentTv.setText(Html.fromHtml(content));
TextView ok = contentView.findViewById(R.id.dialog_ok);
scrollView.setScrollChangedListener((l, t, oldl, oldt) -> {
MtaHelper.onEvent("评论说明弹窗", "滑动内容", gameName);
});
ok.setOnClickListener(v -> {
MtaHelper.onEvent("评论说明弹窗", "弹窗", "点击我知道了");
MtaHelper.onEvent("评论说明弹窗", "点击我知道了", gameName);
dialog.dismiss();
});
Window window = dialog.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
}
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(contentView);
dialog.show();
}
public static void showPluggableNeverRemindDialog(Context context, String nameAndPlatform, @NonNull ConfirmListener listener) {
context = checkDialogContext(context);