update 餘額不足時彈框

This commit is contained in:
zlzw 2023-09-22 14:25:54 +08:00
parent 18970c22cf
commit 326ced4646

View File

@ -1,11 +1,16 @@
package com.yunbao.main.dialog;
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@ -16,12 +21,14 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.fastjson.JSON;
import com.makeramen.roundedimageview.RoundedImageView;
import com.yunbao.common.Constants;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.main.R;
@ -265,9 +272,24 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi
public void onSuccess(int code, String msg, String[] info) {
if (code == 0) {
dismiss();
} else if (code == 1001) {
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
@Override
public void onCancelClick() {
}
@Override
public void onConfirmClick(Dialog dialog, String content) {
dialog.dismiss();
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
}
});
} else {
ToastUtil.show(msg);
}
}
});
}