fix:保留首次进入跳转直播间功能,但在弹对话框前判断Activity是否销毁
This commit is contained in:
parent
12221c3ddc
commit
e8e1186498
@ -75,6 +75,11 @@ public class DialogUitl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void showSimpleTipDialog(Context context, String title, String content) {
|
public static void showSimpleTipDialog(Context context, String title, String content) {
|
||||||
|
if (context instanceof Activity) {
|
||||||
|
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
||||||
dialog.setContentView(R.layout.dialog_simple_tip);
|
dialog.setContentView(R.layout.dialog_simple_tip);
|
||||||
dialog.setCancelable(true);
|
dialog.setCancelable(true);
|
||||||
@ -105,6 +110,11 @@ public class DialogUitl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback callback) {
|
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback callback) {
|
||||||
|
if (context instanceof Activity) {
|
||||||
|
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
new Builder(context)
|
new Builder(context)
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
.setContent(content)
|
.setContent(content)
|
||||||
@ -115,6 +125,11 @@ public class DialogUitl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
||||||
|
if (context instanceof Activity) {
|
||||||
|
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
new Builder(context)
|
new Builder(context)
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
.setContent(content)
|
.setContent(content)
|
||||||
@ -125,6 +140,11 @@ public class DialogUitl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
||||||
|
if (context instanceof Activity) {
|
||||||
|
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
new Builder(context).setTitle(title)
|
new Builder(context).setTitle(title)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setInput(true)
|
.setInput(true)
|
||||||
|
@ -324,7 +324,7 @@ public class LoginActivity extends AbsActivity {
|
|||||||
home_zdy_img_cn = obj.getString("home_zdy_img_cn");
|
home_zdy_img_cn = obj.getString("home_zdy_img_cn");
|
||||||
}
|
}
|
||||||
MainActivity.forward(LoginActivity.this, false);
|
MainActivity.forward(LoginActivity.this, false);
|
||||||
//gotoLive(obj.getString("anchor_id"));
|
gotoLive(obj.getString("anchor_id"));
|
||||||
IMLoginManager.get(mContext).setisNewUserOne(true);
|
IMLoginManager.get(mContext).setisNewUserOne(true);
|
||||||
IMLoginManager.get(mContext).setNewUserGif(true);
|
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||||
if (obj.containsKey("home_zdy_pop")) {
|
if (obj.containsKey("home_zdy_pop")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user