diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a93d3af35e..47b6c37bc0 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -615,6 +615,10 @@
android:name=".personal.NewPersonalActivity"
android:screenOrientation="portrait" />
+
+
diff --git a/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt b/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt
index 5daca02c94..fc42fb695c 100644
--- a/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt
+++ b/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt
@@ -118,7 +118,7 @@ class SimulatorDownloadManager private constructor() {
key = if (shouldShowUpdate && isInstalled) "更新弹窗" else "下载弹窗",
logShowEvent = true
)
- DialogUtils.showNewAlertDialog(context, title, message, negativeText, positiveText, trackableEntity, Gravity.LEFT, {
+ DialogUtils.showNewAlertDialog(context, title, message, negativeText, positiveText, trackableEntity, Gravity.LEFT, false, {
if (shouldShowUpdate && isInstalled) {
cancelCallback?.invoke()
MtaHelper.onEvent(trackableEntity.event, trackableEntity.key, "点击下次再说")
diff --git a/app/src/main/java/com/gh/common/util/CommentUtils.java b/app/src/main/java/com/gh/common/util/CommentUtils.java
index 7e17331a91..5471cfe04b 100644
--- a/app/src/main/java/com/gh/common/util/CommentUtils.java
+++ b/app/src/main/java/com/gh/common/util/CommentUtils.java
@@ -334,15 +334,16 @@ public class CommentUtils {
});
});
}
+
public static void voteVideoComment(final Context context,
- String answerId,
- String articleId,
- String articleCommunityId,
- String videoId,
- final CommentEntity commentEntity,
- final TextView commentLikeCountTv,
- final ImageView commentLikeIv,
- final OnVoteListener listener) {
+ String answerId,
+ String articleId,
+ String articleCommunityId,
+ String videoId,
+ final CommentEntity commentEntity,
+ final TextView commentLikeCountTv,
+ final ImageView commentLikeIv,
+ final OnVoteListener listener) {
String entrance = "视频流-评论-点赞";
CheckLoginUtils.checkLogin(context, entrance, () -> {
@@ -389,10 +390,10 @@ public class CommentUtils {
}
public static void unVoteVideoComment(final Context context,
- String videoId,
- final CommentEntity commentEntity,
- final TextView commentLikeCountTv,
- final ImageView commentLikeIv) {
+ String videoId,
+ final CommentEntity commentEntity,
+ final TextView commentLikeCountTv,
+ final ImageView commentLikeIv) {
String entrance = "视频流-评论-取消点赞";
CheckLoginUtils.checkLogin(context, entrance, () -> {
RetrofitManager.getInstance(context).getApi()
@@ -434,10 +435,10 @@ public class CommentUtils {
holder.commentLikeIv.setImageResource(R.drawable.comment_vote_unselect);
if (userDataEntity == null || !userDataEntity.isCommentOwner()) {
- holder.replyLine.setVisibility(View.VISIBLE);
+ if (holder.replyLine != null) holder.replyLine.setVisibility(View.VISIBLE);
holder.commentReply.setVisibility(View.VISIBLE);
} else {
- holder.replyLine.setVisibility(View.GONE);
+ if (holder.replyLine != null) holder.replyLine.setVisibility(View.GONE);
holder.commentReply.setVisibility(View.GONE);
}
diff --git a/app/src/main/java/com/gh/common/util/DialogUtils.java b/app/src/main/java/com/gh/common/util/DialogUtils.java
index 43fcfcb809..dc0d50621a 100644
--- a/app/src/main/java/com/gh/common/util/DialogUtils.java
+++ b/app/src/main/java/com/gh/common/util/DialogUtils.java
@@ -350,7 +350,7 @@ public class DialogUtils {
* @param cmListener 确认按钮监听
*/
public static Dialog showNewAlertDialog(Context context, String title, CharSequence message
- , String negative, String positive, TrackableEntity trackableEntity, int gravity, final CancelListener clListener, final ConfirmListener cmListener) {
+ , String negative, String positive, TrackableEntity trackableEntity, int gravity, boolean shouldShowCloseBtn, final CancelListener clListener, final ConfirmListener cmListener) {
context = checkDialogContext(context);
final Dialog dialog;
if (trackableEntity != null) {
@@ -373,6 +373,7 @@ public class DialogUtils {
TextView cancelBtn = contentView.findViewById(R.id.cancel);
TextView confirmBtn = contentView.findViewById(R.id.confirm);
View middleLine = contentView.findViewById(R.id.middle_line);
+ View closeIv = contentView.findViewById(R.id.closeIv);
titleTv.setGravity(gravity);
contentTv.setGravity(gravity);
@@ -389,6 +390,8 @@ public class DialogUtils {
confirmBtn.setVisibility(View.GONE);
middleLine.setVisibility(View.GONE);
}
+ closeIv.setVisibility(shouldShowCloseBtn ? View.VISIBLE : View.GONE);
+ closeIv.setOnClickListener(v -> dialog.dismiss());
cancelBtn.setOnClickListener(v -> {
if (clListener != null) clListener.onCancel();
@@ -413,7 +416,12 @@ public class DialogUtils {
public static Dialog showNewAlertDialog(Context context, String title, CharSequence message
, String negative, String positive, final CancelListener clListener, final ConfirmListener cmListener) {
- return showNewAlertDialog(context, title, message, negative, positive, null, Gravity.LEFT, clListener, cmListener);
+ return showNewAlertDialog(context, title, message, negative, positive, null, Gravity.LEFT, false, clListener, cmListener);
+ }
+
+ public static Dialog showNewAlertDialog(Context context, String title, CharSequence message
+ , String negative, String positive, int gravity, boolean shouldShowCloseBtn, final CancelListener clListener, final ConfirmListener cmListener) {
+ return showNewAlertDialog(context, title, message, negative, positive, null, gravity, shouldShowCloseBtn, clListener, cmListener);
}
/**
@@ -1951,8 +1959,8 @@ public class DialogUtils {
final Dialog dialog = new Dialog(context, R.style.DialogWindowTransparent);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_energy, null);
- ((TextView)contentView.findViewById(R.id.userName)).setText("\"" + userName + "\"");
- ((TextView)contentView.findViewById(R.id.energy)).setText(energy + "");
+ ((TextView) contentView.findViewById(R.id.userName)).setText("\"" + userName + "\"");
+ ((TextView) contentView.findViewById(R.id.energy)).setText(energy + "");
contentView.findViewById(R.id.dialog_positive).setOnClickListener(v -> {
dialog.dismiss();
diff --git a/app/src/main/java/com/gh/common/util/ShareUtils.java b/app/src/main/java/com/gh/common/util/ShareUtils.java
index 98de9e0aad..6d32b49d53 100644
--- a/app/src/main/java/com/gh/common/util/ShareUtils.java
+++ b/app/src/main/java/com/gh/common/util/ShareUtils.java
@@ -319,7 +319,7 @@ public class ShareUtils {
});
}
- public void shareGameDetail(Activity activity, String url, String icon, String shareTitle, String shareSummary, ShareEntrance shareEntrance, String id, ShareCallBack callBack) {
+ public void shareParamsDetail(Activity activity, String url, String icon, String shareTitle, String shareSummary, ShareEntrance shareEntrance, String id, ShareCallBack callBack) {
if (activity.isFinishing()) return;
this.mActivity = new WeakReference<>(activity);
this.shareIcon = icon;
@@ -654,6 +654,10 @@ public class ShareUtils {
}
}
+ public String getTitle() {
+ return mTitle;
+ }
+
private class ShareRecyclerViewAdapter extends RecyclerView.Adapter {
private OnItemClickListener listener;
diff --git a/app/src/main/java/com/gh/common/util/UploadImageUtils.kt b/app/src/main/java/com/gh/common/util/UploadImageUtils.kt
index 6672758ea4..aeb0934522 100644
--- a/app/src/main/java/com/gh/common/util/UploadImageUtils.kt
+++ b/app/src/main/java/com/gh/common/util/UploadImageUtils.kt
@@ -116,6 +116,7 @@ object UploadImageUtils {
Observable.create(ObservableOnSubscribe