迁移仓库
@@ -159,7 +159,7 @@
|
||||
<data
|
||||
android:host="time_go_mm"
|
||||
android:path="/add_user"
|
||||
android:scheme="timego" />
|
||||
android:scheme="yuliao" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
@@ -170,7 +170,7 @@
|
||||
<data
|
||||
android:host="time_go_mm"
|
||||
android:path="/join_group"
|
||||
android:scheme="timego" />
|
||||
android:scheme="yuliao" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
@@ -182,7 +182,7 @@
|
||||
<data
|
||||
android:host="time_go_mm"
|
||||
android:path="/scan_score"
|
||||
android:scheme="timego" />
|
||||
android:scheme="yuliao" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
@@ -198,7 +198,6 @@
|
||||
<service
|
||||
android:name="com.netease.nimlib.service.NimService"
|
||||
android:exported="true"
|
||||
|
||||
android:process=":core" />
|
||||
|
||||
<service
|
||||
@@ -279,7 +278,7 @@
|
||||
android:name=".contact.UserInfoActivity"
|
||||
android:exported="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppThemeStart">
|
||||
android:theme="@style/SampleTheme_new">
|
||||
|
||||
|
||||
</activity>
|
||||
@@ -359,7 +358,7 @@
|
||||
<activity
|
||||
android:name=".main.mine.UserInfoActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/AppThemeStart"
|
||||
android:theme="@style/SampleTheme_new"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
</activity>
|
||||
|
||||
@@ -281,6 +281,8 @@ public class IMApplication extends MultiDexApplication {
|
||||
|
||||
private void initUIKit() {
|
||||
SDKOptions sdkOptions = NimSDKOptionConfig.getSDKOptions(this, DataUtils.readAppKey(this));
|
||||
// SDKOptions sdkOptions = options();
|
||||
|
||||
IMKitClient.init(this, getLoginInfo(), sdkOptions);
|
||||
ALog.d(Constant.PROJECT_TAG, TAG, "initUIKit");
|
||||
|
||||
@@ -325,7 +327,7 @@ public class IMApplication extends MultiDexApplication {
|
||||
private SDKOptions options() {
|
||||
SDKOptions options = new SDKOptions();
|
||||
//此处仅设置appkey,其他设置请自行参看信令文档设置 :https://dev.yunxin.163.com/docs/product/信令/SDK开发集成/Android开发集成/初始化
|
||||
options.appKey = "23c9cbddd4b876908efdccd0a6f2638d";
|
||||
options.appKey = "4a2fd910e1dd63ece3b80a0b371af93f";
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ public class IMUIKitConfig {
|
||||
|
||||
public static String LOC_COUNTRY_CODE = "loc_country_code";
|
||||
|
||||
public static String RBCHAT_PRIVACY_CN_URL = "http://download.yuliao666.top/userAgreement.html?v=" + System.currentTimeMillis();
|
||||
public static String RBCHAT_SERVICE_CN_URL = "http://download.yuliao666.top/serviceAgreement.html?v=" + System.currentTimeMillis(); //服务协议
|
||||
public static String RBCHAT_PRIVACY_CN_URL = "https://download.niuchat.xyz/userAgreement.html?v=" + System.currentTimeMillis();
|
||||
public static String RBCHAT_SERVICE_CN_URL = "https://download.niuchat.xyz/serviceAgreement.html?v=" + System.currentTimeMillis(); //服务协议
|
||||
|
||||
public static String MIANMI_AGREEMENT_CN_URL = "http://download.yuliao666.top/nopwdAgreement.html?v=" + System.currentTimeMillis(); //免密协议
|
||||
public static String MIANMI_AGREEMENT_CN_URL = "https://download.niuchat.xyz/nopwdAgreement.html?v=" + System.currentTimeMillis(); //免密协议
|
||||
|
||||
public static String SUBSTATIONID = ApiService.SUBSTATIONID;
|
||||
|
||||
@@ -35,19 +35,22 @@ public class IMUIKitConfig {
|
||||
/**
|
||||
* 支付地址
|
||||
*/
|
||||
public static String ONLINE_PAYMENT_URL = ApiService.URL.equals("https://api.yuliao666.top/") ? "http://admin.yuliao666.top/#/appPay" : "https://admin-test.yuliao666.top/#/appPay";
|
||||
// public static String ONLINE_PAYMENT_URL = "http://admin.yuliao666.top/#/appPay";
|
||||
public static String ONLINE_PAYMENT_URL = ApiService.URL.equals("https://api.niuchat.xyz/") ? "https://admin.niuchat.xyz/#/appPay" : "https://admin-test.niuchat.xyz/#/appPay";
|
||||
// public static String ONLINE_PAYMENT_URL = "http://admin.api.niuchat.xyz/#/appPay";
|
||||
|
||||
/**
|
||||
* 分享落地页二维码地址
|
||||
*/
|
||||
// public static String SHARE_INVCODE = "http://qtalk666.top/#/download?code=%s";
|
||||
public static String SHARE_INVCODE = "http://admin.yuliao666.top/#/downLoad?code=%s&userId=%s";
|
||||
public static String SHARE_INVCODEGROUP = "http://admin.yuliao666.top/#/downLoad?code=%s&teamId=%s";
|
||||
public static String SHARE_INVCODEGROUP1 = "http://admin.yuliao666.top/#/downLoad?teamId=%s";
|
||||
|
||||
public static String SHARE_INVCODE1 = "http://admin.yuliao666.top/#/downLoad?userId=%s";
|
||||
public static String SHARE_INVCODE_START = "http://admin.yuliao666.top/#/downLoad";
|
||||
public static String SHARE_INVCODE_START_OLD = "http://admin.niuchat.xyz/#/downLoad";
|
||||
|
||||
public static String SHARE_INVCODE_START= "https://download.niuchat.xyz";
|
||||
public static String SHARE_INVCODE = SHARE_INVCODE_START+"?code=%s&userId=%s";
|
||||
public static String SHARE_INVCODEGROUP =SHARE_INVCODE_START+ "?code=%s&teamId=%s";
|
||||
public static String SHARE_INVCODEGROUP1 =SHARE_INVCODE_START+ "?teamId=%s";
|
||||
public static String SHARE_INVCODE1 =SHARE_INVCODE_START+ "?userId=%s";
|
||||
|
||||
|
||||
/***
|
||||
* 分享用户ID 二维码
|
||||
@@ -77,9 +80,9 @@ public class IMUIKitConfig {
|
||||
public static String SHARE_ATM_SAVE_CODE = "time_go_mm://payment_atm/%s";
|
||||
|
||||
|
||||
public static String bucketName = "letschat";//shenqi777
|
||||
public static String bucketName = "yuliao-online";
|
||||
|
||||
public static String OSS_URL = "https://static.bijr3t.com/";
|
||||
public static String OSS_URL = "https://api.niuchat.xyz/";
|
||||
|
||||
public static String AVATAR_DOWNLOAD_CONTROLLER_URL_ROOT = OSS_URL + "%s";
|
||||
|
||||
@@ -121,11 +124,17 @@ public class IMUIKitConfig {
|
||||
public static long NOTIFY_MESSAGE_START_TIME = 1714492800000l;
|
||||
|
||||
|
||||
/**
|
||||
* 文件上传类型:0 上传到源服务器 1 上传到阿里云 2 上传到七牛云
|
||||
*/
|
||||
public static int UPLOAD_TYPE = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 娃娃机地址
|
||||
*/
|
||||
// public static String WAWAJ_PATH =ApiService.URL.equals("https://api.letschat2023.com/")?"https://toy.letschat2023.com/#/?authorizeCode=":"http://toy.newsclub666.com/#/?authorizeCode=";
|
||||
public static String WAWAJ_PATH = ApiService.URL.equals("https://api.yuliao666.top/") ? "https://toy.letschat2023.com/#/" : "https://toy-test.letschat2023.com/#/";
|
||||
public static String WAWAJ_PATH = ApiService.URL.equals("https://api.niuchat.xyz/") ? "https://toy.letschat2023.com/#/" : "https://toy-test.letschat2023.com/#/";
|
||||
|
||||
/**
|
||||
* 银币商城
|
||||
@@ -139,24 +148,24 @@ public class IMUIKitConfig {
|
||||
/**
|
||||
* 银币商城
|
||||
*/
|
||||
public static String YINBI_PATH = ApiService.URL.equals("https://api.yuliao666.top/") ? "https://shop.yuliao666.top/#/" : "https://shop.yuliao666.top/";
|
||||
public static String YINBI_PATH = ApiService.URL.equals("https://api.niuchat.xyz/") ? "https://shop.niuchat.xyz/#/" : "https://shop.niuchat.xyz/";
|
||||
|
||||
|
||||
/**
|
||||
* 商户管理
|
||||
*/
|
||||
public static String MERCHANT_URL = ApiService.URL.equals("https://api.yuliao666.top/") ? "https://biz.letschat2023.com/#/pages/owner/index" : "https://biz-test.letschat2023.com/#/pages/owner/index";
|
||||
public static String MERCHANT_URL = ApiService.URL.equals("https://api.niuchat.xyz/") ? "https://biz.letschat2023.com/#/pages/owner/index" : "https://biz-test.letschat2023.com/#/pages/owner/index";
|
||||
|
||||
/**
|
||||
* 商户 用户
|
||||
*/
|
||||
public static String MERCHANT_USER_URL = ApiService.URL.equals("https://api.yuliao666.top/") ? "https://biz.letschat2023.com/#/" : "https://biz-test.letschat2023.com/#/";
|
||||
public static String MERCHANT_USER_URL = ApiService.URL.equals("https://api.niuchat.xyz/") ? "https://biz.letschat2023.com/#/" : "https://biz-test.letschat2023.com/#/";
|
||||
|
||||
/**
|
||||
* 兑换积分
|
||||
*/
|
||||
public static String SILVER_URL = ApiService.URL.equals("https://api.yuliao666.top/") ? "https://shop.yuliao666.top/#/pages/scanexchange/index?tagCode=" : "https://shop-test.yuliao666.top/#/pages/scanexchange/index?tagCode=";
|
||||
// public static String SILVER_URL = "https://shop.yuliao666.top/#/pages/scanexchange/index?tagCode=";
|
||||
public static String SILVER_URL = ApiService.URL.equals("https://api.niuchat.xyz/") ? "https://shop.niuchat.xyz/#/pages/scanexchange/index?tagCode=" : "https://shop-test.niuchat.xyz/#/pages/scanexchange/index?tagCode=";
|
||||
// public static String SILVER_URL = "https://shop.niuchat.xyz/#/pages/scanexchange/index?tagCode=";
|
||||
|
||||
// public static String SILVER_URL ="http://192.168.8.200:8080/#/pages/scanexchange/index?tagCode=" ;
|
||||
|
||||
|
||||
@@ -38,6 +38,14 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
//import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.alibaba.sdk.android.oss.ClientException;
|
||||
import com.alibaba.sdk.android.oss.OSSClient;
|
||||
import com.alibaba.sdk.android.oss.ServiceException;
|
||||
import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
||||
@@ -49,6 +57,7 @@ import com.hbl.yuliao.adapter.ViewHolder;
|
||||
import com.hbl.yuliao.databinding.ActivityTransferInfoBinding;
|
||||
import com.hbl.yuliao.databinding.ReportActivityBinding;
|
||||
import com.hbl.yuliao.model.AlbumBean;
|
||||
import com.hbl.yuliao.model.AvaterBean;
|
||||
import com.hbl.yuliao.model.GroupActionBean;
|
||||
import com.hbl.yuliao.model.ReportBean;
|
||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||
@@ -261,57 +270,108 @@ public class ReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
String stsCredentialsBean;
|
||||
StsCredentialsBean stsCredentialsBean;
|
||||
String stsCredentialsBean1;
|
||||
|
||||
private void toShangchuanAli() {
|
||||
showLoadingDialog();
|
||||
// Api.getInstance().stsCredentials()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
// stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// dimessLoadingDialog();
|
||||
// }
|
||||
// });
|
||||
|
||||
Api.getInstance().stsCredentials1()
|
||||
|
||||
if(IMUIKitConfig.UPLOAD_TYPE == 0) {
|
||||
updateImage(0);
|
||||
}else if(IMUIKitConfig.UPLOAD_TYPE == 1){
|
||||
|
||||
Api.getInstance().stsCredentials()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
toAliYunOss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(msg);
|
||||
|
||||
}
|
||||
});
|
||||
}else{
|
||||
Api.getInstance().stsCredentials1()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean1 = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toUpdateOssNew(0);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(msg);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
AvaterBean avaterBean = null;
|
||||
|
||||
private void updateImage(int i) {
|
||||
RequestBody imageBody = RequestBody.create(MediaType.parse("multipart/form-data"), localMedias.get(i).getRealPath());
|
||||
String fileName = UUID.randomUUID().toString() + "_" + localMedias.get(i).getFileName();
|
||||
|
||||
MultipartBody.Part imageBodyPart = MultipartBody.Part.createFormData("file", fileName, imageBody);
|
||||
Api.getInstance().uploadUserAvatar(imageBodyPart)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toUpdateOssNew(0);
|
||||
.subscribe(new BaseObserver<Result<AvaterBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<AvaterBean> feedbackResp) {
|
||||
avaterBean = feedbackResp.data;
|
||||
outputStrings.add(avaterBean.getAvatarFilename());
|
||||
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
if (i == uris.size() - 1) {
|
||||
sumbit();
|
||||
} else {
|
||||
updateImage(i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// private void toAliYunOss() {
|
||||
// String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
// String accessKeyId = "stsCredentialsBean.getAccessKeyId()";
|
||||
// String accessKeySecret = "stsCredentialsBean.getAccessKeySecret()";
|
||||
// String securityToken = "stsCredentialsBean.getSecurityToken()";
|
||||
// String bucketName = IMUIKitConfig.bucketName;
|
||||
//
|
||||
// OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
// OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||
// toUpdateOss(bucketName, 0, oss);
|
||||
//
|
||||
// }
|
||||
|
||||
private void toAliYunOss() {
|
||||
String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||
String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||
String securityToken = stsCredentialsBean.getSecurityToken();
|
||||
String bucketName = IMUIKitConfig.bucketName;
|
||||
|
||||
OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||
toUpdateOss(bucketName, 0, oss);
|
||||
|
||||
}
|
||||
//
|
||||
private void toUpdateOssNew( int i) {
|
||||
String updatePathPic = "report";
|
||||
@@ -335,7 +395,7 @@ public class ReportActivity extends BaseActivity {
|
||||
byte[] sss = convertFileToBytes(file);
|
||||
LogUtils.i("结果是啥开始:" + sss);
|
||||
|
||||
uploadManager.put(sss, files, stsCredentialsBean, (key, info, response) -> {
|
||||
uploadManager.put(sss, files, stsCredentialsBean1, (key, info, response) -> {
|
||||
// LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(info));
|
||||
LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(response));
|
||||
dimessLoadingDialog();
|
||||
@@ -381,69 +441,69 @@ public class ReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
//
|
||||
// private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
||||
// String updatePathPic = "report";
|
||||
//// Calendar calendar= Calendar.getInstance();
|
||||
//// String year = calendar.get(Calendar.YEAR)+"";
|
||||
//// String month = (calendar.get(Calendar.MONTH)+1)<10?"0"+(calendar.get(Calendar.MONTH)+1):(calendar.get(Calendar.MONTH)+1)+"";
|
||||
//// String d = calendar.get(Calendar.DATE)<10?"0"+calendar.get(Calendar.DAY_OF_MONTH):calendar.get(Calendar.DAY_OF_MONTH)+"";
|
||||
//
|
||||
// String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||
// if (i < uris.size()) {
|
||||
//
|
||||
// File file = new File(uriStrings.get(i));
|
||||
// String fileName = System.currentTimeMillis() + "_" + file.getName();
|
||||
// // 构造上传请求。
|
||||
// PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPic + "/" + data + "/" + fileName + ".png", localMedias.get(i).getRealPath());
|
||||
//
|
||||
//
|
||||
// put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
// LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
//// if(isVideo){
|
||||
//// showLoadingDialog(("正在上传"+(currentSize*100)/totalSize)+"%");
|
||||
//// }
|
||||
//
|
||||
//
|
||||
// });
|
||||
//
|
||||
// //OSSAsyncTask task =
|
||||
// oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
// @Override
|
||||
// public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
// LogUtils.i("PutObject", "UploadSuccess");
|
||||
// LogUtils.i("ETag", result.getETag());
|
||||
// LogUtils.i("RequestId", result.getRequestId());
|
||||
// LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
// outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + updatePathPic + "/" + data + "/" + fileName + ".png");
|
||||
// //https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
// if (i == uris.size() - 1) {
|
||||
// sumbit();
|
||||
// } else {
|
||||
// toUpdateOss(bucketName, i + 1, oss);
|
||||
// }
|
||||
private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
||||
String updatePathPic = "report";
|
||||
// Calendar calendar= Calendar.getInstance();
|
||||
// String year = calendar.get(Calendar.YEAR)+"";
|
||||
// String month = (calendar.get(Calendar.MONTH)+1)<10?"0"+(calendar.get(Calendar.MONTH)+1):(calendar.get(Calendar.MONTH)+1)+"";
|
||||
// String d = calendar.get(Calendar.DATE)<10?"0"+calendar.get(Calendar.DAY_OF_MONTH):calendar.get(Calendar.DAY_OF_MONTH)+"";
|
||||
|
||||
String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||
if (i < uris.size()) {
|
||||
|
||||
File file = new File(uriStrings.get(i));
|
||||
String fileName = System.currentTimeMillis() + "_" + file.getName();
|
||||
// 构造上传请求。
|
||||
PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPic + "/" + data + "/" + fileName + ".png", localMedias.get(i).getRealPath());
|
||||
|
||||
|
||||
put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
// if(isVideo){
|
||||
// showLoadingDialog(("正在上传"+(currentSize*100)/totalSize)+"%");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
// dimessLoadingDialog();
|
||||
// LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
//
|
||||
// // 请求异常。
|
||||
// if (clientExcepion != null) {
|
||||
// // 本地异常,如网络异常等。
|
||||
// clientExcepion.printStackTrace();
|
||||
// }
|
||||
// if (serviceException != null) {
|
||||
// // 服务异常。
|
||||
// LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
// LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
// LogUtils.i("HostId", serviceException.getHostId());
|
||||
// LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
});
|
||||
|
||||
//OSSAsyncTask task =
|
||||
oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
@Override
|
||||
public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
LogUtils.i("PutObject", "UploadSuccess");
|
||||
LogUtils.i("ETag", result.getETag());
|
||||
LogUtils.i("RequestId", result.getRequestId());
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + updatePathPic + "/" + data + "/" + fileName + ".png");
|
||||
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
if (i == uris.size() - 1) {
|
||||
sumbit();
|
||||
} else {
|
||||
toUpdateOss(bucketName, i + 1, oss);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
dimessLoadingDialog();
|
||||
LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
|
||||
// 请求异常。
|
||||
if (clientExcepion != null) {
|
||||
// 本地异常,如网络异常等。
|
||||
clientExcepion.printStackTrace();
|
||||
}
|
||||
if (serviceException != null) {
|
||||
// 服务异常。
|
||||
LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
LogUtils.i("HostId", serviceException.getHostId());
|
||||
LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
//不带圆角,目前视频使用
|
||||
@@ -531,6 +591,8 @@ public class ReportActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
package com.hbl.yuliao.contact;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -23,6 +29,7 @@ import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.core.view.WindowCompat;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
@@ -36,6 +43,7 @@ import com.hbl.yuliao.adapter.CommonAdapter;
|
||||
import com.hbl.yuliao.adapter.ViewHolder;
|
||||
import com.hbl.yuliao.databinding.ActivityUserInfoBinding;
|
||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||
import com.hbl.yuliao.main.MainActivity;
|
||||
import com.hbl.yuliao.main.mine.EditFriendUserInfoActivity;
|
||||
import com.hbl.yuliao.main.mine.EditUserInfoActivity;
|
||||
import com.hbl.yuliao.main.mine.photo.UserPhotoListActivity;
|
||||
@@ -77,6 +85,8 @@ import com.netease.yunxin.kit.corekit.im.repo.CommonRepo;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
||||
import com.netease.yunxin.nertc.ui.CallKitUI;
|
||||
import com.netease.yunxin.nertc.ui.base.CallParam;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -87,6 +97,7 @@ import java.util.Map;
|
||||
//import io.agora.onetoone.http.HttpManager;
|
||||
//import io.agora.onetoone.model.EnterRoomInfoModel;
|
||||
//import io.agora.onetoone.utils.SPUtil;
|
||||
import cc.shinichi.library.ImagePreview;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import kotlin.Unit;
|
||||
@@ -106,30 +117,75 @@ public class UserInfoActivity extends BaseActivity {
|
||||
private int isAllowAdd = 1;
|
||||
|
||||
|
||||
public static String kIsRtm = "isRtm";
|
||||
public static String kIsShowMode = "isShowMode";
|
||||
public static String kIsBrodCaster = "isBrodCaster";
|
||||
public static String kLocalUid = "localUid";
|
||||
public static String kOwnerUid = "ownerUid";
|
||||
public static String kIsRtm = "isRtm";
|
||||
public static String kIsShowMode = "isShowMode";
|
||||
public static String kIsBrodCaster = "isBrodCaster";
|
||||
public static String kLocalUid = "localUid";
|
||||
public static String kOwnerUid = "ownerUid";
|
||||
|
||||
public static String kDimensionsWidth = "dimensionsWidth";
|
||||
public static String kDimensionsHeight = "dimensionsHeight";
|
||||
public static String kFrameRate = "frameRate";
|
||||
public static String kBitrate = "bitrate";
|
||||
|
||||
public static String kDimensionsWidth = "dimensionsWidth";
|
||||
public static String kDimensionsHeight = "dimensionsHeight";
|
||||
public static String kFrameRate = "frameRate";
|
||||
public static String kBitrate = "bitrate";
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
if (Build.VERSION.SDK_INT < 30) {
|
||||
setTheme(R.style.AppThemeStart1);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
getWindow().setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
|
||||
// if (Build.VERSION.SDK_INT < 30) {
|
||||
// setTheme(R.style.AppThemeStart1);
|
||||
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
// getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
// }
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
// getWindow().setDecorFitsSystemWindows(false);
|
||||
// } else {
|
||||
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
// }
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
||||
viewBinding = ActivityUserInfoBinding.inflate(getLayoutInflater());
|
||||
|
||||
setContentView(viewBinding.getRoot());
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 30) {
|
||||
|
||||
ViewTreeObserver vto = getWindow().getDecorView().getViewTreeObserver();
|
||||
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||
getWindow().getDecorView().getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
} else {
|
||||
getWindow().getDecorView().getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
}
|
||||
|
||||
int height = getWindow().getDecorView().getRootView().getHeight();
|
||||
int width = getWindow().getDecorView().getRootView().getWidth();
|
||||
Log.d("ViewSize", "Height: " + height + ", Width: " + width);
|
||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
||||
ViewGroup.LayoutParams layoutParams = viewBinding.botLine0.getLayoutParams();
|
||||
layoutParams.height = getNavigationBarHeight(UserInfoActivity.this, height);
|
||||
viewBinding.botLine0.setLayoutParams(layoutParams);
|
||||
viewBinding.botLine1.setLayoutParams(layoutParams);
|
||||
viewBinding.botLine2.setLayoutParams(layoutParams);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
initView();
|
||||
initData();
|
||||
|
||||
@@ -189,7 +245,29 @@ public class UserInfoActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
|
||||
// changeUser();
|
||||
}
|
||||
|
||||
public int getNavigationBarHeight(Context context, int height) {
|
||||
Resources resources = context.getResources();
|
||||
if (isNavBarVisible(this, height)) {
|
||||
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
||||
return resources.getDimensionPixelSize(resourceId);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private boolean isNavBarVisible(Activity activity, int screenHeight) {
|
||||
// 获取屏幕的矩形区域,不包含系统UI(如状态栏和导航栏)
|
||||
Rect rect = new Rect();
|
||||
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
|
||||
// int screenHeight = activity.getWindow().getDecorView().getRootView().getHeight();
|
||||
LogUtils.i("高度是多少:" + screenHeight + ";;" + rect.bottom);
|
||||
// 如果矩形区域的高度不等于屏幕高度,说明有系统UI覆盖(如导航栏)
|
||||
return (screenHeight - rect.bottom) > 0;
|
||||
}
|
||||
|
||||
private void loadData(String account) {
|
||||
@@ -335,10 +413,15 @@ public class UserInfoActivity extends BaseActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
if(isVideoCall){
|
||||
if (isVideoCall) {
|
||||
ChatUtils.startVideoCall(UserInfoActivity.this, userInfoData.data.getAccount());
|
||||
}else{
|
||||
// CallParam param = CallParam.createSingleCallParam(RouterConstant.KEY_CALL_TYPE_VIDEO, IMKitClient.account(), userInfoData.data.getAccount());
|
||||
// CallKitUI.startSingleCall(UserInfoActivity.this, param);
|
||||
} else {
|
||||
ChatUtils.startAudioCall(UserInfoActivity.this, userInfoData.data.getAccount());
|
||||
|
||||
// CallParam param = CallParam.createSingleCallParam(RouterConstant.KEY_CALL_TYPE_AUDIO, IMKitClient.account(), userInfoData.data.getAccount());
|
||||
// CallKitUI.startSingleCall(UserInfoActivity.this, param);
|
||||
}
|
||||
|
||||
// SPUtil.putBoolean(UserInfoActivity.kIsRtm, true);
|
||||
@@ -675,7 +758,6 @@ public class UserInfoActivity extends BaseActivity {
|
||||
|
||||
cancelFollow(userInfoData.data.getAccount());
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void changeUser() {
|
||||
@@ -770,7 +852,9 @@ public class UserInfoActivity extends BaseActivity {
|
||||
EditUserInfoActivity.launch(getApplicationContext(), Constant.EDIT_SIGN, launcher);
|
||||
}
|
||||
});
|
||||
|
||||
viewBinding.privateTv.setOnClickListener(v -> {
|
||||
getDateList();
|
||||
});
|
||||
viewModel.init(accId);
|
||||
viewModel
|
||||
.getFriendFetchResult()
|
||||
@@ -853,6 +937,11 @@ public class UserInfoActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
private List<UserAlbumBean> userAlbumBeans = new ArrayList<>();
|
||||
CommonAdapter commonAdapterAlbum;
|
||||
|
||||
@@ -916,6 +1005,30 @@ public class UserInfoActivity extends BaseActivity {
|
||||
.error(R.mipmap.default_head_img)
|
||||
.apply(requestOptions).into(viewBinding.logoIv);
|
||||
viewBinding.btnAlbum.setText(getString(R.string.userphoto_title, getString(R.string.wo_txt)));
|
||||
|
||||
|
||||
viewBinding.logoIv.setOnClickListener(v -> {
|
||||
List<String> urls = new ArrayList<>();
|
||||
if (userInfoData.data.getAvatar() != null) {
|
||||
urls.add(userInfoData.data.getAvatar());
|
||||
}
|
||||
if (urls.size() > 0) {
|
||||
ImagePreview
|
||||
.getInstance()
|
||||
// 上下文,必须是activity,不需要担心内存泄漏,本框架已经处理好;
|
||||
.setContext(this)
|
||||
// 设置从第几张开始看(索引从0开始)
|
||||
.setIndex(0)
|
||||
.setIndicatorShapeResId(0)
|
||||
// 2:直接传url List
|
||||
.setImageList(urls)
|
||||
|
||||
// 开启预览
|
||||
.start();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
if (userInfoData.isFriend && !userInfoData.isBlack) {
|
||||
viewBinding.friendLy.setVisibility(View.VISIBLE);
|
||||
@@ -938,10 +1051,10 @@ public class UserInfoActivity extends BaseActivity {
|
||||
|
||||
if (userInfoData.isBlack) {
|
||||
viewBinding.blackLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.botLy.setVisibility(View.GONE);
|
||||
viewBinding.privateLl.setVisibility(View.GONE);
|
||||
} else {
|
||||
viewBinding.blackLy.setVisibility(View.GONE);
|
||||
viewBinding.botLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.privateLl.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (userInfoData.friendInfo != null) {
|
||||
@@ -960,7 +1073,8 @@ public class UserInfoActivity extends BaseActivity {
|
||||
viewBinding.bigBg.setBackgroundColor(getColor(R.color.color_eefof7));
|
||||
} else {
|
||||
viewBinding.broLy.setVisibility(View.GONE);
|
||||
viewBinding.bigBg.setBackgroundResource(R.drawable.user_true);
|
||||
// viewBinding.bigBg.setBackgroundResource(R.drawable.user_true);
|
||||
viewBinding.bigBg.setBackgroundColor(getColor(R.color.color_eefof7));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,13 @@ public class SelectPushTypeDialog extends Dialog {
|
||||
onNextCallListener.toType(2);
|
||||
}
|
||||
});
|
||||
|
||||
dialogSelectPushTypeBinding.cancelTv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
changeType();
|
||||
|
||||
Window window = getWindow();
|
||||
@@ -81,15 +88,15 @@ public class SelectPushTypeDialog extends Dialog {
|
||||
|
||||
if(type==0){
|
||||
dialogSelectPushTypeBinding.allVisibleIv.setVisibility(View.VISIBLE);
|
||||
dialogSelectPushTypeBinding.allVisibleTv.setTextColor(getContext().getResources().getColor(R.color.color_themepink));
|
||||
// dialogSelectPushTypeBinding.allVisibleTv.setTextColor(getContext().getResources().getColor(R.color.color_themepink));
|
||||
|
||||
}else if(type==1){
|
||||
dialogSelectPushTypeBinding.friendVisibleIv.setVisibility(View.VISIBLE);
|
||||
dialogSelectPushTypeBinding.friendVisibleTv.setTextColor(getContext().getResources().getColor(R.color.color_themepink));
|
||||
// dialogSelectPushTypeBinding.friendVisibleTv.setTextColor(getContext().getResources().getColor(R.color.color_themepink));
|
||||
|
||||
}else if(type==2){
|
||||
dialogSelectPushTypeBinding.onlymeVisibleIv.setVisibility(View.VISIBLE);
|
||||
dialogSelectPushTypeBinding.onlymeVisibleTv.setTextColor(getContext().getResources().getColor(R.color.color_themepink));
|
||||
// dialogSelectPushTypeBinding.onlymeVisibleTv.setTextColor(getContext().getResources().getColor(R.color.color_themepink));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1651,7 +1651,7 @@ public class JsBridgeActivity extends BaseActivity {
|
||||
//{"scheme":"time_go_mm://payment_bead/","userId":"10","value":"388a762b474f944b"}
|
||||
String scheme = qrData.getScheme();
|
||||
if (scheme.startsWith("http")) {
|
||||
if (scheme.startsWith("http://admin.yuliao666.top/") && scheme.contains("deviceId")) {
|
||||
if (scheme.startsWith("http://admin.niuchat.xyz/") && scheme.contains("deviceId")) {
|
||||
sendMachine(scheme);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,9 +162,8 @@ public class ShopFragment extends BaseFragment {
|
||||
});
|
||||
|
||||
|
||||
// viewBinding.jsbridgeBridgewebview.loadUrl("https://h5.shopxo.vip/#/pages/goods-search/goods-search?category_id=1");
|
||||
viewBinding.jsbridgeBridgewebview.loadUrl("http://47.243.153.122:2396/#/");
|
||||
|
||||
// viewBinding.jsbridgeBridgewebview.loadUrl("http://192.168.0.231:8080/");
|
||||
viewBinding.jsbridgeBridgewebview.loadUrl(DataUtils.get(getActivity(), "mall_address", ""));
|
||||
|
||||
viewBinding.jsbridgeBridgewebview.addHandlerLocal("ZeroCard", new BridgeHandler() {
|
||||
@Override
|
||||
@@ -198,7 +197,7 @@ public class ShopFragment extends BaseFragment {
|
||||
Api.getInstance().authorizeLogin(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<AuthorizeBean>>() {
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<AuthorizeBean> feedbackResp) {
|
||||
if (feedbackResp.data != null) {
|
||||
@@ -578,6 +577,14 @@ public class ShopFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
|
||||
public boolean canGoBack(){
|
||||
if(viewBinding.jsbridgeBridgewebview.canGoBack()){
|
||||
viewBinding.jsbridgeBridgewebview.goBack();
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WebChromeClient 实现类
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ZhuanShuListActivity extends BaseActivity {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, RedpacketGroupBean s, int index) {
|
||||
holder.setText(R.id.title_tv,s.getSenderNickname()+"发给我的专属红包");
|
||||
holder.setText(R.id.jine_tv,"¥ "+ AppUtils.getQian(s.getAmount()));
|
||||
holder.setText(R.id.jine_tv," "+ AppUtils.getQian(s.getAmount()));
|
||||
holder.setText(R.id.time_tv,""+ s.getSendTime());
|
||||
|
||||
holder.getView(R.id.item_ry).setOnClickListener(v -> {
|
||||
|
||||
@@ -424,6 +424,8 @@ public class ChongZhiActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.hbl.yuliao.databinding.ActivityPhoneLoginBinding;
|
||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||
import com.hbl.yuliao.dialog.SelectCountryDialog;
|
||||
import com.hbl.yuliao.main.MainActivity;
|
||||
import com.hbl.yuliao.model.ConfigBean;
|
||||
import com.hbl.yuliao.model.CountryBean;
|
||||
import com.hbl.yuliao.model.LoginBean;
|
||||
import com.hbl.yuliao.model.PassWordLoginBean;
|
||||
@@ -55,11 +56,13 @@ import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BrowseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.dialog.LoadingDialog;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.login.LoginCallback;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.iwgang.simplifyspan.customspan.CustomClickableSpan;
|
||||
@@ -361,7 +364,7 @@ public class PhoneLoginActivity extends BaseActivity {
|
||||
|
||||
PassWordLoginBean passWordLoginBean = new PassWordLoginBean(uidOrMail, loginPsw, countryBean.getAreaCodeName(),
|
||||
0, GetAndroidUniqueMark.getUniqueId(PhoneLoginActivity.this), IMUIKitConfig.SUBSTATIONID);
|
||||
// showLoadingDialog("正在登录……");
|
||||
showLoadingDialog("正在登录……");
|
||||
Api.getInstance().passwordLogin(passWordLoginBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -377,13 +380,13 @@ public class PhoneLoginActivity extends BaseActivity {
|
||||
feedbackResp.data.setIsBiz(feedbackResp.data.getUser().getIsBiz());
|
||||
feedbackResp.data.setAllowGiftCoin(feedbackResp.data.getUser().getAllowGiftCoin());
|
||||
DataUtils.set(PhoneLoginActivity.this, "login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
||||
loginIM(feedbackResp.data.getUser_uid(), feedbackResp.data.getUser().getChatToken());
|
||||
getConfig(feedbackResp.data.getUser_uid(),feedbackResp.data.getUser().getChatToken());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
// dimessLoadingDialog();
|
||||
dimessLoadingDialog();
|
||||
// LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
// WidgetUtils.showToast(LoginActivity.this, msg + "", WidgetUtils.ToastType.ERROR);
|
||||
ToastX.showShortToast(msg);
|
||||
@@ -392,8 +395,76 @@ public class PhoneLoginActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
public LoadingDialog loadingDialog;
|
||||
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
public void showLoadingDialog(String msg) {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText(msg);
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
public void dimessLoadingDialog() {
|
||||
if (loadingDialog != null) {
|
||||
loadingDialog.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 赠送开关配置
|
||||
*/
|
||||
private void getConfig(String uid,String chatToken) {
|
||||
// DataUtils.set(MainActivity.this, "mall_address", "");
|
||||
Api.getInstance().getConfig()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<List<ConfigBean>> feedbackResp) {
|
||||
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
for (ConfigBean configBean : feedbackResp.data) {
|
||||
if (configBean.getId() == 1) {
|
||||
DataUtils.set(PhoneLoginActivity.this, "transfer_cash", configBean.getVal().equals("1"));
|
||||
}
|
||||
if (configBean.getId() == 4) {
|
||||
DataUtils.set(PhoneLoginActivity.this, "redpkg_score", configBean.getVal().equals("1"));
|
||||
}
|
||||
|
||||
if (configBean.getCode().equals("mall_address")) {
|
||||
DataUtils.set(PhoneLoginActivity.this, "mall_address", configBean.getVal());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
loginIM(uid, chatToken);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
DataUtils.set(PhoneLoginActivity.this, "mall_address","");
|
||||
loginIM(uid, chatToken);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void doLogin1() {
|
||||
hideSoftInput(this);
|
||||
showLoadingDialog("正在登录……");
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("phone", activityWelcomeBinding.phoneEt.getText().toString());
|
||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||
@@ -421,11 +492,13 @@ public class PhoneLoginActivity extends BaseActivity {
|
||||
DataUtils.set(PhoneLoginActivity.this, "login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
||||
// loginIM(o.data.getUser_uid(), o.data.getChatToken());
|
||||
LogUtils.i("用户信息:" + feedbackResp.data.getUser_uid() + ";;" + feedbackResp.data.getUser().getChatToken());
|
||||
loginIM(feedbackResp.data.getUser_uid(), feedbackResp.data.getUser().getChatToken());
|
||||
getConfig(feedbackResp.data.getUser_uid(),feedbackResp.data.getUser().getChatToken());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dismissLoading();
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
@@ -499,12 +572,14 @@ public class PhoneLoginActivity extends BaseActivity {
|
||||
new LoginCallback<LoginInfo>() {
|
||||
@Override
|
||||
public void onError(int errorCode, @NonNull String errorMsg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(
|
||||
String.format(getResources().getString(R.string.login_fail), errorCode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(@Nullable LoginInfo data) {
|
||||
dimessLoadingDialog();
|
||||
DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, account);
|
||||
DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
||||
DataUtils.set(PhoneLoginActivity.this,"last_login_time",System.currentTimeMillis());
|
||||
|
||||
@@ -47,6 +47,14 @@ import androidx.fragment.app.Fragment;
|
||||
//import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.alibaba.sdk.android.oss.ClientException;
|
||||
import com.alibaba.sdk.android.oss.OSSClient;
|
||||
import com.alibaba.sdk.android.oss.ServiceException;
|
||||
import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
@@ -61,6 +69,7 @@ import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||
import com.hbl.yuliao.dialog.SelectCountryDialog;
|
||||
import com.hbl.yuliao.main.MainActivity;
|
||||
import com.hbl.yuliao.model.AvaterBean;
|
||||
import com.hbl.yuliao.model.ConfigBean;
|
||||
import com.hbl.yuliao.model.CountryBean;
|
||||
import com.hbl.yuliao.model.LoginBean;
|
||||
import com.hbl.yuliao.model.PassWordLoginBean;
|
||||
@@ -77,6 +86,7 @@ import com.hbl.yuliao.utils.DataUtils;
|
||||
import com.hbl.yuliao.utils.GetAndroidUniqueMark;
|
||||
import com.hbl.yuliao.utils.GsonUtils;
|
||||
import com.hbl.yuliao.utils.LogUtils;
|
||||
import com.hbl.yuliao.utils.UpdateUtils;
|
||||
import com.hbl.yuliao.welcome.WelcomeActivity;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
@@ -119,6 +129,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -148,6 +159,7 @@ public class RegisterActivity extends BaseActivity {
|
||||
String avater = null;
|
||||
long lastTime =0;
|
||||
PermissionExplainDialog permissionExplainDialog;
|
||||
String pathName = "userAvatarFileName";
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
@Override
|
||||
@@ -287,10 +299,8 @@ public class RegisterActivity extends BaseActivity {
|
||||
});
|
||||
activityWelcomeBinding.areaTv.setText(ApiService.AREA_CODE);
|
||||
|
||||
activityWelcomeBinding.nanIv.setOnClickListener(v -> changeSex(1));
|
||||
activityWelcomeBinding.nanTv.setOnClickListener(v -> changeSex(1));
|
||||
activityWelcomeBinding.nvIv.setOnClickListener(v -> changeSex(0));
|
||||
activityWelcomeBinding.nvTv.setOnClickListener(v -> changeSex(0));
|
||||
activityWelcomeBinding.nanLy.setOnClickListener(v -> changeSex(1));
|
||||
activityWelcomeBinding.nvLy.setOnClickListener(v -> changeSex(0));
|
||||
|
||||
AnimUtil.setAnimViews(activityWelcomeBinding.sendSmsTv, activityWelcomeBinding.changePassTv,
|
||||
activityWelcomeBinding.nextIv, activityWelcomeBinding.changeSmsCodeTv, activityWelcomeBinding.areaTv,
|
||||
@@ -411,6 +421,7 @@ public class RegisterActivity extends BaseActivity {
|
||||
|
||||
|
||||
private void phoneRegister() {
|
||||
showLoadingDialog("注册中…");
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("phone", String.valueOf(activityWelcomeBinding.phoneEt.getText()).trim());
|
||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||
@@ -437,6 +448,7 @@ public class RegisterActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
@@ -477,12 +489,13 @@ public class RegisterActivity extends BaseActivity {
|
||||
|
||||
DataUtils.set(RegisterActivity.this,"login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
||||
|
||||
loginIM(feedbackResp.data.getUser_uid(),feedbackResp.data.getUser().getChatToken());
|
||||
getConfig(feedbackResp.data.getUser_uid(),feedbackResp.data.getUser().getChatToken());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
// dimessLoadingDialog();
|
||||
dimessLoadingDialog();
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast( msg);
|
||||
|
||||
@@ -491,28 +504,47 @@ public class RegisterActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 赠送开关配置
|
||||
*/
|
||||
private void getConfig(String uid,String chatToken) {
|
||||
// DataUtils.set(MainActivity.this, "mall_address", "");
|
||||
Api.getInstance().getConfig()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<List<ConfigBean>> feedbackResp) {
|
||||
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
for (ConfigBean configBean : feedbackResp.data) {
|
||||
if (configBean.getId() == 1) {
|
||||
DataUtils.set(RegisterActivity.this, "transfer_cash", configBean.getVal().equals("1"));
|
||||
}
|
||||
if (configBean.getId() == 4) {
|
||||
DataUtils.set(RegisterActivity.this, "redpkg_score", configBean.getVal().equals("1"));
|
||||
}
|
||||
|
||||
if (configBean.getCode().equals("mall_address")) {
|
||||
DataUtils.set(RegisterActivity.this, "mall_address", configBean.getVal());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
loginIM(uid, chatToken);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
DataUtils.set(RegisterActivity.this, "mall_address","");
|
||||
loginIM(uid, chatToken);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
// AvaterBean avaterBean = null;
|
||||
//
|
||||
// private void updateImage(File file) {
|
||||
// RequestBody imageBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
// MultipartBody.Part imageBodyPart = MultipartBody.Part.createFormData("file", file.getName(), imageBody);
|
||||
// Api.getInstance().uploadUserAvatar(imageBodyPart)
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<Result<AvaterBean>>() {
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(Result<AvaterBean> feedbackResp) {
|
||||
// avaterBean = feedbackResp.data;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
private void toStep2() {
|
||||
@@ -873,6 +905,7 @@ public class RegisterActivity extends BaseActivity {
|
||||
new LoginCallback<LoginInfo>() {
|
||||
@Override
|
||||
public void onError(int errorCode, @NonNull String errorMsg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(
|
||||
String.format(getResources().getString(R.string.login_fail), errorCode));
|
||||
}
|
||||
@@ -880,7 +913,7 @@ public class RegisterActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onSuccess(@Nullable LoginInfo data) {
|
||||
activityWelcomeBinding.getRoot().setVisibility(View.GONE);
|
||||
|
||||
dimessLoadingDialog();
|
||||
DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, account);
|
||||
DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
||||
DataUtils.set(RegisterActivity.this,"last_login_time",System.currentTimeMillis());
|
||||
@@ -930,184 +963,39 @@ public class RegisterActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
String stsCredentialsBean;
|
||||
UpdateUtils updateUtils;
|
||||
|
||||
private void toShangchuanAli(File file ) {
|
||||
showLoadingDialog("正在上传头像");
|
||||
// Api.getInstance().stsCredentials()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
// stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss(file);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// dimessLoadingDialog();
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
Api.getInstance().stsCredentials1()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toQIiNiuYunOss(file);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dimessLoadingDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void toQIiNiuYunOss(File file) {
|
||||
String updatePathPicHead = "userAvatarFileName";
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
(key, percent) -> {
|
||||
}, () -> {
|
||||
return false;
|
||||
});
|
||||
Configuration configuration = new Configuration.Builder()
|
||||
.build();
|
||||
UploadManager uploadManager = new UploadManager(configuration);
|
||||
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
// LogUtils.i("结果是啥开始:" + stsCredentialsBean + ";;" + file.getAbsolutePath());
|
||||
String files = "media/" + updatePathPicHead + "/" + fileName;
|
||||
uploadManager.put(file, files, stsCredentialsBean, (key, info, response) -> {
|
||||
// LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(info));
|
||||
// LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(response));
|
||||
dimessLoadingDialog();
|
||||
if (info != null && info.isOK()) {
|
||||
// 上传成功
|
||||
avater = IMUIKitConfig.OSS_URL+files;
|
||||
|
||||
} else {
|
||||
// 上传失败
|
||||
LogUtils.i("结果是啥失败:" + GsonUtils.beanToJSONString(info));
|
||||
updateUtils = new UpdateUtils();
|
||||
//Context context, File file, String pathName, OnToActionListener onToActionListener, Handler... handler
|
||||
updateUtils.toShangchuanAli(RegisterActivity.this,file, pathName,new UpdateUtils.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbitSuccess(String path) {
|
||||
dimessLoadingDialog();
|
||||
avater = path;
|
||||
}
|
||||
}, options);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
public static byte[] convertFileToBytes(File file) {
|
||||
// 使用ByteArrayOutputStream来收集字节数据
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = new FileInputStream(file);
|
||||
byte[] bytesArray = new byte[(int) file.length()];
|
||||
fis.read(bytesArray);
|
||||
fis.close();
|
||||
return bytesArray;
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
// throw new RuntimeException(e);
|
||||
return null;
|
||||
} catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toSumbitFails(String message) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(message);
|
||||
}
|
||||
},handler);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// private void toAliYunOss(File file, boolean isHead) {
|
||||
// String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
//// String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||
//// String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||
//// String securityToken = stsCredentialsBean.getSecurityToken();
|
||||
//
|
||||
// String accessKeyId = "";
|
||||
// String accessKeySecret = "";
|
||||
// String securityToken = "";
|
||||
// String bucketName = IMUIKitConfig.bucketName;
|
||||
//
|
||||
// OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
// OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||
// toUpdateOss(bucketName, 0, oss, file);
|
||||
//
|
||||
// }
|
||||
public static Handler handler = new Handler();
|
||||
|
||||
//
|
||||
// private void toUpdateOss(String bucketName, int i, OSSClient oss, File file ) {
|
||||
// LogUtils.i("1111111111111111111");
|
||||
// String updatePathPicHead = "userAvatarFileName";
|
||||
//
|
||||
// LogUtils.i("22222222222222222");
|
||||
//
|
||||
// String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
// LogUtils.i("文件地址是啥:" + file.getAbsolutePath());
|
||||
// LogUtils.i("文件地址是啥1:" + file.getPath());
|
||||
//
|
||||
// PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPicHead + "/" + fileName, file.getAbsolutePath());
|
||||
//
|
||||
// put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
// LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
//
|
||||
// });
|
||||
// LogUtils.i("55555555555555");
|
||||
//
|
||||
// oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
// @Override
|
||||
// public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
// LogUtils.i("PutObject", "UploadSuccess");
|
||||
// LogUtils.i("ETag", result.getETag());
|
||||
// LogUtils.i("RequestId", result.getRequestId());
|
||||
// LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
//
|
||||
// handler.post(() -> {
|
||||
// dimessLoadingDialog();
|
||||
// avater = IMUIKitConfig.OSS_URL+"media/" + updatePathPicHead + "/" + fileName;
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
// dimessLoadingDialog();
|
||||
// LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
//
|
||||
// // 请求异常。
|
||||
// if (clientExcepion != null) {
|
||||
// // 本地异常,如网络异常等。
|
||||
// clientExcepion.printStackTrace();
|
||||
// }
|
||||
// if (serviceException != null) {
|
||||
// // 服务异常。
|
||||
// LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
// LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
// LogUtils.i("HostId", serviceException.getHostId());
|
||||
// LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
public LoadingDialog loadingDialog;
|
||||
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
@@ -1136,4 +1024,6 @@ public class RegisterActivity extends BaseActivity {
|
||||
return super .onTouchEvent(event);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -528,6 +528,8 @@ public class WangjiActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ import com.huawei.hms.ml.scan.HmsScan;
|
||||
import com.huawei.hms.ml.scan.HmsScanAnalyzerOptions;
|
||||
import com.king.app.updater.AppUpdater;
|
||||
import com.king.zxing.util.CodeUtils;
|
||||
//import com.netease.lava.nertc.sdk.NERtcOption;
|
||||
import com.netease.lava.nertc.sdk.NERtcOption;
|
||||
import com.netease.nimlib.sdk.NIMClient;
|
||||
import com.netease.nimlib.sdk.Observer;
|
||||
@@ -290,7 +289,9 @@ public class MainActivity extends BaseActivity {
|
||||
// private ChatMainFragment chatMainFragment;
|
||||
// private ChatMain2Fragment chatMain2Fragment;
|
||||
// private ChatTabFragment chatTabFragment;
|
||||
private ShopFragment voomFragment;
|
||||
private ShopFragment shopFragment;
|
||||
private VoomFragment voomFragment;
|
||||
|
||||
private MineFragment walletFragment;
|
||||
FragmentAdapter fragmentAdapter;
|
||||
|
||||
@@ -426,7 +427,7 @@ public class MainActivity extends BaseActivity {
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
if (Build.VERSION.SDK_INT <30) {
|
||||
if (Build.VERSION.SDK_INT < 30) {
|
||||
setTheme(R.style.AppThemeStart1);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
@@ -465,7 +466,7 @@ public class MainActivity extends BaseActivity {
|
||||
Log.d("ViewSize", "Height: " + height + ", Width: " + width);
|
||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
||||
ViewGroup.LayoutParams layoutParams = activityMainBinding.bottomV.getLayoutParams();
|
||||
layoutParams.height = getNavigationBarHeight(MainActivity.this,height);
|
||||
layoutParams.height = getNavigationBarHeight(MainActivity.this, height);
|
||||
// if(Build.MANUFACTURER.equals("HUAWEI")){
|
||||
// layoutParams.height = 0;
|
||||
// }
|
||||
@@ -571,11 +572,22 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if(activityMainBinding.qrRy.getVisibility()==View.VISIBLE){
|
||||
activityMainBinding.qrRy.removeAllViews();
|
||||
activityMainBinding.qrRy.setVisibility(View.GONE);
|
||||
}else {
|
||||
super.onBackPressed();
|
||||
|
||||
if (activityMainBinding.viewPager.getCurrentItem() == 2) {
|
||||
if (shopFragment != null) {
|
||||
if (!shopFragment.canGoBack()) {
|
||||
// super.onBackPressed();
|
||||
}
|
||||
} else {
|
||||
// super.onBackPressed();
|
||||
}
|
||||
} else {
|
||||
if (activityMainBinding.qrRy.getVisibility() == View.VISIBLE) {
|
||||
activityMainBinding.qrRy.removeAllViews();
|
||||
activityMainBinding.qrRy.setVisibility(View.GONE);
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -845,7 +857,7 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
private void getVersion() {
|
||||
try {
|
||||
Api.getInstance().version(com.hbl.yuliao.network.ApiService.AREA_CODE.equals("+86")?7:0,
|
||||
Api.getInstance().version(0,
|
||||
DataUtils.getVersionCode(MainActivity.this), com.netease.yunxin.kit.chatkit.ui.network.ApiService.SUBSTATIONID1)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -906,40 +918,40 @@ public class MainActivity extends BaseActivity {
|
||||
int loc = DataUtils.get(MainActivity.this, "locale", 1);
|
||||
switch (loc) {
|
||||
case 1:
|
||||
name = versionBean.getUpgradeHintZhCn().replace("\\n","\n");
|
||||
name = versionBean.getUpgradeHintZhCn().replace("\\n", "\n");
|
||||
break;
|
||||
case 2:
|
||||
name = versionBean.getUpgradeHintEnUs().replace("\\n","\n");
|
||||
name = versionBean.getUpgradeHintEnUs().replace("\\n", "\n");
|
||||
break;
|
||||
case 3:
|
||||
name = versionBean.getUpgradeHintJaJp().replace("\\n","\n");
|
||||
name = versionBean.getUpgradeHintJaJp().replace("\\n", "\n");
|
||||
break;
|
||||
default:
|
||||
name = versionBean.getUpgradeHintZhTw().replace("\\n","\n");
|
||||
name = versionBean.getUpgradeHintZhTw().replace("\\n", "\n");
|
||||
break;
|
||||
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getNavigationBarHeight(Context context,int height) {
|
||||
public int getNavigationBarHeight(Context context, int height) {
|
||||
Resources resources = context.getResources();
|
||||
if(isNavBarVisible(this,height)){
|
||||
if (isNavBarVisible(this, height)) {
|
||||
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
||||
return resources.getDimensionPixelSize(resourceId);
|
||||
}else{
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private boolean isNavBarVisible(Activity activity,int screenHeight) {
|
||||
private boolean isNavBarVisible(Activity activity, int screenHeight) {
|
||||
// 获取屏幕的矩形区域,不包含系统UI(如状态栏和导航栏)
|
||||
Rect rect = new Rect();
|
||||
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
|
||||
// int screenHeight = activity.getWindow().getDecorView().getRootView().getHeight();
|
||||
LogUtils.i("高度是多少:"+screenHeight+";;"+rect.bottom);
|
||||
LogUtils.i("高度是多少:" + screenHeight + ";;" + rect.bottom);
|
||||
// 如果矩形区域的高度不等于屏幕高度,说明有系统UI覆盖(如导航栏)
|
||||
return (screenHeight - rect.bottom) > 0;
|
||||
}
|
||||
@@ -1097,7 +1109,32 @@ public class MainActivity extends BaseActivity {
|
||||
configCallKit();
|
||||
}
|
||||
}
|
||||
//
|
||||
private void configCallKitNew() {
|
||||
CallKitUIOptions options = new CallKitUIOptions.Builder()
|
||||
// 必要:音视频通话 sdk appKey,用于通话中使用
|
||||
.rtcAppKey("4a2fd910e1dd63ece3b80a0b371af93f")
|
||||
// 必要:当前用户 AccId
|
||||
.currentUserAccId(IMKitClient.account())
|
||||
// 通话接听成功的超时时间单位 毫秒,默认30s
|
||||
.timeOutMillisecond(30 * 1000L)
|
||||
// 此处为 收到来电时展示的 notification 相关配置,如图标,提示语等。
|
||||
.notificationConfigFetcher(invitedInfo -> new CallKitNotificationConfig(R.mipmap.ic_launche))
|
||||
// 收到被叫时若 app 在后台,在恢复到前台时是否自动唤起被叫页面,默认为 true
|
||||
.resumeBGInvitation(true)
|
||||
// 请求 rtc token 服务,若非安全模式则不需设置(V1.8.0版本之前需要配置,V1.8.0及之后版本无需配置)
|
||||
//.rtcTokenService((uid, callback) -> requestRtcToken(appKey, uid, callback)) // 自己实现的 token 请求方法
|
||||
// 设置初始化 rtc sdk 相关配置,按照所需进行配置
|
||||
.rtcSdkOption(new NERtcOption())
|
||||
// 呼叫组件初始化 rtc 范围,true-全局初始化,false-每次通话进行初始化以及销毁
|
||||
// 全局初始化有助于更快进入首帧页面,当结合其他组件使用时存在rtc初始化冲突可设置false
|
||||
.rtcInitScope(true)
|
||||
.build();
|
||||
// 若重复初始化会销毁之前的初始化实例,重新初始化
|
||||
CallKitUI.init(getApplicationContext(), options);
|
||||
|
||||
|
||||
}
|
||||
//
|
||||
private void configCallKit() {
|
||||
CallKitUIOptions options = new CallKitUIOptions.Builder().soundHelper(new SoundHelper() {
|
||||
@Override
|
||||
@@ -1119,7 +1156,8 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
return resId;
|
||||
}
|
||||
}).rtcAppKey(DataUtils.readAppKey(this))
|
||||
})
|
||||
.rtcAppKey(DataUtils.readAppKey(this))
|
||||
.currentUserAccId(IMKitClient.account())
|
||||
.userInfoHelper(new UserInfoHelper() {
|
||||
@Override
|
||||
@@ -1170,7 +1208,7 @@ public class MainActivity extends BaseActivity {
|
||||
String callName = ChatDataUtils.getCellBell(IMKitClient.getUserInfo());
|
||||
LogUtils.d("NotificationConfig callName==" + callName);
|
||||
int rawResource = getResources().getIdentifier(callName, "raw", getPackageName());
|
||||
Uri musicUri = Uri.parse("android.resource://com.dskj.rbchat/raw/" + callName);
|
||||
Uri musicUri = Uri.parse("android.resource://com.hbl.yuliao/raw/" + callName);
|
||||
return new CallKitNotificationConfig(R.mipmap.ic_logo, callName, getString(R.string.message_notifycontent_avchat), content, musicUri);
|
||||
}
|
||||
})
|
||||
@@ -1251,19 +1289,32 @@ public class MainActivity extends BaseActivity {
|
||||
AppSkinConfig.getInstance().getAppSkinStyle() == AppSkinConfig.AppSkin.commonSkin;
|
||||
ALog.d(Constant.PROJECT_TAG, "MainActivity:initView");
|
||||
loadConfig();
|
||||
|
||||
mCurrentTab = activityMainBinding.contactBtnGroup;
|
||||
resetTabSkin(isCommonSkin);
|
||||
checkZhiWen();
|
||||
shareDateUtils = new ShareDateUtils();
|
||||
shareDateUtils.getAllSessionList();
|
||||
shareDateUtils.getLocFriends();
|
||||
initFragment();
|
||||
}
|
||||
|
||||
private void initFragment() {
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
// index2Fragment = new HomeFragment();
|
||||
chatTabFragment = new ChatTabFragment();
|
||||
voomFragment = new ShopFragment();
|
||||
walletFragment = new MineFragment();
|
||||
// fragments.add(index2Fragment);
|
||||
fragments.add(chatTabFragment);
|
||||
// if(ApiService.AREA_CODE.equals("+86")) {
|
||||
fragments.add(voomFragment);
|
||||
// activityMainBinding.liveBtnGroup.setVisibility(View.VISIBLE);
|
||||
// }else{
|
||||
// activityMainBinding.liveBtnGroup.setVisibility(View.GONE);
|
||||
// }
|
||||
if (!TextUtils.isEmpty(DataUtils.get(MainActivity.this, "mall_address", ""))) {
|
||||
shopFragment = new ShopFragment();
|
||||
fragments.add(shopFragment);
|
||||
activityMainBinding.conversationBtnGroup.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
activityMainBinding.conversationBtnGroup.setVisibility(View.GONE);
|
||||
}
|
||||
voomFragment = new VoomFragment();
|
||||
fragments.add(voomFragment);
|
||||
|
||||
walletFragment = new MineFragment();
|
||||
fragments.add(walletFragment);
|
||||
|
||||
fragmentAdapter = new FragmentAdapter(this);
|
||||
@@ -1282,31 +1333,46 @@ public class MainActivity extends BaseActivity {
|
||||
public void onPageSelected(int position) {
|
||||
super.onPageSelected(position);
|
||||
resetTabStyle();
|
||||
if(position == 0){
|
||||
if (position == 0) {
|
||||
activityMainBinding.contact.setTextColor(
|
||||
getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.chat_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
}else if(position ==2){
|
||||
} else if(position==1){
|
||||
if (!TextUtils.isEmpty(DataUtils.get(MainActivity.this, "mall_address", ""))) {
|
||||
activityMainBinding.conversation.setTextColor(
|
||||
getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.conversation.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.index_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
}else{
|
||||
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
}
|
||||
}else if (position == 2) {
|
||||
if (!TextUtils.isEmpty(DataUtils.get(MainActivity.this, "mall_address", ""))) {
|
||||
activityMainBinding.live.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.live.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.voom_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
}else{
|
||||
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
}
|
||||
} else if(position==3){
|
||||
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
}else{
|
||||
activityMainBinding.live.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.live.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.voom_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
mCurrentTab = activityMainBinding.contactBtnGroup;
|
||||
resetTabSkin(isCommonSkin);
|
||||
checkZhiWen();
|
||||
shareDateUtils = new ShareDateUtils();
|
||||
shareDateUtils.getAllSessionList();
|
||||
shareDateUtils.getLocFriends();
|
||||
}
|
||||
|
||||
private void checkZhiWen() {
|
||||
@@ -1367,8 +1433,10 @@ public class MainActivity extends BaseActivity {
|
||||
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
||||
if (originalQrcodeStr != null) {
|
||||
try {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START_OLD,IMUIKitConfig.SHARE_INVCODE_START);
|
||||
|
||||
if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("userId")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String id = uri.getQueryParameter("userId"); //id 值 10943
|
||||
@@ -1380,7 +1448,7 @@ public class MainActivity extends BaseActivity {
|
||||
.navigate();
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START)
|
||||
&& originalQrcodeStr.contains("teamId")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
||||
@@ -1388,7 +1456,7 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START)
|
||||
&& originalQrcodeStr.contains("machineId") && originalQrcodeStr.contains("orderNo")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
||||
@@ -1397,7 +1465,7 @@ public class MainActivity extends BaseActivity {
|
||||
showGiftView(machineId, orderNo, money);
|
||||
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("silver_qr_code")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
||||
Intent intent2 = new Intent(MainActivity.this, JsBridgeActivity.class);
|
||||
@@ -1482,14 +1550,14 @@ public class MainActivity extends BaseActivity {
|
||||
break;
|
||||
default:
|
||||
if (scheme.startsWith("http")) {
|
||||
if (scheme.startsWith("http://admin.yuliao666.top/") && scheme.contains("deviceId")) {
|
||||
sendMachine(scheme);
|
||||
} else {
|
||||
// if (scheme.startsWith("http://admin.niuchat.xyz/") && scheme.contains("deviceId")) {
|
||||
// sendMachine(scheme);
|
||||
// } else {
|
||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||
intentweb.setData(Uri.parse(scheme));
|
||||
startActivity(intentweb);
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
}
|
||||
@@ -1497,14 +1565,14 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
} else {
|
||||
if (scheme.startsWith("http")) { //是http連接
|
||||
if (scheme.startsWith("https://admin.letschat2023.com/") && scheme.contains("deviceId")) {
|
||||
sendMachine(scheme);
|
||||
} else {
|
||||
// if (scheme.startsWith("https://admin.letschat2023.com/") && scheme.contains("deviceId")) {
|
||||
// sendMachine(scheme);
|
||||
// } else {
|
||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(scheme));
|
||||
startActivity(intent);
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
|
||||
@@ -1812,7 +1880,7 @@ public class MainActivity extends BaseActivity {
|
||||
groupNameTv = (TextView) bottomView.findViewById(R.id.group_name_tv);
|
||||
|
||||
if (team != null) {
|
||||
joinTitleTv1.setText("群成员 "+team.getMemberCount()+"人");
|
||||
joinTitleTv1.setText("群成员 " + team.getMemberCount() + "人");
|
||||
if (TextUtils.isEmpty(team.getIcon())) {
|
||||
groupHeadIv.setData(com.netease.yunxin.kit.contactkit.ui.R.mipmap.ic_group_defaulthead, "head");
|
||||
} else {
|
||||
@@ -1898,7 +1966,7 @@ public class MainActivity extends BaseActivity {
|
||||
joinTv.setOnClickListener(v -> NIMClient.getService(TeamService.class).applyJoinTeam(groupId, null).setCallback(new RequestCallback<Team>() {
|
||||
@Override
|
||||
public void onSuccess(Team team1) {
|
||||
joinTitleTv1.setText("群成员 "+team1.getMemberCount()+"人");
|
||||
joinTitleTv1.setText("群成员 " + team1.getMemberCount() + "人");
|
||||
|
||||
activityMainBinding.qrRy.removeAllViews();
|
||||
activityMainBinding.qrRy.setVisibility(View.GONE);
|
||||
@@ -2061,31 +2129,37 @@ public class MainActivity extends BaseActivity {
|
||||
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.chat_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
} else if (mCurrentTab == activityMainBinding.liveBtnGroup) {
|
||||
}else if (mCurrentTab == activityMainBinding.conversationBtnGroup) {
|
||||
activityMainBinding.viewPager.setCurrentItem(1, false);
|
||||
activityMainBinding.conversation.setTextColor(
|
||||
getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.conversation.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.voom_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
|
||||
} else if (mCurrentTab == activityMainBinding.liveBtnGroup) {
|
||||
if (!TextUtils.isEmpty(DataUtils.get(MainActivity.this, "mall_address", ""))) {
|
||||
activityMainBinding.viewPager.setCurrentItem(2, false);
|
||||
|
||||
}else{
|
||||
activityMainBinding.viewPager.setCurrentItem(1, false);
|
||||
}
|
||||
activityMainBinding.live.setTextColor(
|
||||
getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.live.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.voom_img_t), null, null);
|
||||
null, getResources().getDrawable(R.mipmap.index_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
} else if (mCurrentTab == activityMainBinding.myselfBtnGroup) {
|
||||
// if(ApiService.AREA_CODE.equals("+86")) {
|
||||
if (!TextUtils.isEmpty(DataUtils.get(MainActivity.this, "mall_address", ""))) {
|
||||
activityMainBinding.viewPager.setCurrentItem(3, false);
|
||||
}else{
|
||||
activityMainBinding.viewPager.setCurrentItem(2, false);
|
||||
// }else{
|
||||
// activityMainBinding.viewPager.setCurrentItem(1, false);
|
||||
// }
|
||||
}
|
||||
|
||||
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
} else if (mCurrentTab == activityMainBinding.conversationBtnGroup) {
|
||||
activityMainBinding.viewPager.setCurrentItem(0, false);
|
||||
activityMainBinding.conversation.setTextColor(
|
||||
getResources().getColor(R.color.color_2c2c2c));
|
||||
activityMainBinding.conversation.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.index_img_t), null, null);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
|
||||
}
|
||||
// if (mCurrentTab == activityMainBinding.contactBtnGroup) {
|
||||
// activityMainBinding.viewPager.setCurrentItem(1, false);
|
||||
@@ -2125,7 +2199,7 @@ public class MainActivity extends BaseActivity {
|
||||
activityMainBinding.conversation.setTextColor(
|
||||
getResources().getColor(R.color.color_babeca));
|
||||
activityMainBinding.conversation.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.index_img_f), null, null);
|
||||
null, getResources().getDrawable(R.mipmap.voom_img_f), null, null);
|
||||
|
||||
activityMainBinding.contact.setTextColor(getResources().getColor(R.color.color_babeca));
|
||||
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
||||
@@ -2133,7 +2207,7 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
activityMainBinding.live.setTextColor(getResources().getColor(R.color.color_babeca));
|
||||
activityMainBinding.live.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null, getResources().getDrawable(R.mipmap.voom_img_f), null, null);
|
||||
null, getResources().getDrawable(R.mipmap.index_img_f), null, null);
|
||||
|
||||
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_babeca));
|
||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||
@@ -2501,6 +2575,7 @@ public class MainActivity extends BaseActivity {
|
||||
* 赠送开关配置
|
||||
*/
|
||||
private void getConfig() {
|
||||
// DataUtils.set(MainActivity.this, "mall_address", "");
|
||||
Api.getInstance().getConfig()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -2514,15 +2589,13 @@ public class MainActivity extends BaseActivity {
|
||||
if (configBean.getId() == 1) {
|
||||
DataUtils.set(MainActivity.this, "transfer_cash", configBean.getVal().equals("1"));
|
||||
}
|
||||
// if (configBean.getId() == 2) {
|
||||
// DataUtils.set(MainActivity.this, "transfer_jifen", configBean.getVal().equals("1"));
|
||||
// }
|
||||
// if (configBean.getId() == 3) {
|
||||
// DataUtils.set(MainActivity.this, "transfer_score", configBean.getVal().equals("1"));
|
||||
// }
|
||||
if (configBean.getId() == 4) {
|
||||
DataUtils.set(MainActivity.this, "redpkg_score", configBean.getVal().equals("1"));
|
||||
}
|
||||
|
||||
if (configBean.getCode().equals("mall_address")) {
|
||||
DataUtils.set(MainActivity.this, "mall_address", configBean.getVal());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2532,7 +2605,6 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -97,19 +97,35 @@ public class ChatMain2Fragment extends BaseFragment {
|
||||
private final NetworkUtils.NetworkStateListener networkStateListener =
|
||||
new NetworkUtils.NetworkStateListener() {
|
||||
@Override
|
||||
public void onAvailable(NetworkInfo network) {
|
||||
public void onAvailable(NetworkInfo networkInfo) {
|
||||
if (viewBinding != null) {
|
||||
viewBinding.errorTv.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLost(NetworkInfo network) {
|
||||
public void onLost(NetworkInfo networkInfo) {
|
||||
if (viewBinding != null) {
|
||||
viewBinding.errorTv.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// @Override
|
||||
// public void onAvailable(NetworkInfo network) {
|
||||
// if (viewBinding != null) {
|
||||
// viewBinding.errorTv.setVisibility(View.GONE);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onLost(NetworkInfo network) {
|
||||
// if (viewBinding != null) {
|
||||
// viewBinding.errorTv.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
};
|
||||
|
||||
protected final EventNotify<ConversationEditEvent> editConversation =
|
||||
|
||||
@@ -111,19 +111,20 @@ public class ChatTabFragment extends BaseFragment {
|
||||
private final NetworkUtils.NetworkStateListener networkStateListener =
|
||||
new NetworkUtils.NetworkStateListener() {
|
||||
@Override
|
||||
public void onAvailable(NetworkInfo network) {
|
||||
public void onAvailable(NetworkInfo networkInfo) {
|
||||
if (viewBinding != null) {
|
||||
viewBinding.errorTv.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLost(NetworkInfo network) {
|
||||
public void onLost(NetworkInfo networkInfo) {
|
||||
if (viewBinding != null) {
|
||||
viewBinding.errorTv.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
protected final EventNotify<ConversationEditEvent> editConversation =
|
||||
|
||||
@@ -495,8 +495,10 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
||||
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
||||
if (originalQrcodeStr != null) {
|
||||
try {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START_OLD,IMUIKitConfig.SHARE_INVCODE_START);
|
||||
|
||||
if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("userId")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String id = uri.getQueryParameter("userId"); //id 值 10943
|
||||
@@ -507,14 +509,14 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
||||
.withParam("userId", id)
|
||||
.navigate();
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("teamId")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
||||
showQrcodeView(id);
|
||||
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("machineId") && originalQrcodeStr.contains("orderNo")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
||||
@@ -523,7 +525,7 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
||||
showGiftView(machineId, orderNo, money);
|
||||
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("silver_qr_code")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
||||
Intent intent2 = new Intent(AddFriendsActivity.this, JsBridgeActivity.class);
|
||||
@@ -612,16 +614,16 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
||||
|
||||
default:
|
||||
if (scheme.startsWith("http")) {
|
||||
if (scheme.startsWith("http://admin.yuliao666.top/") && scheme.contains("deviceId")) {
|
||||
sendMachine(scheme);
|
||||
} else {
|
||||
// if (scheme.startsWith("http://admin.niuchat.xyz/") && scheme.contains("deviceId")) {
|
||||
// sendMachine(scheme);
|
||||
// } else {
|
||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||
intentweb.setData(Uri.parse(scheme));
|
||||
startActivity(intentweb);
|
||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
//Context context, String content, String cancel, String sure,boolean showCancel
|
||||
@@ -631,15 +633,15 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
||||
}
|
||||
} else {
|
||||
if (scheme.startsWith("http")) {
|
||||
if (scheme.startsWith("http://admin.yuliao666.top/") && scheme.contains("deviceId")) {
|
||||
sendMachine(scheme);
|
||||
} else {
|
||||
// if (scheme.startsWith("http://admin.niuchat.xyz/") && scheme.contains("deviceId")) {
|
||||
// sendMachine(scheme);
|
||||
// } else {
|
||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||
intentweb.setData(Uri.parse(scheme));
|
||||
startActivity(intentweb);
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
@@ -1291,13 +1293,6 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
||||
|
||||
saveTv.setOnClickListener(v -> {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
// if (PermissionUtils.hasPermissions(
|
||||
// AddFriendsActivity.this, Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_VIDEO)) {
|
||||
// doSaveQrcode();
|
||||
// } else {
|
||||
// requestCameraPermission(
|
||||
// );
|
||||
// }
|
||||
doSaveQrcode();
|
||||
} else {
|
||||
if (PermissionUtils.hasPermissions(
|
||||
|
||||
@@ -270,6 +270,8 @@ public class AccoutListActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -332,6 +332,7 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -231,6 +231,8 @@ public class CloseAccountActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.content.Intent;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Parcelable;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
@@ -112,26 +113,31 @@ public class EditFriendUserInfoActivity extends BaseActivity {
|
||||
binding.tvDone.setOnClickListener(
|
||||
v -> {
|
||||
ContactRepo.updateAlias(friendInfo.getAccount(), binding.etNickname.getText().toString());
|
||||
Api.getInstance().addRemark(friendInfo.getAccount(), binding.etNickname.getText().toString())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
if (isFollowValue == 1) {
|
||||
RxBus.getInstance().post(IMUIKitConfig.CHANGE_FOLLOW_USER);
|
||||
}
|
||||
ToastX.showShortToast(getString(R.string.xiugaichenggong_txt));
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
// Api.getInstance().addRemark(friendInfo.getAccount(), binding.etNickname.getText().toString())
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result feedbackResp) {
|
||||
// if (isFollowValue == 1) {
|
||||
// RxBus.getInstance().post(IMUIKitConfig.CHANGE_FOLLOW_USER);
|
||||
// }
|
||||
// ToastX.showShortToast(getString(R.string.xiugaichenggong_txt));
|
||||
// setResult(RESULT_OK);
|
||||
// finish();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
// ToastX.showShortToast(msg);
|
||||
// }
|
||||
// });
|
||||
new Handler().postDelayed(() -> {
|
||||
ToastX.showShortToast(getString(R.string.xiugaichenggong_txt));
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
},1000);
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -401,7 +401,7 @@ public class MineFragment extends BaseFragment {
|
||||
|
||||
private void getVersion() {
|
||||
try {
|
||||
Api.getInstance().version(com.hbl.yuliao.network.ApiService.AREA_CODE.equals("+86") ? 7 : 0, DataUtils.getVersionCode(getActivity()), com.netease.yunxin.kit.chatkit.ui.network.ApiService.SUBSTATIONID1)
|
||||
Api.getInstance().version( 0, DataUtils.getVersionCode(getActivity()), com.netease.yunxin.kit.chatkit.ui.network.ApiService.SUBSTATIONID1)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
|
||||
@@ -230,6 +230,8 @@ public class UnBindPhoneActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -268,6 +268,8 @@ public class UserHeadEditActivity extends BaseActivity implements CommonCallback
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,14 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.sdk.android.oss.ClientException;
|
||||
import com.alibaba.sdk.android.oss.OSSClient;
|
||||
import com.alibaba.sdk.android.oss.ServiceException;
|
||||
import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.codersun.fingerprintcompat.AonFingerChangeCallback;
|
||||
import com.codersun.fingerprintcompat.FingerManager;
|
||||
@@ -60,11 +68,14 @@ import com.hbl.yuliao.dialog.PayCashFingerDialog;
|
||||
import com.hbl.yuliao.dialog.SelectHeadDialog;
|
||||
import com.hbl.yuliao.dialog.SelectSexDialog;
|
||||
import com.hbl.yuliao.game.JsBridgeActivity;
|
||||
import com.hbl.yuliao.login.RegisterActivity;
|
||||
import com.hbl.yuliao.main.MainActivity;
|
||||
import com.hbl.yuliao.main.authorize.AuthorizeActivity;
|
||||
import com.hbl.yuliao.main.index.add.AddFriendsActivity;
|
||||
import com.hbl.yuliao.model.AvaterBean;
|
||||
import com.hbl.yuliao.model.BindBean;
|
||||
import com.hbl.yuliao.model.LoginBean;
|
||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||
import com.hbl.yuliao.model.UserShareBean;
|
||||
import com.hbl.yuliao.model.UserUpdateEvent;
|
||||
import com.hbl.yuliao.model.WalletBean;
|
||||
@@ -82,6 +93,7 @@ import com.hbl.yuliao.utils.LogUtils;
|
||||
import com.hbl.yuliao.utils.QRCodeScheme;
|
||||
import com.hbl.yuliao.utils.ShareDateUtils;
|
||||
import com.hbl.yuliao.utils.ToolKits;
|
||||
import com.hbl.yuliao.utils.UpdateUtils;
|
||||
import com.hbl.yuliao.wallet.SetPayPasswordActivity;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.hbl.yuliao.widget.CircleImageView;
|
||||
@@ -155,6 +167,9 @@ import java.util.UUID;
|
||||
import cc.shinichi.library.ImagePreview;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class UserInfoActivity extends BaseActivity implements CommonCallback<File>{
|
||||
private ActivityLocUserInfoBinding binding;
|
||||
@@ -165,15 +180,29 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
if (Build.VERSION.SDK_INT < 30) {
|
||||
setTheme(R.style.AppThemeStart1);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
getWindow().setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
//SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
|
||||
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
// getWindow().setDecorFitsSystemWindows(false);
|
||||
// } else {
|
||||
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
// | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
//
|
||||
// }
|
||||
// getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR );
|
||||
//
|
||||
// //SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
// getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityLocUserInfoBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
@@ -331,8 +360,9 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
||||
if (originalQrcodeStr != null) {
|
||||
try {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START_OLD,IMUIKitConfig.SHARE_INVCODE_START);
|
||||
if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("userId")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String id = uri.getQueryParameter("userId"); //id 值 10943
|
||||
@@ -343,14 +373,14 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
.withParam("userId", id)
|
||||
.navigate();
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("teamId")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
||||
showQrcodeView(id);
|
||||
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("machineId") && originalQrcodeStr.contains("orderNo")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
||||
@@ -359,7 +389,7 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
showGiftView(machineId, orderNo, money);
|
||||
|
||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("silver_qr_code")) {
|
||||
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
// originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START, "https://www.baidu.com");
|
||||
Uri uri = Uri.parse(originalQrcodeStr);
|
||||
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
||||
Intent intent2 = new Intent(UserInfoActivity.this, JsBridgeActivity.class);
|
||||
@@ -455,15 +485,15 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
// break;
|
||||
default:
|
||||
if (scheme.startsWith("http")) {
|
||||
if (scheme.startsWith("http://admin.yuliao666.top/") && scheme.contains("deviceId")) {
|
||||
sendMachine(scheme);
|
||||
} else {
|
||||
// if (scheme.startsWith("http://admin.niuchat.xyz/") && scheme.contains("deviceId")) {
|
||||
// sendMachine(scheme);
|
||||
// } else {
|
||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||
intentweb.setData(Uri.parse(scheme));
|
||||
startActivity(intentweb);
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
//Context context, String content, String cancel, String sure,boolean showCancel
|
||||
@@ -473,13 +503,9 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
}
|
||||
} else {
|
||||
if (scheme.startsWith("http")) {
|
||||
if (scheme.startsWith("http://admin.yuliao666.top/") && scheme.contains("deviceId")) {
|
||||
sendMachine(scheme);
|
||||
} else {
|
||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
|
||||
}
|
||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||
intentweb.setData(Uri.parse(scheme));
|
||||
startActivity(intentweb);
|
||||
} else {
|
||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||
@@ -864,7 +890,10 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
}
|
||||
if (loginBean != null && loginBean.getUser() != null && !TextUtils.isEmpty(loginBean.getUser().getPostHomepageBackground())) {
|
||||
List<String> urls = new ArrayList<>();
|
||||
String url = IMUIKitConfig.OSS_URL + loginBean.getUser().getPostHomepageBackground();
|
||||
String url = loginBean.getUser().getPostHomepageBackground();
|
||||
if (!url.startsWith("http")) {
|
||||
url = IMUIKitConfig.OSS_URL + url;
|
||||
}
|
||||
urls.add(url);
|
||||
ImagePreview
|
||||
.getInstance()
|
||||
@@ -1060,12 +1089,18 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
}
|
||||
|
||||
String pram = loginBean.getUser().getPostHomepageBackground();
|
||||
String url = IMUIKitConfig.OSS_URL + pram;
|
||||
Glide.with(UserInfoActivity.this)
|
||||
.load(url)
|
||||
.placeholder(R.color.color_themepink)
|
||||
.error(R.color.color_themepink)
|
||||
.into(binding.forbgIv);
|
||||
String url = pram;
|
||||
if(!TextUtils.isEmpty(url)) {
|
||||
if (!url.startsWith("http")) {
|
||||
url = IMUIKitConfig.OSS_URL + pram;
|
||||
}
|
||||
LogUtils.i("地址是啥:" + url);
|
||||
Glide.with(UserInfoActivity.this)
|
||||
.load(url)
|
||||
.placeholder(R.color.color_themepink)
|
||||
.error(R.color.color_themepink)
|
||||
.into(binding.forbgIv);
|
||||
}
|
||||
}
|
||||
}
|
||||
loadData(IMKitClient.account());
|
||||
@@ -1091,14 +1126,17 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
changeIndex(feedbackResp.data);
|
||||
|
||||
DataUtils.set(UserInfoActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
||||
|
||||
String pram = locUser.getPostHomepageBackground();
|
||||
String url = IMUIKitConfig.OSS_URL + pram;
|
||||
Glide.with(UserInfoActivity.this)
|
||||
.load(url)
|
||||
.placeholder(R.color.color_themepink)
|
||||
.error(R.color.color_themepink)
|
||||
.into(binding.forbgIv);
|
||||
if(!TextUtils.isEmpty(pram)) {
|
||||
if (!pram.startsWith("http")) {
|
||||
pram = IMUIKitConfig.OSS_URL + pram;
|
||||
}
|
||||
Glide.with(UserInfoActivity.this)
|
||||
.load(pram)
|
||||
.placeholder(R.color.color_themepink)
|
||||
.error(R.color.color_themepink)
|
||||
.into(binding.forbgIv);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1266,6 +1304,7 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
binding.cavAvatar.setData(
|
||||
R.mipmap.default_head_img, "", 0);
|
||||
} else {
|
||||
LogUtils.i("地址是啥:"+userInfo.getAvatar());
|
||||
binding.cavAvatar.setData(
|
||||
userInfo.getAvatar(), "",
|
||||
AvatarColor.avatarColor(IMKitClient.account()));
|
||||
@@ -1290,7 +1329,9 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
binding.tvSexual.setText(sexualValue);
|
||||
binding.tvBirthday.setText(userInfo.getBirthday());
|
||||
shengri = userInfo.getBirthday();
|
||||
binding.tvPhone.setText(userInfo.getMobile().replace("-", ""));
|
||||
if(!TextUtils.isEmpty(userInfo.getMobile())) {
|
||||
binding.tvPhone.setText(userInfo.getMobile().replace("-", ""));
|
||||
}
|
||||
binding.tvEmail.setText(userInfo.getEmail());
|
||||
binding.tvSign.setText(userInfo.getSignature());
|
||||
}
|
||||
@@ -2079,34 +2120,184 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
|
||||
|
||||
|
||||
String stsCredentialsBean;
|
||||
|
||||
StsCredentialsBean stsCredentialsBean;
|
||||
String stsCredentialsBean1;
|
||||
UpdateUtils updateUtils;
|
||||
private void toShangchuanAli(File file, boolean isHead) {
|
||||
showLoadingDialog(isHead?"正在上传头像":"正在上传背景图");
|
||||
Api.getInstance().stsCredentials1()
|
||||
|
||||
// if(IMUIKitConfig.UPLOAD_TYPE == 0) {
|
||||
// updateImage(file, isHead);
|
||||
// }else if(IMUIKitConfig.UPLOAD_TYPE == 1){
|
||||
// Api.getInstance().stsCredentials()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
// stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// dimessLoadingDialog();
|
||||
// }
|
||||
// });
|
||||
// }else{
|
||||
// Api.getInstance().stsCredentials1()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<Result<String>>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<String> feedbackResp) {
|
||||
// stsCredentialsBean1 = feedbackResp.data;
|
||||
// toQIiNiuYunOss(file, isHead);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// dimessLoadingDialog();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
updateUtils = new UpdateUtils();
|
||||
updateUtils.toShangchuanAli(UserInfoActivity.this,file, isHead?"userAvatarFileName":"postHomepageBackground",new UpdateUtils.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbitSuccess(String path) {
|
||||
dimessLoadingDialog();
|
||||
toPush(path, isHead);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toSumbitFails(String message) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(message);
|
||||
}
|
||||
},handler);
|
||||
|
||||
|
||||
}
|
||||
|
||||
AvaterBean avaterBean = null;
|
||||
|
||||
private void updateImage(File file,boolean isHead) {
|
||||
RequestBody imageBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
MultipartBody.Part imageBodyPart = MultipartBody.Part.createFormData("file",fileName, imageBody);
|
||||
Api.getInstance().uploadUserAvatar(imageBodyPart)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toQIiNiuYunOss(file, isHead);
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<AvaterBean> feedbackResp) {
|
||||
avaterBean = feedbackResp.data;
|
||||
// if (isHead) {
|
||||
toPush(avaterBean.getAvatarFilename(), isHead);
|
||||
// } else {
|
||||
// toPush(response.getString("key"), isHead);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void toAliYunOss(File file, boolean isHead) {
|
||||
String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||
String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||
String securityToken = stsCredentialsBean.getSecurityToken();
|
||||
String bucketName = IMUIKitConfig.bucketName;
|
||||
|
||||
OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||
toUpdateOss(bucketName, 0, oss, file, isHead);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static Handler handler = new Handler();
|
||||
|
||||
//
|
||||
private void toUpdateOss(String bucketName, int i, OSSClient oss, File file, boolean isHead) {
|
||||
LogUtils.i("1111111111111111111");
|
||||
String updatePathPic = "postHomepageBackground";
|
||||
String updatePathPicHead = "userAvatarFileName";
|
||||
|
||||
LogUtils.i("22222222222222222");
|
||||
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
LogUtils.i("文件地址是啥:" + file.getAbsolutePath());
|
||||
LogUtils.i("文件地址是啥1:" + file.getPath());
|
||||
|
||||
PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPic + "/" + fileName, file.getAbsolutePath());
|
||||
if (isHead) {
|
||||
put = new PutObjectRequest(bucketName, "media/" + updatePathPicHead + "/" + fileName, file.getAbsolutePath());
|
||||
}
|
||||
put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
|
||||
});
|
||||
LogUtils.i("55555555555555");
|
||||
|
||||
oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
@Override
|
||||
public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
LogUtils.i("PutObject", "UploadSuccess");
|
||||
LogUtils.i("ETag", result.getETag());
|
||||
LogUtils.i("RequestId", result.getRequestId());
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
|
||||
handler.post(() -> {
|
||||
if (isHead) {
|
||||
toPush(IMUIKitConfig.OSS_URL + "media/" + updatePathPicHead + "/" + fileName, isHead);
|
||||
} else {
|
||||
LogUtils.i("地址是啥:"+IMUIKitConfig.OSS_URL+"media/" + updatePathPic + "/" + fileName);
|
||||
toPush("media/" + updatePathPic + "/" + fileName, isHead);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
dimessLoadingDialog();
|
||||
LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
|
||||
// 请求异常。
|
||||
if (clientExcepion != null) {
|
||||
// 本地异常,如网络异常等。
|
||||
clientExcepion.printStackTrace();
|
||||
}
|
||||
if (serviceException != null) {
|
||||
// 服务异常。
|
||||
LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
LogUtils.i("HostId", serviceException.getHostId());
|
||||
LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
public LoadingDialog loadingDialog;
|
||||
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
@@ -2124,8 +2315,8 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
private void toQIiNiuYunOss(File file, boolean isHead) {
|
||||
String updatePathPic = "postHomepageBackground";
|
||||
String updatePathPicHead = "userAvatarFileName";
|
||||
@@ -2145,7 +2336,7 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
||||
files = "media/" + updatePathPicHead + "/" + fileName;
|
||||
}
|
||||
|
||||
uploadManager.put(file, files, stsCredentialsBean, (key, info, response) -> {
|
||||
uploadManager.put(file, files, stsCredentialsBean1, (key, info, response) -> {
|
||||
dimessLoadingDialog();
|
||||
if (info != null && info.isOK()) {
|
||||
// 上传成功
|
||||
|
||||
@@ -38,6 +38,14 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
//import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.alibaba.sdk.android.oss.ClientException;
|
||||
import com.alibaba.sdk.android.oss.OSSClient;
|
||||
import com.alibaba.sdk.android.oss.ServiceException;
|
||||
import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.hbl.yuliao.IMUIKitConfig;
|
||||
import com.hbl.yuliao.R;
|
||||
@@ -52,6 +60,7 @@ import com.hbl.yuliao.dialog.SelectPhotosMoveDialog;
|
||||
import com.hbl.yuliao.event.UserAlbumsUpdateEvent;
|
||||
import com.hbl.yuliao.model.AlbumBean;
|
||||
import com.hbl.yuliao.model.AlbumItemBean;
|
||||
import com.hbl.yuliao.model.AvaterBean;
|
||||
import com.hbl.yuliao.model.HisChatShowBean;
|
||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||
import com.hbl.yuliao.model.UserAlbumBean;
|
||||
@@ -122,6 +131,9 @@ import java.util.UUID;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 用户相册详情
|
||||
@@ -784,40 +796,80 @@ public class UserPhotoDetailsActivity extends LllChatBaseActivity {
|
||||
|
||||
public void onSubmitPic() {
|
||||
showLoading();
|
||||
// Api.getInstance().stsCredentials()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
// stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// dismissLoading();
|
||||
// }
|
||||
// });
|
||||
Api.getInstance().stsCredentials1()
|
||||
|
||||
if(IMUIKitConfig.UPLOAD_TYPE == 0) {
|
||||
updateImage(0);
|
||||
}else if(IMUIKitConfig.UPLOAD_TYPE == 1){
|
||||
Api.getInstance().stsCredentials()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
toAliYunOss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dismissLoading();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
Api.getInstance().stsCredentials1()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean1 = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toUpdateOssNew(0);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dismissLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
AvaterBean avaterBean = null;
|
||||
|
||||
private void updateImage(int i) {
|
||||
RequestBody imageBody = RequestBody.create(MediaType.parse("multipart/form-data"), localMedias.get(i).getRealPath());
|
||||
String fileName = UUID.randomUUID().toString() + "_" + localMedias.get(i).getFileName();
|
||||
|
||||
MultipartBody.Part imageBodyPart = MultipartBody.Part.createFormData("file", fileName, imageBody);
|
||||
Api.getInstance().uploadUserAvatar(imageBodyPart)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean1 = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toUpdateOssNew(0);
|
||||
.subscribe(new BaseObserver<Result<AvaterBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<AvaterBean> feedbackResp) {
|
||||
avaterBean = feedbackResp.data;
|
||||
outputStrings.add(avaterBean.getAvatarFilename());
|
||||
if (i == uriStrings.size() - 1) {
|
||||
toAddPhotos();
|
||||
} else {
|
||||
updateImage( i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dismissLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void toUpdateOssNew( int i) {
|
||||
String updatePathPic = "user_album";
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
@@ -848,9 +900,6 @@ public class UserPhotoDetailsActivity extends LllChatBaseActivity {
|
||||
if (info != null && info.isOK()) {
|
||||
// 上传成功
|
||||
outputStrings.add(IMUIKitConfig.OSS_URL + files);
|
||||
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
// outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + picPath + "/" + data + "/" + fileName);
|
||||
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
if (i == uriStrings.size() - 1) {
|
||||
toAddPhotos();
|
||||
} else {
|
||||
@@ -884,76 +933,76 @@ public class UserPhotoDetailsActivity extends LllChatBaseActivity {
|
||||
|
||||
|
||||
}
|
||||
// private void toAliYunOss() {
|
||||
// String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
// String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||
// String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||
// String securityToken = stsCredentialsBean.getSecurityToken();
|
||||
// String bucketName = IMUIKitConfig.bucketName;
|
||||
// OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
// OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||
// toUpdateOss(bucketName, 0, oss);
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
||||
// String picPath = "user_album";
|
||||
// String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||
// if (i < uriStrings.size()) {
|
||||
//
|
||||
//// File file = new File(uriStrings.get(i));
|
||||
// String fileName = System.currentTimeMillis() + "_" + localMedias.get(i).getFileName();
|
||||
// LogUtils.i("上传文件是啥:" + GsonUtils.beanToJSONString(localMedias.get(i)));
|
||||
// LogUtils.i("上传文件是啥:" + fileName);
|
||||
//
|
||||
// // 构造上传请求。
|
||||
// PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + picPath + "/" + data + "/" + fileName, localMedias.get(i).getRealPath());
|
||||
// put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
// LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
//// if(isVideo){
|
||||
//// showLoadingDialog(("正在上传"+(currentSize*100)/totalSize)+"%");
|
||||
//// }
|
||||
// });
|
||||
//
|
||||
// //OSSAsyncTask task =
|
||||
// oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
// @Override
|
||||
// public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
// LogUtils.i("PutObject", "UploadSuccess");
|
||||
// LogUtils.i("ETag", result.getETag());
|
||||
// LogUtils.i("RequestId", result.getRequestId());
|
||||
// LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
// outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + picPath + "/" + data + "/" + fileName);
|
||||
// //https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
// if (i == uriStrings.size() - 1) {
|
||||
// toAddPhotos();
|
||||
// } else {
|
||||
// toUpdateOss(bucketName, i + 1, oss);
|
||||
// }
|
||||
private void toAliYunOss() {
|
||||
String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||
String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||
String securityToken = stsCredentialsBean.getSecurityToken();
|
||||
String bucketName = IMUIKitConfig.bucketName;
|
||||
OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||
toUpdateOss(bucketName, 0, oss);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
||||
String picPath = "user_album";
|
||||
String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||
if (i < uriStrings.size()) {
|
||||
|
||||
// File file = new File(uriStrings.get(i));
|
||||
String fileName = System.currentTimeMillis() + "_" + localMedias.get(i).getFileName();
|
||||
LogUtils.i("上传文件是啥:" + GsonUtils.beanToJSONString(localMedias.get(i)));
|
||||
LogUtils.i("上传文件是啥:" + fileName);
|
||||
|
||||
// 构造上传请求。
|
||||
PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + picPath + "/" + data + "/" + fileName, localMedias.get(i).getRealPath());
|
||||
put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
// if(isVideo){
|
||||
// showLoadingDialog(("正在上传"+(currentSize*100)/totalSize)+"%");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
// dismissLoading();
|
||||
// LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
//
|
||||
// // 请求异常。
|
||||
// if (clientExcepion != null) {
|
||||
// // 本地异常,如网络异常等。
|
||||
// clientExcepion.printStackTrace();
|
||||
// }
|
||||
// if (serviceException != null) {
|
||||
// // 服务异常。
|
||||
// LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
// LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
// LogUtils.i("HostId", serviceException.getHostId());
|
||||
// LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
});
|
||||
|
||||
//OSSAsyncTask task =
|
||||
oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
@Override
|
||||
public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
LogUtils.i("PutObject", "UploadSuccess");
|
||||
LogUtils.i("ETag", result.getETag());
|
||||
LogUtils.i("RequestId", result.getRequestId());
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + picPath + "/" + data + "/" + fileName);
|
||||
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
if (i == uriStrings.size() - 1) {
|
||||
toAddPhotos();
|
||||
} else {
|
||||
toUpdateOss(bucketName, i + 1, oss);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
dismissLoading();
|
||||
LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
|
||||
// 请求异常。
|
||||
if (clientExcepion != null) {
|
||||
// 本地异常,如网络异常等。
|
||||
clientExcepion.printStackTrace();
|
||||
}
|
||||
if (serviceException != null) {
|
||||
// 服务异常。
|
||||
LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
LogUtils.i("HostId", serviceException.getHostId());
|
||||
LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
public void toAddPhotos() {
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.hbl.yuliao.model;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/8/13 16:17
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class RechargeAccountBean {
|
||||
|
||||
private long id;
|
||||
private String usdtAddress;
|
||||
private String qrCodeUrl;
|
||||
private int sortOrder;
|
||||
private int status;
|
||||
private String createdAt;
|
||||
private String updatedAt;
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsdtAddress() {
|
||||
return usdtAddress;
|
||||
}
|
||||
|
||||
public void setUsdtAddress(String usdtAddress) {
|
||||
this.usdtAddress = usdtAddress;
|
||||
}
|
||||
|
||||
public String getQrCodeUrl() {
|
||||
return qrCodeUrl;
|
||||
}
|
||||
|
||||
public void setQrCodeUrl(String qrCodeUrl) {
|
||||
this.qrCodeUrl = qrCodeUrl;
|
||||
}
|
||||
|
||||
public int getSortOrder() {
|
||||
return sortOrder;
|
||||
}
|
||||
|
||||
public void setSortOrder(int sortOrder) {
|
||||
this.sortOrder = sortOrder;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt) {
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getUpdatedAt() {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(String updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ package com.hbl.yuliao.network;
|
||||
import com.hbl.yuliao.utils.LogUtils;
|
||||
|
||||
import java.net.Proxy;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
@@ -56,6 +58,14 @@ public class Api extends BaseApi {
|
||||
builder.writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS);
|
||||
//错误重连
|
||||
builder.retryOnConnectionFailure(true);
|
||||
try {
|
||||
builder.sslSocketFactory(OkHttpUtil.getIgnoreInitedSslContext().getSocketFactory(),OkHttpUtil.IGNORE_SSL_TRUST_MANAGER_X509)
|
||||
.hostnameVerifier(OkHttpUtil.getIgnoreSslHostnameVerifier());
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
// throw new RuntimeException(e);
|
||||
} catch (KeyManagementException e) {
|
||||
// throw new RuntimeException(e);
|
||||
}
|
||||
builder.addInterceptor(new HeaderInterceptor());
|
||||
|
||||
// if (Config.IS_DEBUG) {
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.hbl.yuliao.model.PayInfoBean;
|
||||
import com.hbl.yuliao.model.PayInfoWxBean;
|
||||
import com.hbl.yuliao.model.QuesListBean;
|
||||
import com.hbl.yuliao.model.ReadMessageBean;
|
||||
import com.hbl.yuliao.model.RechargeAccountBean;
|
||||
import com.hbl.yuliao.model.RedLogBean;
|
||||
import com.hbl.yuliao.model.RegisteredBean;
|
||||
import com.hbl.yuliao.model.RtcTokenBean;
|
||||
@@ -105,8 +106,8 @@ public interface ApiService {
|
||||
/***
|
||||
* 打包的国家编码
|
||||
*/
|
||||
// String AREA_CODE = "+886";
|
||||
String AREA_CODE = BuildConfig.AREA_CODE;
|
||||
String AREA_CODE = "+60";
|
||||
// String AREA_CODE = BuildConfig.AREA_CODE;
|
||||
|
||||
/**
|
||||
* 测试环境
|
||||
@@ -1230,6 +1231,21 @@ public interface ApiService {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 充值配置
|
||||
*/
|
||||
@GET("/recharge-order/recharge-account")
|
||||
Observable<Result<RechargeAccountBean>> rechargeAccount();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 充值配置
|
||||
*/
|
||||
@POST("/recharge-order")
|
||||
Observable<Result> rechargeOrder(@Body Map<String, Object> requestBody);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
68
app/src/main/java/com/hbl/yuliao/network/OkHttpUtil.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package com.hbl.yuliao.network;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/12/10 15:36
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
import javax.net.ssl.*;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jeter
|
||||
*
|
||||
*/
|
||||
public class OkHttpUtil {
|
||||
/**
|
||||
* X509TrustManager instance which ignored SSL certification
|
||||
*/
|
||||
public static final X509TrustManager IGNORE_SSL_TRUST_MANAGER_X509 = new X509TrustManager() {
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] chain, String authType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] chain, String authType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return new X509Certificate[] {};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get initialized SSLContext instance which ignored SSL certification
|
||||
*
|
||||
* @return
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws KeyManagementException
|
||||
*/
|
||||
public static SSLContext getIgnoreInitedSslContext() throws NoSuchAlgorithmException, KeyManagementException {
|
||||
var sslContext = SSLContext.getInstance("SSL");
|
||||
sslContext.init(null, new TrustManager[] { IGNORE_SSL_TRUST_MANAGER_X509 }, new SecureRandom());
|
||||
return sslContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get HostnameVerifier which ignored SSL certification
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static HostnameVerifier getIgnoreSslHostnameVerifier() {
|
||||
return new HostnameVerifier() {
|
||||
@Override
|
||||
public boolean verify(String arg0, SSLSession arg1) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,14 +399,14 @@ public class ReceiveRedPacketActivity extends BaseActivity implements View.OnCli
|
||||
viewBinding.numberTv1Ly.setVisibility(View.GONE);
|
||||
if (redpacketGroupBean.getType().equals("0")) {
|
||||
// binding.titleTipsTv.setText(bonusBean.getBonus().getNumber() + getString(R.string.red_envelopes_in_total) + String.format("%.2f", Integer.parseInt(bonusBean.getBonus().getMoney().trim()) / 100f) + getString(R.string.danwei_txt));
|
||||
viewBinding.titleTipsTv.setText(String.format(getString(R.string.red_envelopes_in_total), redpacketGroupBean.getCount() + "", AppUtils.getQian(redpacketGroupBean.getAmount())+"元"));
|
||||
viewBinding.titleTipsTv.setText(String.format(getString(R.string.red_envelopes_in_total), redpacketGroupBean.getCount() + "", AppUtils.getQian(redpacketGroupBean.getAmount())+""));
|
||||
|
||||
} else {
|
||||
if (redpacketGroupBean.getGrabbers() == null || redpacketGroupBean.getGrabbers().size() == 0) {
|
||||
if (redpacketGroupBean.getStatus() == 2) {
|
||||
viewBinding.titleTipsTv.setText(getString(R.string.hbxq_yiguoqi_txt) + getString(R.string.received_txt1) + "0/" + redpacketGroupBean.getCount() + getString(R.string.ge_gong_txt) + "0" + "/" + AppUtils.getQian(redpacketGroupBean.getAmount())+"元");
|
||||
viewBinding.titleTipsTv.setText(getString(R.string.hbxq_yiguoqi_txt) + getString(R.string.received_txt1) + "0/" + redpacketGroupBean.getCount() + getString(R.string.ge_gong_txt) + "0" + "/" + AppUtils.getQian(redpacketGroupBean.getAmount())+"");
|
||||
} else {
|
||||
viewBinding.titleTipsTv.setText(getString(R.string.received_txt1) + "0/" + redpacketGroupBean.getCount() + getString(R.string.ge_gong_txt) + "0" + "/" + AppUtils.getQian(redpacketGroupBean.getAmount())+"元");
|
||||
viewBinding.titleTipsTv.setText(getString(R.string.received_txt1) + "0/" + redpacketGroupBean.getCount() + getString(R.string.ge_gong_txt) + "0" + "/" + AppUtils.getQian(redpacketGroupBean.getAmount())+"");
|
||||
}
|
||||
} else {
|
||||
int size = 0;
|
||||
@@ -428,10 +428,10 @@ public class ReceiveRedPacketActivity extends BaseActivity implements View.OnCli
|
||||
}
|
||||
if (redpacketGroupBean.getStatus() == 2) {
|
||||
viewBinding.titleTipsTv.setText(getString(R.string.hbxq_yiguoqi_txt) + getString(R.string.received_txt1) + redpacketGroupBean.getGrabbers().size() + "/" + redpacketGroupBean.getCount() + getString(R.string.ge_gong_txt)
|
||||
+ AppUtils.getQian(size) + "/" +AppUtils.getQian(redpacketGroupBean.getAmount())+"元");
|
||||
+ AppUtils.getQian(size) + "/" +AppUtils.getQian(redpacketGroupBean.getAmount())+"");
|
||||
} else {
|
||||
viewBinding.titleTipsTv.setText(getString(R.string.received_txt1) + redpacketGroupBean.getGrabbers().size() + "/" + redpacketGroupBean.getCount() + getString(R.string.ge_gong_txt)
|
||||
+ AppUtils.getQian(size) + "/" +AppUtils.getQian(redpacketGroupBean.getAmount())+"元");
|
||||
+ AppUtils.getQian(size) + "/" +AppUtils.getQian(redpacketGroupBean.getAmount())+"");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -163,11 +163,13 @@ public class DataUtils {
|
||||
// return country;
|
||||
// }
|
||||
// }
|
||||
if(ApiService.AREA_CODE.equals("+86")){
|
||||
return new CountryBean("+86", context.getString(R.string.zhongguo_txt));
|
||||
}else{
|
||||
return new CountryBean("+886",context.getString(R.string.taiwan_txt));
|
||||
}
|
||||
// if(ApiService.AREA_CODE.equals("+86")){
|
||||
// return new CountryBean("+86", context.getString(R.string.zhongguo_txt));
|
||||
// }else{
|
||||
// return new CountryBean("+886",context.getString(R.string.taiwan_txt));
|
||||
// }
|
||||
return new CountryBean("+60", context.getString(R.string.mlxy_txt));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
285
app/src/main/java/com/hbl/yuliao/utils/UpdateUtils.java
Normal file
@@ -0,0 +1,285 @@
|
||||
package com.hbl.yuliao.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.alibaba.sdk.android.oss.ClientException;
|
||||
import com.alibaba.sdk.android.oss.OSSClient;
|
||||
import com.alibaba.sdk.android.oss.ServiceException;
|
||||
import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.hbl.yuliao.IMUIKitConfig;
|
||||
import com.hbl.yuliao.model.AvaterBean;
|
||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||
import com.hbl.yuliao.network.Api;
|
||||
import com.hbl.yuliao.network.BaseObserver;
|
||||
import com.hbl.yuliao.network.Result;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.qiniu.android.storage.Configuration;
|
||||
import com.qiniu.android.storage.UploadManager;
|
||||
import com.qiniu.android.storage.UploadOptions;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/9/22 13:48
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class UpdateUtils {
|
||||
public UpdateUtils() {
|
||||
}
|
||||
|
||||
public StsCredentialsBean stsCredentialsBean;
|
||||
public String stsCredentialsBean1;
|
||||
|
||||
|
||||
|
||||
public interface OnToActionListener {
|
||||
void toSumbitSuccess(String path);
|
||||
|
||||
void toSumbitFails(String message);
|
||||
|
||||
}
|
||||
OnToActionListener onToActionListener;
|
||||
/**
|
||||
* 上传工具类
|
||||
* @param context
|
||||
* @param file 文件
|
||||
* @param pathName 路径目录
|
||||
* @param onToActionListener 回调
|
||||
* @param handler 切换线程 目前只有 Direction.TYPE_ALIOSS 上传需要
|
||||
*/
|
||||
public void toShangchuanAli(Context context, File file, String pathName, OnToActionListener onToActionListener, Handler... handler) {
|
||||
this.onToActionListener = onToActionListener;
|
||||
if(IMUIKitConfig.UPLOAD_TYPE == 0){
|
||||
updateImage(file,onToActionListener);
|
||||
}else if(IMUIKitConfig.UPLOAD_TYPE == 1){
|
||||
getStsCredentialsByAli(context,file,pathName, onToActionListener,handler[0]);
|
||||
}else{
|
||||
getStsCredentialsByQiNiu(file,pathName, onToActionListener);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片多张后续
|
||||
* @param context
|
||||
* @param file
|
||||
* @param pathName
|
||||
* @param handler
|
||||
*/
|
||||
public void toShangchuanAliMore(Context context, File file, String pathName, Handler... handler) {
|
||||
|
||||
if(IMUIKitConfig.UPLOAD_TYPE == 0){
|
||||
updateImage(file,onToActionListener);
|
||||
}else if(IMUIKitConfig.UPLOAD_TYPE == 1){
|
||||
toAliYunOss(context,file,pathName,onToActionListener,handler[0]);
|
||||
}else{
|
||||
toQIiNiuYunOss(file,pathName,onToActionListener);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 获取七牛云的 授权上传鉴权
|
||||
* @param file
|
||||
* @param pathName
|
||||
* @param onToActionListener
|
||||
*/
|
||||
private void getStsCredentialsByQiNiu( File file, String pathName, OnToActionListener onToActionListener) {
|
||||
Api.getInstance().stsCredentials1()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean1 = feedbackResp.data;
|
||||
toQIiNiuYunOss(file,pathName,onToActionListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
onToActionListener.toSumbitFails(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取alioss的上传授权
|
||||
* @param context
|
||||
* @param file
|
||||
* @param pathName
|
||||
* @param onToActionListener
|
||||
* @param handler
|
||||
*/
|
||||
private void getStsCredentialsByAli(Context context,File file,String pathName, OnToActionListener onToActionListener, Handler handler) {
|
||||
Api.getInstance().stsCredentials()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
toAliYunOss(context,file,pathName,onToActionListener,handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
onToActionListener.toSumbitFails(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 去上传多文件
|
||||
* @param file
|
||||
* @param pathName
|
||||
* @param onToActionListener
|
||||
*/
|
||||
public void toQIiNiuYunOss(File file,String pathName, OnToActionListener onToActionListener) {
|
||||
String updatePathPicHead = pathName;
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
(key, percent) -> {
|
||||
}, () -> {
|
||||
return false;
|
||||
});
|
||||
Configuration configuration = new Configuration.Builder()
|
||||
.build();
|
||||
UploadManager uploadManager = new UploadManager(configuration);
|
||||
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
// LogUtils.i("结果是啥开始:" + stsCredentialsBean + ";;" + file.getAbsolutePath());
|
||||
String files = "media/" + updatePathPicHead + "/" + fileName;
|
||||
uploadManager.put(file, files, stsCredentialsBean1, (key, info, response) -> {
|
||||
if (info != null && info.isOK()) {
|
||||
onToActionListener.toSumbitSuccess(IMUIKitConfig.OSS_URL+files);
|
||||
} else {
|
||||
LogUtils.i("结果是啥失败:" + GsonUtils.beanToJSONString(info));
|
||||
onToActionListener.toSumbitFails(GsonUtils.beanToJSONString(info));
|
||||
}
|
||||
}, options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void toAliYunOss(Context context,File file,String pathName,OnToActionListener onToActionListener,Handler handler) {
|
||||
String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||
String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||
String securityToken = stsCredentialsBean.getSecurityToken();
|
||||
String bucketName = IMUIKitConfig.bucketName;
|
||||
|
||||
OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
OSSClient oss = new OSSClient(context.getApplicationContext(), endpoint, credentialProvider);
|
||||
toUpdateOss(bucketName, oss, file,pathName,onToActionListener,handler);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
private void toUpdateOss(String bucketName, OSSClient oss, File file ,String pathName,OnToActionListener onToActionListener,Handler handler) {
|
||||
LogUtils.i("1111111111111111111");
|
||||
String updatePathPicHead = pathName;
|
||||
|
||||
LogUtils.i("22222222222222222");
|
||||
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
LogUtils.i("文件地址是啥:" + file.getAbsolutePath());
|
||||
LogUtils.i("文件地址是啥1:" + file.getPath());
|
||||
|
||||
PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPicHead + "/" + fileName, file.getAbsolutePath());
|
||||
|
||||
put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
|
||||
});
|
||||
LogUtils.i("55555555555555");
|
||||
|
||||
oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
@Override
|
||||
public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
LogUtils.i("PutObject", "UploadSuccess");
|
||||
LogUtils.i("ETag", result.getETag());
|
||||
LogUtils.i("RequestId", result.getRequestId());
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
// onToActionListener.toSumbitSuccess(avaterBean.getAvatarFilename());
|
||||
// onToActionListener.toSumbitSuccess( IMUIKitConfig.OSS_URL+"media/" + updatePathPicHead + "/" + fileName);
|
||||
if(handler!=null) {
|
||||
handler.post(() -> {
|
||||
onToActionListener.toSumbitSuccess(IMUIKitConfig.OSS_URL + "media/" + updatePathPicHead + "/" + fileName);
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
// dimessLoadingDialog();
|
||||
LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
if(handler!=null) {
|
||||
handler.post(() -> {
|
||||
onToActionListener.toSumbitFails(clientExcepion.getMessage());
|
||||
});
|
||||
}
|
||||
// 请求异常。
|
||||
if (clientExcepion != null) {
|
||||
// 本地异常,如网络异常等。
|
||||
clientExcepion.printStackTrace();
|
||||
}
|
||||
if (serviceException != null) {
|
||||
// 服务异常。
|
||||
LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
LogUtils.i("HostId", serviceException.getHostId());
|
||||
LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
AvaterBean avaterBean = null;
|
||||
|
||||
private void updateImage(File file,OnToActionListener onToActionListener) {
|
||||
RequestBody imageBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
|
||||
MultipartBody.Part imageBodyPart = MultipartBody.Part.createFormData("file",fileName, imageBody);
|
||||
Api.getInstance().uploadUserAvatar(imageBodyPart)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<AvaterBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<AvaterBean> feedbackResp) {
|
||||
avaterBean = feedbackResp.data;
|
||||
onToActionListener.toSumbitSuccess(avaterBean.getAvatarFilename());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
onToActionListener.toSumbitFails(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -57,7 +57,6 @@ import com.hbl.yuliao.utils.Constant;
|
||||
import com.hbl.yuliao.utils.DataUtils;
|
||||
import com.hbl.yuliao.utils.GsonUtils;
|
||||
import com.hbl.yuliao.utils.LogUtils;
|
||||
import com.hbl.yuliao.utils.ScreenUtils;
|
||||
import com.hbl.yuliao.widget.CircleImageView;
|
||||
//import com.ethanhua.skeleton.Skeleton;
|
||||
//import com.ethanhua.skeleton.SkeletonScreen;
|
||||
@@ -65,6 +64,7 @@ import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.chatkit.repo.ContactRepo;
|
||||
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
||||
import com.netease.yunxin.kit.common.ui.fragments.BaseFragment;
|
||||
import com.netease.yunxin.kit.common.utils.ScreenUtils;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
||||
|
||||
@@ -240,6 +240,9 @@ public class CircleFragment extends BaseFragment {
|
||||
.skipMemoryCache(false)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
||||
linearLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
|
||||
if(ScreenUtils.getDisplayWidth()>1800){
|
||||
linearLayoutManager = new StaggeredGridLayoutManager(4, StaggeredGridLayoutManager.VERTICAL);
|
||||
}
|
||||
linearLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_NONE);
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
@@ -28,14 +29,6 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
|
||||
//import com.alibaba.sdk.android.oss.ClientException;
|
||||
//import com.alibaba.sdk.android.oss.OSSClient;
|
||||
//import com.alibaba.sdk.android.oss.ServiceException;
|
||||
//import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
//import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
//import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
//import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.hbl.yuliao.IMApplication;
|
||||
import com.hbl.yuliao.IMUIKitConfig;
|
||||
@@ -44,15 +37,14 @@ import com.hbl.yuliao.adapter.CommonAdapter;
|
||||
import com.hbl.yuliao.adapter.ViewHolder;
|
||||
import com.hbl.yuliao.databinding.ActivityPushBinding;
|
||||
import com.hbl.yuliao.dialog.SelectPushTypeDialog;
|
||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||
import com.hbl.yuliao.network.Api;
|
||||
import com.hbl.yuliao.network.BaseObserver;
|
||||
import com.hbl.yuliao.network.Result;
|
||||
import com.hbl.yuliao.utils.Constant;
|
||||
import com.hbl.yuliao.utils.DataUtils;
|
||||
import com.hbl.yuliao.utils.GsonUtils;
|
||||
import com.hbl.yuliao.utils.ItemDragTouchHelperCallback;
|
||||
import com.hbl.yuliao.utils.LogUtils;
|
||||
import com.hbl.yuliao.utils.UpdateUtils;
|
||||
import com.hbl.yuliao.widget.CircleImageView;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.SelectMimeType;
|
||||
@@ -78,20 +70,11 @@ import com.netease.yunxin.kit.common.utils.PermissionUtils;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||
import com.qiniu.android.storage.Configuration;
|
||||
import com.qiniu.android.storage.UploadManager;
|
||||
import com.qiniu.android.storage.UploadOptions;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
@@ -120,7 +103,7 @@ public class PushActivity extends BaseActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().setStatusBarColor(getResources().getColor(R.color.color_white));
|
||||
getWindow().setNavigationBarColor(getResources().getColor(R.color.color_white));
|
||||
getWindow().setNavigationBarColor(getResources().getColor(R.color.color_eefof7));
|
||||
|
||||
ALog.d(Constant.PROJECT_TAG, TAG, "onCreateView");
|
||||
IMApplication.setColdStart(true);
|
||||
@@ -236,18 +219,10 @@ public class PushActivity extends BaseActivity {
|
||||
});
|
||||
|
||||
activityWelcomeBinding.backIv.setOnClickListener(v -> onBackPressed());
|
||||
activityWelcomeBinding.userTypeTv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SelectPushTypeDialog selectPushTypeDialog = new SelectPushTypeDialog(PushActivity.this, pushType);
|
||||
selectPushTypeDialog.setOnToVipListener(new SelectPushTypeDialog.OnToTypeListener() {
|
||||
@Override
|
||||
public void toType(int type) {
|
||||
changTopType(type);
|
||||
}
|
||||
});
|
||||
selectPushTypeDialog.show();
|
||||
}
|
||||
activityWelcomeBinding.userTypeLy.setOnClickListener(v -> {
|
||||
SelectPushTypeDialog selectPushTypeDialog = new SelectPushTypeDialog(PushActivity.this, pushType);
|
||||
selectPushTypeDialog.setOnToVipListener(type -> changTopType(type));
|
||||
selectPushTypeDialog.show();
|
||||
});
|
||||
activityWelcomeBinding.pushBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -275,231 +250,66 @@ public class PushActivity extends BaseActivity {
|
||||
if (isPush) {
|
||||
return;
|
||||
}
|
||||
|
||||
hideSoftInput(PushActivity.this);
|
||||
isPush = true;
|
||||
toShangchuanAli();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏软键盘
|
||||
*/
|
||||
public void hideSoftInput(Activity activity) {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (getCurrentFocus() != null && null != imm) {
|
||||
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
|
||||
StsCredentialsBean stsCredentialsBean;
|
||||
String stsCredentialsBean1;
|
||||
|
||||
private void toShangchuanAli() {
|
||||
showLoadingDialog();
|
||||
// Api.getInstance().stsCredentials()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||
// stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// dimessLoadingDialog();
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
Api.getInstance().stsCredentials1()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean1 = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toUpdateOssNew(0);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dismissLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// private void toAliYunOss() {
|
||||
// String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||
// String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||
// String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||
// String securityToken = stsCredentialsBean.getSecurityToken();
|
||||
// String bucketName = IMUIKitConfig.bucketName;
|
||||
//
|
||||
// OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||
// OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||
// toUpdateOss(bucketName, 0, oss);
|
||||
//
|
||||
// }
|
||||
private void toUpdateOssNew( int i) {
|
||||
|
||||
String updatePathPic = "pic_input";
|
||||
String updatePathVideo = "video_input";
|
||||
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
(key, percent) -> {
|
||||
LogUtils.i("结果是啥进度:" + percent);
|
||||
}, () -> {
|
||||
LogUtils.i("结果是啥进度112222222111:");
|
||||
return false;
|
||||
});
|
||||
Configuration configuration = new Configuration.Builder()
|
||||
.build();
|
||||
UploadManager uploadManager = new UploadManager(configuration);
|
||||
|
||||
String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||
|
||||
if (i < uris.size()) {
|
||||
File file = new File(localMedias.get(i).getRealPath());
|
||||
String fileName = UUID.randomUUID().toString() + "_" + localMedias.get(i).getFileName();
|
||||
LogUtils.i("结果是啥开始:" + stsCredentialsBean1 + ";;" + file.getAbsolutePath());
|
||||
String files = "media/" + updatePathPic + "/" + data + "/" + fileName;
|
||||
if (localMedias.get(0).getMimeType().contains("video")) {
|
||||
files = "media/" + updatePathVideo + "/" + data + "/" + fileName;
|
||||
}
|
||||
byte[] sss = convertFileToBytes(file);
|
||||
LogUtils.i("结果是啥开始:" + sss);
|
||||
|
||||
String finalFiles = files;
|
||||
uploadManager.put(sss, files, stsCredentialsBean1, (key, info, response) -> {
|
||||
// LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(info));
|
||||
LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(response));
|
||||
dismissLoading();
|
||||
if (info != null && info.isOK()) {
|
||||
// 上传成功
|
||||
// outputStrings.add(IMUIKitConfig.OSS_URL + files);
|
||||
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
|
||||
if (localMedias.get(0).getMimeType().contains("video")) {
|
||||
outputStrings.add(IMUIKitConfig.OSS_URL + finalFiles);
|
||||
} else {
|
||||
outputStrings.add(IMUIKitConfig.OSS_URL + finalFiles);
|
||||
}
|
||||
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
if (i == uris.size() - 1) {
|
||||
UpdateUtils updateUtils;
|
||||
int updateIndex = 0;
|
||||
String pathName = "pic_input";
|
||||
private void toShangchuanAli() {
|
||||
showLoadingDialog("正在发布动态…");
|
||||
updateUtils = new UpdateUtils();
|
||||
if (localMedias.get(0).getMimeType().contains("video")) {
|
||||
pathName = "video_input";
|
||||
}
|
||||
updateUtils.toShangchuanAli(PushActivity.this,new File(localMedias.get(updateIndex).getRealPath()), pathName,new UpdateUtils.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbitSuccess(String path) {
|
||||
if (localMedias.get(0).getMimeType().contains("video")) {
|
||||
outputStrings.add(path);
|
||||
toPush();
|
||||
} else {
|
||||
outputStrings.add(path);
|
||||
if (updateIndex == uris.size() - 1) {
|
||||
toPush();
|
||||
} else {
|
||||
toUpdateOssNew( i + 1);
|
||||
updateIndex+=1;
|
||||
updateUtils.toShangchuanAliMore(PushActivity.this,new File(localMedias.get(updateIndex).getRealPath()), pathName,handler);
|
||||
}
|
||||
|
||||
} else {
|
||||
// 上传失败
|
||||
LogUtils.i("结果是啥失败:" + GsonUtils.beanToJSONString(info));
|
||||
}
|
||||
}, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] convertFileToBytes(File file) {
|
||||
// 使用ByteArrayOutputStream来收集字节数据
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
fis = new FileInputStream(file);
|
||||
byte[] bytesArray = new byte[(int) file.length()];
|
||||
fis.read(bytesArray);
|
||||
fis.close();
|
||||
return bytesArray;
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
// throw new RuntimeException(e);
|
||||
return null;
|
||||
} catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
return null;
|
||||
|
||||
}
|
||||
@Override
|
||||
public void toSumbitFails(String message) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(message);
|
||||
}
|
||||
},handler);
|
||||
|
||||
|
||||
}
|
||||
//
|
||||
//
|
||||
// //
|
||||
// private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
||||
// String updatePathPic = "pic_input";
|
||||
// String updatePathVideo = "video_input";
|
||||
//// String outputPathPic = "pic_output";
|
||||
//// String outputPathVideo = "video_output";
|
||||
// String outputPathPic = "pic_input";
|
||||
// String outputPathVideo = "video_input";
|
||||
//// Calendar calendar= Calendar.getInstance();
|
||||
//// String year = calendar.get(Calendar.YEAR)+"";
|
||||
//// String month = (calendar.get(Calendar.MONTH)+1)<10?"0"+(calendar.get(Calendar.MONTH)+1):(calendar.get(Calendar.MONTH)+1)+"";
|
||||
//// String d = calendar.get(Calendar.DATE)<10?"0"+calendar.get(Calendar.DAY_OF_MONTH):calendar.get(Calendar.DAY_OF_MONTH)+"";
|
||||
//
|
||||
// String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||
// if (i < uris.size()) {
|
||||
//
|
||||
//// File file = new File(uriStrings.get(i));
|
||||
// String fileName = System.currentTimeMillis() + "_" + localMedias.get(i).getFileName();
|
||||
// LogUtils.i("上传文件是啥:" + GsonUtils.beanToJSONString(localMedias.get(i)));
|
||||
// LogUtils.i("上传文件是啥:" + fileName);
|
||||
//
|
||||
// // 构造上传请求。
|
||||
// PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPic + "/" + data + "/" + fileName, localMedias.get(i).getRealPath());
|
||||
//
|
||||
// if (localMedias.get(0).getMimeType().contains("video")) {
|
||||
// put = new PutObjectRequest(bucketName, "media/" + updatePathVideo + "/" + data + "/" + fileName, localMedias.get(i).getRealPath());
|
||||
// }
|
||||
//
|
||||
// put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||
// LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||
//// if(isVideo){
|
||||
//// showLoadingDialog(("正在上传"+(currentSize*100)/totalSize)+"%");
|
||||
//// }
|
||||
// });
|
||||
//
|
||||
// //OSSAsyncTask task =
|
||||
// oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||
// @Override
|
||||
// public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||
// LogUtils.i("PutObject", "UploadSuccess");
|
||||
// LogUtils.i("ETag", result.getETag());
|
||||
// LogUtils.i("RequestId", result.getRequestId());
|
||||
// LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||
// if (localMedias.get(0).getMimeType().contains("video")) {
|
||||
// outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + outputPathVideo + "/" + data + "/" + fileName);
|
||||
// } else {
|
||||
// outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + outputPathPic + "/" + data + "/" + fileName);
|
||||
// }
|
||||
// //https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||
// if (i == uris.size() - 1) {
|
||||
// toPush();
|
||||
// } else {
|
||||
// toUpdateOss(bucketName, i + 1, oss);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
||||
// dimessLoadingDialog();
|
||||
// LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
||||
//
|
||||
// // 请求异常。
|
||||
// if (clientExcepion != null) {
|
||||
// // 本地异常,如网络异常等。
|
||||
// clientExcepion.printStackTrace();
|
||||
// }
|
||||
// if (serviceException != null) {
|
||||
// // 服务异常。
|
||||
// LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
||||
// LogUtils.i("RequestId", serviceException.getRequestId());
|
||||
// LogUtils.i("HostId", serviceException.getHostId());
|
||||
// LogUtils.i("RawMessage", serviceException.getRawMessage());
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
public Handler handler = new Handler();
|
||||
|
||||
|
||||
private void toPush() {
|
||||
LogUtils.i("上传的数据:" + GsonUtils.beanToJSONString(outputStrings));
|
||||
// for (int i = 0;i< outputStrings.size();i++) {
|
||||
// LogUtils.i("上传的数据:" + "https://shenqi777.oss-cn-hongkong.aliyuncs.com/" + outputStrings.get(i));
|
||||
// }
|
||||
|
||||
List<MultipartBody.Part> map = new ArrayList<>();
|
||||
|
||||
@@ -804,15 +614,15 @@ public class PushActivity extends BaseActivity {
|
||||
|
||||
private void changeRight(boolean b) {
|
||||
if (b) {
|
||||
activityWelcomeBinding.pushBt.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); // 12sp
|
||||
activityWelcomeBinding.pushBt.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); // 12sp
|
||||
activityWelcomeBinding.pushBt.setTextColor(getResources().getColor(R.color.color_white));
|
||||
activityWelcomeBinding.pushBt.setVisibility(View.VISIBLE);
|
||||
activityWelcomeBinding.pushBt.setBackgroundResource(R.drawable.button_true_bg);
|
||||
activityWelcomeBinding.pushBt.setBackgroundResource(R.drawable.button_true_bg_yl);
|
||||
} else {
|
||||
activityWelcomeBinding.pushBt.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12); // 12sp
|
||||
activityWelcomeBinding.pushBt.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); // 12sp
|
||||
activityWelcomeBinding.pushBt.setTextColor(getResources().getColor(R.color.color_999999));
|
||||
activityWelcomeBinding.pushBt.setVisibility(View.VISIBLE);
|
||||
activityWelcomeBinding.pushBt.setBackgroundResource(R.drawable.button_false_bg);
|
||||
activityWelcomeBinding.pushBt.setBackgroundResource(R.drawable.button_false_bg_yl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -825,6 +635,7 @@ public class PushActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,10 +66,10 @@ public class VoomFragment extends BaseFragment {
|
||||
|
||||
private void initShow() {
|
||||
|
||||
titles = new ArrayList<>(3);
|
||||
titles = new ArrayList<>(2);
|
||||
titles.add(getString(R.string.tuijian_txt));
|
||||
titles.add(getString(R.string.haoyou_txt));
|
||||
titles.add(getString(R.string.fujin_txt));
|
||||
// titles.add(getString(R.string.fujin_txt));
|
||||
|
||||
listFragment = new ArrayList<>();
|
||||
listFragment.add(discoverFragment=CircleFragment.newInstance(0));
|
||||
|
||||
@@ -55,7 +55,6 @@ import com.hbl.yuliao.utils.Constant;
|
||||
import com.hbl.yuliao.utils.DataUtils;
|
||||
import com.hbl.yuliao.utils.GsonUtils;
|
||||
import com.hbl.yuliao.utils.LogUtils;
|
||||
import com.hbl.yuliao.utils.ScreenUtils;
|
||||
import com.hbl.yuliao.voom.TiktokActivity;
|
||||
import com.hbl.yuliao.widget.CircleImageView;
|
||||
//import com.ethanhua.skeleton.Skeleton;
|
||||
@@ -64,6 +63,7 @@ import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.chatkit.repo.ContactRepo;
|
||||
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
||||
import com.netease.yunxin.kit.common.ui.fragments.BaseFragment;
|
||||
import com.netease.yunxin.kit.common.utils.ScreenUtils;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
||||
|
||||
@@ -255,6 +255,9 @@ public class CircleFragment1 extends BaseFragment {
|
||||
.skipMemoryCache(false)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
||||
linearLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
|
||||
if(ScreenUtils.getDisplayWidth()>1800){
|
||||
linearLayoutManager = new StaggeredGridLayoutManager(4, StaggeredGridLayoutManager.VERTICAL);
|
||||
}
|
||||
linearLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_NONE);
|
||||
// linearLayoutManager.setReverseLayout(true);
|
||||
//防止item 交换位置
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
@@ -13,6 +14,14 @@ import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.alibaba.sdk.android.oss.ClientException;
|
||||
import com.alibaba.sdk.android.oss.OSSClient;
|
||||
import com.alibaba.sdk.android.oss.ServiceException;
|
||||
import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.hbl.yuliao.IMUIKitConfig;
|
||||
import com.hbl.yuliao.R;
|
||||
@@ -20,14 +29,18 @@ import com.hbl.yuliao.databinding.ActivityBindUsdtBinding;
|
||||
import com.hbl.yuliao.databinding.ActivityBindWechatAlipayBinding;
|
||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||
import com.hbl.yuliao.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.yuliao.main.mine.UserInfoActivity;
|
||||
import com.hbl.yuliao.model.AvaterBean;
|
||||
import com.hbl.yuliao.model.BindBean;
|
||||
import com.hbl.yuliao.model.PayInfoWxBean;
|
||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||
import com.hbl.yuliao.model.WalletBean;
|
||||
import com.hbl.yuliao.network.Api;
|
||||
import com.hbl.yuliao.network.BaseObserver;
|
||||
import com.hbl.yuliao.network.Result;
|
||||
import com.hbl.yuliao.utils.GsonUtils;
|
||||
import com.hbl.yuliao.utils.LogUtils;
|
||||
import com.hbl.yuliao.utils.UpdateUtils;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.SelectMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
@@ -59,6 +72,9 @@ import java.util.UUID;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
ActivityBindUsdtBinding viewBinding;
|
||||
@@ -103,18 +119,10 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
getWallet();
|
||||
bindInfo();
|
||||
authPayInfo();
|
||||
viewBinding.editIv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
viewBinding.editIv.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
viewBinding.contactListActivityTitleBar.setTitle("修改钱包地址");
|
||||
viewBinding.changeLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.needDataLy.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
viewBinding.editIv.setOnClickListener(v -> {
|
||||
viewBinding.contactListActivityTitleBar.setTitle("修改钱包地址");
|
||||
viewBinding.changeLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.needDataLy.setVisibility(View.GONE);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -145,9 +153,10 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
PayInfoWxBean payInfoWxBean;
|
||||
private void showType(PayInfoWxBean feedbackResp) {
|
||||
if(feedbackResp!=null&&!TextUtils.isEmpty(feedbackResp.getUsdtAddress())){
|
||||
payInfoWxBean = feedbackResp;
|
||||
viewBinding.needDataLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.contactListActivityTitleBar.setTitle("我的USDT钱包地址");
|
||||
viewBinding.addressTv.setText(""+feedbackResp.getUsdtAddress());
|
||||
@@ -208,7 +217,7 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
.setMaxSelectNum(1)
|
||||
// .setMaxVideoSelectNum(9)
|
||||
.setSelectorUIStyle(selectorStyle)
|
||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
||||
.forResult(new OnResultCallbackListener<>() {
|
||||
@Override
|
||||
public void onResult(ArrayList<LocalMedia> result) {
|
||||
for (int i = 0; i < result.size(); ++i) {
|
||||
@@ -231,7 +240,7 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bindBean = feedbackResp.data;
|
||||
@@ -252,18 +261,21 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
|
||||
viewBinding.imageIv.setOnClickListener(v -> choicePhoto());
|
||||
|
||||
viewBinding.sumbitBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您的钱包地址");
|
||||
return;
|
||||
}
|
||||
viewBinding.sumbitBt.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您的钱包地址");
|
||||
return;
|
||||
}
|
||||
|
||||
if (imageFile == null) {
|
||||
if (imageFile == null) {
|
||||
if(payInfoWxBean==null||TextUtils.isEmpty(payInfoWxBean.getUsdtUrl())) {
|
||||
ToastX.showShortToast("上传钱包地址二维码");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(imageFile==null){
|
||||
toPush(payInfoWxBean.getUsdtUrl());
|
||||
}else{
|
||||
toShangchuanAli(imageFile);
|
||||
}
|
||||
});
|
||||
@@ -292,49 +304,6 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog actionDialog = new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog(AddOrChangeUSDTActivity.this,
|
||||
getString(com.netease.yunxin.kit.chatkit.ui.R.string.bind_phone_des_txt1), getString(com.netease.yunxin.kit.chatkit.ui.R.string.cancel_txt), getString(com.netease.yunxin.kit.chatkit.ui.R.string.to_sett_txt));
|
||||
actionDialog.setOnToActionListener(new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
// Intent intent = new Intent(getActivity(), ChangeAccoutActionActivity.class);
|
||||
// intent.putExtra("type", 5);
|
||||
// startActivity(intent);
|
||||
Intent intent = new Intent(AddOrChangeUSDTActivity.this, SetPayPasswordActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
|
||||
private void showDialog() {
|
||||
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(AddOrChangeUSDTActivity.this,
|
||||
getString(R.string.bind_phone_des_txt), getString(R.string.nobind_txt), getString(R.string.tobind_txt));
|
||||
actionDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
Intent intent = new Intent(AddOrChangeUSDTActivity.this, ChangeAccoutActionActivity.class);
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
private void getWallet() {
|
||||
Api.getInstance().walletInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -384,88 +353,56 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
String stsCredentialsBean;
|
||||
|
||||
UpdateUtils updateUtils;
|
||||
private void toShangchuanAli(File file) {
|
||||
showLoadingDialog("正在上传图片");
|
||||
Api.getInstance().stsCredentials1()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toQIiNiuYunOss(file);
|
||||
updateUtils = new UpdateUtils();
|
||||
updateUtils.toShangchuanAli(AddOrChangeUSDTActivity.this,file, "usdt",new UpdateUtils.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbitSuccess(String path) {
|
||||
dimessLoadingDialog();
|
||||
toPush(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toSumbitFails(String message) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(message);
|
||||
}
|
||||
},handler);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public static Handler handler = new Handler();
|
||||
|
||||
|
||||
public LoadingDialog loadingDialog;
|
||||
|
||||
public void showLoadingDialog() {
|
||||
// if (loadingDialog == null)
|
||||
// loadingDialog = new LoadingDialog(this);
|
||||
// loadingDialog.show();
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
public void showLoadingDialog(String msg) {
|
||||
// if (loadingDialog == null)
|
||||
// loadingDialog = new LoadingDialog(this);
|
||||
// loadingDialog.setLoadingText(msg);
|
||||
// loadingDialog.show();
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText(msg);
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
public void dimessLoadingDialog() {
|
||||
// if (loadingDialog != null) {
|
||||
// loadingDialog.dismiss();
|
||||
// }
|
||||
if (loadingDialog != null) {
|
||||
loadingDialog.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void toQIiNiuYunOss(File file) {
|
||||
String updatePathPic = "usdt";
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
(key, percent) -> {
|
||||
LogUtils.i("结果是啥进度:" + percent);
|
||||
}, () -> {
|
||||
return false;
|
||||
});
|
||||
Configuration configuration = new Configuration.Builder()
|
||||
.build();
|
||||
UploadManager uploadManager = new UploadManager(configuration);
|
||||
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
LogUtils.i("结果是啥开始:" + stsCredentialsBean + ";;" + file.getAbsolutePath());
|
||||
String files = "media/" + updatePathPic + "/" + fileName;
|
||||
|
||||
uploadManager.put(file, files, stsCredentialsBean, (key, info, response) -> {
|
||||
dimessLoadingDialog();
|
||||
if (info != null && info.isOK()) {
|
||||
// 上传成功
|
||||
try {
|
||||
toPush(IMUIKitConfig.OSS_URL + response.getString("key"));
|
||||
} catch (JSONException e) {
|
||||
LogUtils.i("结果是啥失败:" + e);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
// 上传失败
|
||||
LogUtils.i("结果是啥失败:" + GsonUtils.beanToJSONString(info));
|
||||
}
|
||||
}, options);
|
||||
}
|
||||
|
||||
private void toPush(String key) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("usdtAddress", viewBinding.nameEt.getText().toString().trim());
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
@@ -13,6 +14,14 @@ import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.alibaba.sdk.android.oss.ClientException;
|
||||
import com.alibaba.sdk.android.oss.OSSClient;
|
||||
import com.alibaba.sdk.android.oss.ServiceException;
|
||||
import com.alibaba.sdk.android.oss.callback.OSSCompletedCallback;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.common.auth.OSSStsTokenCredentialProvider;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||
import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.hbl.yuliao.IMUIKitConfig;
|
||||
import com.hbl.yuliao.R;
|
||||
@@ -20,13 +29,16 @@ import com.hbl.yuliao.databinding.ActivityBindWechatAlipayBinding;
|
||||
import com.hbl.yuliao.databinding.ActivityShimingBinding;
|
||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||
import com.hbl.yuliao.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.yuliao.model.AvaterBean;
|
||||
import com.hbl.yuliao.model.BindBean;
|
||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||
import com.hbl.yuliao.model.WalletBean;
|
||||
import com.hbl.yuliao.network.Api;
|
||||
import com.hbl.yuliao.network.BaseObserver;
|
||||
import com.hbl.yuliao.network.Result;
|
||||
import com.hbl.yuliao.utils.GsonUtils;
|
||||
import com.hbl.yuliao.utils.LogUtils;
|
||||
import com.hbl.yuliao.utils.UpdateUtils;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.SelectMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
@@ -64,6 +76,9 @@ import java.util.UUID;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
ActivityBindWechatAlipayBinding viewBinding;
|
||||
@@ -154,7 +169,7 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
.setMaxSelectNum(1)
|
||||
// .setMaxVideoSelectNum(9)
|
||||
.setSelectorUIStyle(selectorStyle)
|
||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
||||
.forResult(new OnResultCallbackListener<>() {
|
||||
@Override
|
||||
public void onResult(ArrayList<LocalMedia> result) {
|
||||
for (int i = 0; i < result.size(); ++i) {
|
||||
@@ -177,7 +192,7 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bindBean = feedbackResp.data;
|
||||
@@ -205,33 +220,30 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
|
||||
viewBinding.imageIv.setOnClickListener(v -> choicePhoto());
|
||||
|
||||
viewBinding.sumbitBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您的真实姓名");
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())) {
|
||||
if (isWeChat) {
|
||||
ToastX.showShortToast("请输入您本人使用的微信账号");
|
||||
} else {
|
||||
ToastX.showShortToast("请输入您本人使用的支付宝账号");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (imageFile == null) {
|
||||
if (isWeChat) {
|
||||
ToastX.showShortToast("请上传微信收款码");
|
||||
} else {
|
||||
ToastX.showShortToast("请上传支付宝收款码");
|
||||
}
|
||||
return;
|
||||
}
|
||||
toShangchuanAli(imageFile);
|
||||
viewBinding.sumbitBt.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您的真实姓名");
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())) {
|
||||
if (isWeChat) {
|
||||
ToastX.showShortToast("请输入您本人使用的微信账号");
|
||||
} else {
|
||||
ToastX.showShortToast("请输入您本人使用的支付宝账号");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (imageFile == null) {
|
||||
if (isWeChat) {
|
||||
ToastX.showShortToast("请上传微信收款码");
|
||||
} else {
|
||||
ToastX.showShortToast("请上传支付宝收款码");
|
||||
}
|
||||
return;
|
||||
}
|
||||
toShangchuanAli(imageFile);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -258,49 +270,6 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog actionDialog = new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog(BindWeChatOrAliPayActivity.this,
|
||||
getString(com.netease.yunxin.kit.chatkit.ui.R.string.bind_phone_des_txt1), getString(com.netease.yunxin.kit.chatkit.ui.R.string.cancel_txt), getString(com.netease.yunxin.kit.chatkit.ui.R.string.to_sett_txt));
|
||||
actionDialog.setOnToActionListener(new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
// Intent intent = new Intent(getActivity(), ChangeAccoutActionActivity.class);
|
||||
// intent.putExtra("type", 5);
|
||||
// startActivity(intent);
|
||||
Intent intent = new Intent(BindWeChatOrAliPayActivity.this, SetPayPasswordActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
|
||||
private void showDialog() {
|
||||
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(BindWeChatOrAliPayActivity.this,
|
||||
getString(R.string.bind_phone_des_txt), getString(R.string.nobind_txt), getString(R.string.tobind_txt));
|
||||
actionDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
Intent intent = new Intent(BindWeChatOrAliPayActivity.this, ChangeAccoutActionActivity.class);
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
private void getWallet() {
|
||||
Api.getInstance().walletInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -326,9 +295,6 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
|
||||
private void changeInfo() {
|
||||
if (walletBean != null) {
|
||||
// viewBinding.jinbiYueTv.setText(AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -345,40 +311,37 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
Glide.with(BindWeChatOrAliPayActivity.this)
|
||||
.load(file.getAbsolutePath())
|
||||
.into(viewBinding.imageIv);
|
||||
|
||||
// toShangchuanAli(file);
|
||||
}
|
||||
|
||||
|
||||
String stsCredentialsBean;
|
||||
|
||||
UpdateUtils updateUtils;
|
||||
private void toShangchuanAli(File file) {
|
||||
showLoadingDialog("正在上传图片");
|
||||
Api.getInstance().stsCredentials1()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
stsCredentialsBean = feedbackResp.data;
|
||||
// toAliYunOss(file, isHead);
|
||||
toQIiNiuYunOss(file);
|
||||
updateUtils = new UpdateUtils();
|
||||
updateUtils.toShangchuanAli(BindWeChatOrAliPayActivity.this,file, isWeChat ? "wechat" : "alipay",new UpdateUtils.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbitSuccess(String path) {
|
||||
dimessLoadingDialog();
|
||||
toPush(path);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void toSumbitFails(String message) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(message);
|
||||
}
|
||||
},handler);
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
dimessLoadingDialog();
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static Handler handler = new Handler();
|
||||
|
||||
public LoadingDialog loadingDialog;
|
||||
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
@@ -397,41 +360,6 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void toQIiNiuYunOss(File file) {
|
||||
String updatePathPic = isWeChat ? "wechat" : "alipay";
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
(key, percent) -> {
|
||||
LogUtils.i("结果是啥进度:" + percent);
|
||||
}, () -> {
|
||||
return false;
|
||||
});
|
||||
Configuration configuration = new Configuration.Builder()
|
||||
.build();
|
||||
UploadManager uploadManager = new UploadManager(configuration);
|
||||
|
||||
String fileName = UUID.randomUUID().toString() + "_" + file.getName();
|
||||
LogUtils.i("结果是啥开始:" + stsCredentialsBean + ";;" + file.getAbsolutePath());
|
||||
String files = "media/" + updatePathPic + "/" + fileName;
|
||||
|
||||
uploadManager.put(file, files, stsCredentialsBean, (key, info, response) -> {
|
||||
dimessLoadingDialog();
|
||||
if (info != null && info.isOK()) {
|
||||
// 上传成功
|
||||
try {
|
||||
toPush(IMUIKitConfig.OSS_URL + response.getString("key"));
|
||||
} catch (JSONException e) {
|
||||
LogUtils.i("结果是啥失败:" + e);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
// 上传失败
|
||||
LogUtils.i("结果是啥失败:" + GsonUtils.beanToJSONString(info));
|
||||
}
|
||||
}, options);
|
||||
}
|
||||
|
||||
private void toPush(String key) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (isWeChat) {
|
||||
|
||||
@@ -307,7 +307,7 @@ public class MyWalletActivity extends BaseActivity {
|
||||
|
||||
private void changeInfo() {
|
||||
// if (walletBean != null) {
|
||||
viewBinding.jinbiYueTv.setText("¥ " + AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
viewBinding.jinbiYueTv.setText(" " + AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||
//
|
||||
// }
|
||||
|
||||
@@ -289,6 +289,8 @@ public class SetPayPasswordActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@@ -88,7 +89,7 @@ public class SumbitUsdtActivity extends BaseActivity {
|
||||
List<String> outputStrings = new ArrayList<>();
|
||||
int number = 0;
|
||||
private SumbitUsdtActivityBinding viewBinding;
|
||||
|
||||
long orderId = 0;
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
// getWindow().setStatusBarColor(getResources().getColor(R.color.color_fcfcfc));
|
||||
@@ -101,6 +102,7 @@ public class SumbitUsdtActivity extends BaseActivity {
|
||||
|
||||
protected void initView() {
|
||||
number = getIntent().getIntExtra("number",0);
|
||||
orderId = getIntent().getLongExtra("order_id",0);
|
||||
viewBinding.mainAboutTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
||||
viewBinding.numberTv.setText(number+"");
|
||||
initAdapter();
|
||||
@@ -110,6 +112,12 @@ public class SumbitUsdtActivity extends BaseActivity {
|
||||
viewBinding.tijiaoTv.setOnClickListener(v -> {
|
||||
|
||||
KeyboardUtil.hideSoftInput(SumbitUsdtActivity.this);
|
||||
|
||||
if(TextUtils.isEmpty(viewBinding.beizhuEt.getText().toString().trim())){
|
||||
ToastX.showShortToast("交易hash不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if (localMedias == null || localMedias.size() == 0) {
|
||||
ToastX.showShortToast("请先上传充值凭证");
|
||||
} else {
|
||||
@@ -188,7 +196,7 @@ public class SumbitUsdtActivity extends BaseActivity {
|
||||
// }
|
||||
//
|
||||
private void toUpdateOssNew( int i) {
|
||||
String updatePathPic = "userAvatarFileName";
|
||||
String updatePathPic = "recharge";
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
(key, percent) -> {
|
||||
LogUtils.i("结果是啥进度:" + percent);
|
||||
@@ -230,24 +238,21 @@ public class SumbitUsdtActivity extends BaseActivity {
|
||||
|
||||
private void sumbit() {
|
||||
|
||||
List<MultipartBody.Part> map = new ArrayList<>();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("rechargeAccountId",orderId);
|
||||
map.put("amount",number);
|
||||
map.put("remark",viewBinding.beizhuEt.getText().toString().trim());
|
||||
map.put("proofImages",outputStrings);
|
||||
|
||||
for (int i = 0; i < outputStrings.size(); i++) {
|
||||
MultipartBody.Part imageBodyPart = MultipartBody.Part.createFormData("screenshot" + (i + 1), outputStrings.get(i));
|
||||
map.add(imageBodyPart);
|
||||
}
|
||||
|
||||
Api.getInstance().report(map)
|
||||
Api.getInstance().rechargeOrder(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result>() {
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
dimessLoadingDialog();
|
||||
if (feedbackResp.data != null) {
|
||||
|
||||
|
||||
}
|
||||
ToastX.showShortToast("充值申请提交成功");
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -266,6 +271,8 @@ public class SumbitUsdtActivity extends BaseActivity {
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText("Loading…");
|
||||
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,6 @@ public class TiXianActivity extends BaseActivity {
|
||||
int defaultIndex = 0; //输入的金额
|
||||
private boolean isFenqi = false;
|
||||
private int installmentNum; //分期數
|
||||
TiXianConfBean bankConfBean;
|
||||
TiXianConfBean aliPayConfBean;
|
||||
TiXianConfBean tiXianConfBean;
|
||||
|
||||
ArrayList<BankBean> bankBeans = new ArrayList<>();
|
||||
@@ -87,17 +85,15 @@ public class TiXianActivity extends BaseActivity {
|
||||
viewBinding = ActivityTixianBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
initView();
|
||||
viewBinding.rbBank.setVisibility(View.GONE);
|
||||
viewBinding.rbAlipay.setVisibility(View.GONE);
|
||||
getConf();
|
||||
getWallet();
|
||||
getBankList();
|
||||
authPayInfo();
|
||||
|
||||
// getBankList();
|
||||
viewBinding.toBindBt.setOnClickListener(v -> startActivity(new Intent(TiXianActivity.this, AddOrChangeUSDTActivity.class)));
|
||||
viewBinding.allTxTv.setPaintFlags(viewBinding.allTxTv.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);
|
||||
}
|
||||
|
||||
|
||||
PayInfoWxBean payInfoWxBean;
|
||||
private void authPayInfo() {
|
||||
Api.getInstance().authPayInfo()
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -106,24 +102,22 @@ public class TiXianActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onSuccess(Result<PayInfoWxBean> feedbackResp) {
|
||||
if(feedbackResp!=null&&feedbackResp.data!=null){
|
||||
if(!TextUtils.isEmpty(feedbackResp.data.getAlipayNo())){
|
||||
BankBean bankBean = new BankBean();
|
||||
bankBean.setBankName("支付宝");
|
||||
bankBean.setCardholderName(feedbackResp.data.getAlipayRealName());
|
||||
bankBean.setNumber(feedbackResp.data.getAlipayNo());
|
||||
bankBean.setId(-1);
|
||||
aliPayBeans.clear();
|
||||
aliPayBeans.add(bankBean);
|
||||
|
||||
if(viewBinding.rbAlipay.isChecked()){
|
||||
showAlipay();
|
||||
}
|
||||
payInfoWxBean = feedbackResp.data;
|
||||
if(!TextUtils.isEmpty(feedbackResp.data.getUsdtAddress())){
|
||||
viewBinding.walletLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.toBindBt.setVisibility(View.GONE);
|
||||
viewBinding.walletTv.setText(feedbackResp.data.getUsdtAddress());
|
||||
}else{
|
||||
viewBinding.walletLy.setVisibility(View.GONE);
|
||||
viewBinding.toBindBt.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
viewBinding.walletLy.setVisibility(View.GONE);
|
||||
viewBinding.toBindBt.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -131,6 +125,7 @@ public class TiXianActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
authPayInfo();
|
||||
|
||||
}
|
||||
|
||||
@@ -159,7 +154,7 @@ public class TiXianActivity extends BaseActivity {
|
||||
shouxufei = tiXianConfBean.getBaseFee();
|
||||
}
|
||||
double sizes = defaultIndex*1.0-shouxufei;
|
||||
viewBinding.showYujiTv.setText(Html.fromHtml("预计到账金额:<font color = '#FA6947'>"+String.format("%.2f",sizes)+"</font>元"));
|
||||
viewBinding.showYujiTv.setText(Html.fromHtml("预计到账金额:<font color = '#FA6947'>"+String.format("%.2f",sizes)+"</font>"));
|
||||
}else{
|
||||
viewBinding.showYujiTv.setVisibility(View.INVISIBLE);
|
||||
|
||||
@@ -172,32 +167,6 @@ public class TiXianActivity extends BaseActivity {
|
||||
public void afterTextChanged(Editable s) {
|
||||
}
|
||||
});
|
||||
//
|
||||
// viewBinding.radioRg.setOnCheckedChangeListener(((group, checkedId) -> {
|
||||
// RadioButton radioButton = (RadioButton) findViewById(checkedId);
|
||||
// Toast.makeText(getApplicationContext(),"你选了:"+radioButton.getText(),Toast.LENGTH_LONG).show();
|
||||
// }));
|
||||
|
||||
viewBinding.rbBank.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
if(isChecked){
|
||||
showBank();
|
||||
|
||||
}
|
||||
});
|
||||
viewBinding.rbAlipay.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
if(isChecked){
|
||||
showAlipay();
|
||||
|
||||
}
|
||||
});
|
||||
viewBinding.shoukuanBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(tiXianConfBean!=null){
|
||||
showFloatType(tiXianConfBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
viewBinding.allTxTv.setOnClickListener(v -> {
|
||||
if(walletBean!=null){
|
||||
@@ -213,18 +182,18 @@ public class TiXianActivity extends BaseActivity {
|
||||
ToastX.showShortToast("请先输入提现金额");
|
||||
return;
|
||||
}
|
||||
if(walletBean==null){
|
||||
ToastX.showShortToast("获取钱包信息失败");
|
||||
return;
|
||||
}
|
||||
// if(walletBean==null){
|
||||
// ToastX.showShortToast("获取钱包信息失败");
|
||||
// return;
|
||||
// }
|
||||
if(Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())>walletBean.getGoldCoin()/100){
|
||||
ToastX.showShortToast("最多可以提取"+(walletBean.getGoldCoin()/100)+"元");
|
||||
return;
|
||||
}
|
||||
if (bankBean == null){
|
||||
ToastX.showShortToast("请先选择提现渠道");
|
||||
ToastX.showShortToast("最多可以提取"+(walletBean.getGoldCoin()/100)+"");
|
||||
return;
|
||||
}
|
||||
// if (bankBean == null){
|
||||
// ToastX.showShortToast("请先选择提现渠道");
|
||||
// return;
|
||||
// }
|
||||
|
||||
PayDialog payDialog = new PayDialog(TiXianActivity.this, "", false);
|
||||
payDialog.setOntoAlbumListener(new PayDialog.OnListItemClickListener() {
|
||||
@@ -247,10 +216,10 @@ public class TiXianActivity extends BaseActivity {
|
||||
private void toSumbit() {
|
||||
Map<String,Object> map = new HashMap<String, Object>();
|
||||
map.put("amount", Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())*100);
|
||||
map.put("withdrawConfId", tiXianConfBean.getId()); //信用卡支付
|
||||
if(tiXianConfBean.getType() ==1){
|
||||
map.put("bankCardId", bankBean.getId()); //信用卡支付
|
||||
}
|
||||
map.put("withdrawConfId", 3); //信用卡支付
|
||||
// if(tiXianConfBean.getType() ==1){
|
||||
map.put("bankCardId", ""); //信用卡支付
|
||||
// }
|
||||
Api.getInstance().withdrawApply(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -260,8 +229,10 @@ public class TiXianActivity extends BaseActivity {
|
||||
// startToWeb(feedbackResp.data);
|
||||
//{"data":"https://z80.fenouliu.cc/pay/wechat/250428091839829744550037","code":1}
|
||||
//{"data":"https://t501.pay24t.com/form/payorderzz.html?id=db04e412-be26-4946-8f06-c00c582137df","code":1}
|
||||
ToastX.showShortToast("提现申请发送成功!");
|
||||
viewBinding.editQueryEt.setText("");
|
||||
getWallet();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -271,86 +242,8 @@ public class TiXianActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void showAlipay() {
|
||||
tiXianConfBean = aliPayConfBean;
|
||||
viewBinding.shoukuanBt.setHint("请选择支付宝账号");
|
||||
if(aliPayBeans!=null&&aliPayBeans.size()>0){
|
||||
viewBinding.shoukuanBt.setText(aliPayBeans.get(0).getCardholderName()+" "+aliPayBeans.get(0).getBankName()+" "+aliPayBeans.get(0).getNumber());
|
||||
bankBean =aliPayBeans.get(0);
|
||||
}else{
|
||||
viewBinding.shoukuanBt.setText("");
|
||||
bankBean = null;
|
||||
}
|
||||
if(tiXianConfBean!=null) {
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>" + tiXianConfBean.getBaseFee() + "</font>元<br>提现费率<font color = '#FA6947'>" + tiXianConfBean.getFeeRate() + "%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
}
|
||||
}
|
||||
|
||||
private void showBank() {
|
||||
|
||||
tiXianConfBean = bankConfBean;
|
||||
viewBinding.shoukuanBt.setHint("请选择银行卡");
|
||||
if(bankBeans!=null&&bankBeans.size()>0){
|
||||
viewBinding.shoukuanBt.setText(bankBeans.get(0).getCardholderName()+" "+bankBeans.get(0).getBankName()+" "+bankBeans.get(0).getNumber());
|
||||
bankBean =bankBeans.get(0);
|
||||
}else{
|
||||
viewBinding.shoukuanBt.setText("");
|
||||
bankBean = null;
|
||||
|
||||
}
|
||||
if(tiXianConfBean!=null) {
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>" + tiXianConfBean.getBaseFee() + "</font>元<br>提现费率<font color = '#FA6947'>" + tiXianConfBean.getFeeRate() + "%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
}
|
||||
}
|
||||
|
||||
private void showFloatType(TiXianConfBean tiXianConfBean) {
|
||||
if(bankBean==null){
|
||||
if(tiXianConfBean.getType()==1){
|
||||
if(bankBeans!=null&&bankBeans.size()>0){
|
||||
bankBean = bankBeans.get(0);
|
||||
}
|
||||
}else{
|
||||
if(aliPayBeans!=null&&aliPayBeans.size()>0){
|
||||
bankBean = aliPayBeans.get(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SelectBanksDialog sp = new SelectBanksDialog(TiXianActivity.this,tiXianConfBean,tiXianConfBean.getType()==1?bankBeans:aliPayBeans,bankBean);
|
||||
sp.setOnToVipListener(new SelectBanksDialog.OnToTypeListener() {
|
||||
@Override
|
||||
public void toType(BankBean type) {
|
||||
bankBean = type;
|
||||
viewBinding.shoukuanBt.setText(bankBean.getCardholderName()+" "+bankBean.getBankName()+" "+bankBean.getNumber());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBind(TiXianConfBean tiXianConfBean) {
|
||||
if(tiXianConfBean.getType()==1){
|
||||
startActivityForResult(new Intent(TiXianActivity.this, AddBankActivity.class),888);
|
||||
}else{
|
||||
Intent i = new Intent(TiXianActivity.this, BindWeChatOrAliPayActivity.class);
|
||||
i.putExtra("isWeChat",false);
|
||||
startActivityForResult(i,777);
|
||||
}
|
||||
}
|
||||
});
|
||||
sp.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if(resultCode == RESULT_OK){
|
||||
if(requestCode == 888) {
|
||||
getBankList();
|
||||
}else if(requestCode == 777){
|
||||
authPayInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
private void getConf() {
|
||||
Map<String, Object> conf = new HashMap<>();
|
||||
conf.put("token", DataUtils.getToken());
|
||||
@@ -360,15 +253,15 @@ public class TiXianActivity extends BaseActivity {
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<TiXianConfBean>> feedbackResp) {
|
||||
// {"data":[{"id":1,"channel":"支付宝","code":"902","type":2,"baseFee":2.00,"feeRate":8.00,"status":1},
|
||||
// {"id":2,"channel":"银行卡","code":"900","type":1,"baseFee":2.00,"feeRate":8.00,"status":1}],"code":1}
|
||||
//{"data":[{"id":1,"channel":"支付宝","code":"902","type":2,"baseFee":2.00,"feeRate":8.00,"status":1,"maxWithdrawLimit":900,"minWithdrawLimit":100},
|
||||
// {"id":2,"channel":"银行卡","code":"900","type":1,"baseFee":2.00,"feeRate":8.00,"status":1,"maxWithdrawLimit":null,"minWithdrawLimit":null},
|
||||
// {"id":3,"channel":"USDT","code":"903","type":3,"baseFee":2.00,"feeRate":5.00,"status":1,"maxWithdrawLimit":null,"minWithdrawLimit":null}],"code":1}
|
||||
|
||||
|
||||
if(feedbackResp!=null&&feedbackResp.data!=null&&feedbackResp.data.size()>0){
|
||||
for (int i = 0;i<feedbackResp.data.size();i++) {
|
||||
if (feedbackResp.data.get(i).getType() == 1) {
|
||||
bankConfBean = feedbackResp.data.get(i);
|
||||
} else if (feedbackResp.data.get(i).getType() == 2) {
|
||||
aliPayConfBean = feedbackResp.data.get(i);
|
||||
if (feedbackResp.data.get(i).getType() == 3) {
|
||||
tiXianConfBean = feedbackResp.data.get(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,50 +275,34 @@ public class TiXianActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getBankList() {
|
||||
|
||||
Api.getInstance().getBanks()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
||||
if(feedbackResp!=null&&feedbackResp.data.size()>0){
|
||||
bankBeans = (ArrayList<BankBean>) feedbackResp.data;
|
||||
if(viewBinding.rbBank.isChecked()){
|
||||
showBank();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
// ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
//
|
||||
// private void getBankList() {
|
||||
//
|
||||
// Api.getInstance().getBanks()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
||||
// if(feedbackResp!=null&&feedbackResp.data.size()>0){
|
||||
// bankBeans = (ArrayList<BankBean>) feedbackResp.data;
|
||||
// if(viewBinding.rbBank.isChecked()){
|
||||
// showBank();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
//// ToastX.showShortToast(msg);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
private void changeBottomType() {
|
||||
if(bankConfBean!=null){
|
||||
tiXianConfBean = bankConfBean;
|
||||
viewBinding.rbBank.setVisibility(View.VISIBLE);
|
||||
viewBinding.shoukuanBt.setHint("请选择银行卡");
|
||||
|
||||
if(aliPayConfBean!=null){
|
||||
viewBinding.rbAlipay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}else {
|
||||
if(aliPayConfBean!=null){
|
||||
tiXianConfBean = aliPayConfBean;
|
||||
viewBinding.rbAlipay.setVisibility(View.VISIBLE);
|
||||
viewBinding.rbAlipay.setChecked(true);
|
||||
viewBinding.shoukuanBt.setHint("请选择支付宝账号");
|
||||
}
|
||||
}
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>"+tiXianConfBean.getBaseFee()+"</font>元<br>提现费率<font color = '#FA6947'>"+tiXianConfBean.getFeeRate()+"%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>"+tiXianConfBean.getBaseFee()+"</font><br>提现费率<font color = '#FA6947'>"+tiXianConfBean.getFeeRate()+"%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
|
||||
}
|
||||
|
||||
@@ -496,7 +373,7 @@ public class TiXianActivity extends BaseActivity {
|
||||
|
||||
|
||||
private void changeInfo() {
|
||||
viewBinding.dianshuTv.setText("¥ "+AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
viewBinding.dianshuTv.setText(" "+AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,6 +23,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.blankj.utilcode.util.StringUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.hbl.yuliao.IMUIKitConfig;
|
||||
import com.hbl.yuliao.R;
|
||||
import com.hbl.yuliao.adapter.CommonAdapter;
|
||||
@@ -35,6 +36,7 @@ import com.hbl.yuliao.model.BindBean;
|
||||
import com.hbl.yuliao.model.ChongZhiQuDaoBean;
|
||||
import com.hbl.yuliao.model.ExchangeConfBean;
|
||||
import com.hbl.yuliao.model.InstallmentBean;
|
||||
import com.hbl.yuliao.model.RechargeAccountBean;
|
||||
import com.hbl.yuliao.model.SendOrderBean;
|
||||
import com.hbl.yuliao.model.SeqBean;
|
||||
import com.hbl.yuliao.model.SeqBeanTop;
|
||||
@@ -88,6 +90,26 @@ public class TopUpActivity extends BaseActivity {
|
||||
bindInfo();
|
||||
// getConf();
|
||||
getConf1();
|
||||
getTopInfo();
|
||||
}
|
||||
RechargeAccountBean rechargeAccountBean;
|
||||
private void getTopInfo() {
|
||||
Api.getInstance().rechargeAccount()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<RechargeAccountBean> feedbackResp) {
|
||||
rechargeAccountBean = feedbackResp.data;
|
||||
viewBinding.usdtAddrTv.setText(rechargeAccountBean.getUsdtAddress());
|
||||
Glide.with(TopUpActivity.this).load(rechargeAccountBean.getQrCodeUrl()).error(R.color.white).placeholder(R.color.white).into(viewBinding.usdtAddrIv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getConf1() {
|
||||
@@ -183,10 +205,15 @@ public class TopUpActivity extends BaseActivity {
|
||||
ToastX.showShortToast("请先选择充值金额");
|
||||
return;
|
||||
}
|
||||
|
||||
if(rechargeAccountBean==null){
|
||||
ToastX.showShortToast("没有获取到充值账户");
|
||||
return;
|
||||
}
|
||||
// launchTRC20Wallet(TopUpActivity.this,"TSkB56Bib6iihk6zsUDfwgyXBqvkDvFzBz",defaultIndex+"");
|
||||
Intent intent = new Intent(TopUpActivity.this,SumbitUsdtActivity.class);
|
||||
intent.putExtra("number",defaultIndex);
|
||||
intent.putExtra("order_id",rechargeAccountBean.getId());
|
||||
|
||||
startActivity(intent);
|
||||
} );
|
||||
// AnimUtil.setAnimViews(viewBinding.topupTv);
|
||||
@@ -415,7 +442,7 @@ public class TopUpActivity extends BaseActivity {
|
||||
|
||||
|
||||
private void changeInfo() {
|
||||
viewBinding.dianshuTv.setText("¥ "+AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
viewBinding.dianshuTv.setText(" "+AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.hbl.yuliao.login.LoginActivity;
|
||||
import com.hbl.yuliao.login.PhoneLoginActivity;
|
||||
import com.hbl.yuliao.login.RegisterActivity;
|
||||
import com.hbl.yuliao.main.mine.UserHeadEditActivity;
|
||||
import com.hbl.yuliao.model.ConfigBean;
|
||||
import com.hbl.yuliao.model.LoginBean;
|
||||
import com.hbl.yuliao.model.NotifyCountBean;
|
||||
import com.hbl.yuliao.network.Api;
|
||||
@@ -121,6 +122,7 @@ public class WelcomeActivity extends BaseActivity {
|
||||
} else {
|
||||
activityWelcomeBinding.bottomLy.setVisibility(View.GONE);
|
||||
showIsLogin(true);
|
||||
getConfig();
|
||||
new Handler().postDelayed(() -> {
|
||||
showMainActivityAndFinish();
|
||||
}, 3 * 1000);
|
||||
@@ -235,7 +237,7 @@ public class WelcomeActivity extends BaseActivity {
|
||||
// 访问路劲
|
||||
String path = uri.getPath();
|
||||
//获取指定参数值
|
||||
if (scheme.equals("timego") && host.equals("time_go_mm")) {
|
||||
if (scheme.equals("yuliao") && host.equals("time_go_mm")) {
|
||||
if (path.contains("add_user")) {
|
||||
String goodsId = uri.getQueryParameter("userId");
|
||||
LogUtils.i("111111111userId: " + goodsId);
|
||||
@@ -352,11 +354,11 @@ public class WelcomeActivity extends BaseActivity {
|
||||
loginBean.setCashFeeRate(feedbackResp.data.getCashFeeRate());
|
||||
loginBean.setSilverFeeRate(feedbackResp.data.getSilverFeeRate());
|
||||
loginBean.setMmSilverFeeRate(feedbackResp.data.getMmSilverFeeRate());
|
||||
loginBean.setUserAvatarFileName(feedbackResp.data.getUserAvatarFileName());
|
||||
DataUtils.set(WelcomeActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
||||
// IMKitClient.init(WelcomeActivity.this, null, IMApplication.getSdkOptions());
|
||||
getConfig(account,token);
|
||||
|
||||
|
||||
new Handler().postDelayed(() -> loginIM(account, token), 3000);
|
||||
// new Handler().postDelayed(() -> showMainActivityAndFinish(), 3000);
|
||||
// showMainActivityAndFinish()
|
||||
// new Handler().postDelayed(() -> {
|
||||
@@ -401,6 +403,85 @@ public class WelcomeActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 赠送开关配置
|
||||
*/
|
||||
private void getConfig(String account,String token) {
|
||||
// DataUtils.set(MainActivity.this, "mall_address", "");
|
||||
Api.getInstance().getConfig()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<List<ConfigBean>> feedbackResp) {
|
||||
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
for (ConfigBean configBean : feedbackResp.data) {
|
||||
if (configBean.getId() == 1) {
|
||||
DataUtils.set(WelcomeActivity.this, "transfer_cash", configBean.getVal().equals("1"));
|
||||
}
|
||||
if (configBean.getId() == 4) {
|
||||
DataUtils.set(WelcomeActivity.this, "redpkg_score", configBean.getVal().equals("1"));
|
||||
}
|
||||
|
||||
if (configBean.getCode().equals("mall_address")) {
|
||||
DataUtils.set(WelcomeActivity.this, "mall_address", configBean.getVal());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
new Handler().postDelayed(() -> loginIM(account, token), 2000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
loginIM(account, token);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 赠送开关配置
|
||||
*/
|
||||
private void getConfig() {
|
||||
// DataUtils.set(MainActivity.this, "mall_address", "");
|
||||
Api.getInstance().getConfig()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<List<ConfigBean>> feedbackResp) {
|
||||
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
for (ConfigBean configBean : feedbackResp.data) {
|
||||
if (configBean.getId() == 1) {
|
||||
DataUtils.set(WelcomeActivity.this, "transfer_cash", configBean.getVal().equals("1"));
|
||||
}
|
||||
if (configBean.getId() == 4) {
|
||||
DataUtils.set(WelcomeActivity.this, "redpkg_score", configBean.getVal().equals("1"));
|
||||
}
|
||||
|
||||
if (configBean.getCode().equals("mall_address")) {
|
||||
DataUtils.set(WelcomeActivity.this, "mall_address", configBean.getVal());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showLoginView() {
|
||||
LogUtils.i(TAG, "showLoginView");
|
||||
|
||||
26
app/src/main/res/drawable/button_false_bg_yl.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:startColor="#F4F4F4"
|
||||
android:endColor="#F4F4F4"
|
||||
android:centerColor="#F4F4F4"
|
||||
android:type="linear"
|
||||
/>
|
||||
<stroke android:width="0dp" android:color="#F4F4F4" />
|
||||
<corners android:radius="20dp"/>
|
||||
</shape>
|
||||
|
||||
</item>
|
||||
|
||||
<!-- <item android:width="24dp"-->
|
||||
<!-- android:height="24dp" android:gravity="center">-->
|
||||
<!-- <shape android:shape="oval" >-->
|
||||
<!-- <solid android:color="#EDEDED"/>-->
|
||||
<!-- <size android:width="24dp"-->
|
||||
<!-- android:height="24dp"/>-->
|
||||
<!-- </shape>-->
|
||||
<!-- </item>-->
|
||||
|
||||
</layer-list>
|
||||
26
app/src/main/res/drawable/button_true_bg_yl.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:startColor="@color/color_themeblue"
|
||||
android:endColor="@color/color_themeblue"
|
||||
android:centerColor="@color/color_themeblue"
|
||||
android:type="linear"
|
||||
/>
|
||||
<stroke android:width="0dp" android:color="@color/color_themeblue" />
|
||||
<corners android:radius="20dp"/>
|
||||
</shape>
|
||||
|
||||
</item>
|
||||
|
||||
<!-- <item android:width="24dp"-->
|
||||
<!-- android:height="24dp" android:gravity="center">-->
|
||||
<!-- <shape android:shape="oval" >-->
|
||||
<!-- <solid android:color="#EDEDED"/>-->
|
||||
<!-- <size android:width="24dp"-->
|
||||
<!-- android:height="24dp"/>-->
|
||||
<!-- </shape>-->
|
||||
<!-- </item>-->
|
||||
|
||||
</layer-list>
|
||||
8
app/src/main/res/drawable/cornor_thempink_12dp1.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_30" />
|
||||
|
||||
<solid android:color="#F65656" />
|
||||
|
||||
|
||||
</shape>
|
||||
@@ -2,10 +2,10 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/big_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:id="@+id/big_bg"
|
||||
android:background="#EEF0F7"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -26,103 +26,102 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/change_ly"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/dp_15"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="钱包地址"
|
||||
android:textColor="#ff383838"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/transparent"
|
||||
android:hint ="请输入您的钱包地址"
|
||||
android:textColorHint="#ff999999"
|
||||
android:textSize="18sp"
|
||||
android:id="@+id/name_et"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="@color/black"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="#ededed"
|
||||
android:visibility="visible" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="网络类型"
|
||||
android:id="@+id/type_name_tv"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:textColor="#ff383838"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_bank"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:button="@drawable/radio_button"
|
||||
android:text=" TRC20"
|
||||
android:textSize="14sp"
|
||||
android:checked="true"
|
||||
android:enabled="false"
|
||||
android:textColor="@color/color_383838"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="#ededed"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="上传钱包地址二维码"
|
||||
android:id="@+id/type_image_tv"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:textColor="#ff383838"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
<com.hbl.yuliao.widget.CircleImageView
|
||||
android:layout_width="@dimen/dp_110"
|
||||
android:layout_height="@dimen/dp_110"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"
|
||||
app:es_shape_type="rectangle"
|
||||
app:ease_radius="@dimen/dp_5"
|
||||
android:id="@+id/image_iv"
|
||||
android:src="@mipmap/add_img_wallet"/>
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:id="@+id/tips_tv"
|
||||
android:text="*请注意查看钱包网络类型,网络类型错误会造成资产丢失,请务必确认清楚"
|
||||
android:textColor="#999999"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_15">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="钱包地址"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/name_et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/cornor_stroke_thempink_gray"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入您的钱包地址"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/type_name_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:text="网络类型"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/cornor_stroke_thempink_gray"
|
||||
android:button="@drawable/radio_button"
|
||||
android:checked="true"
|
||||
android:enabled="false"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:text="TRC20"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/type_image_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:text="上传钱包地址二维码"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.hbl.yuliao.widget.CircleImageView
|
||||
android:id="@+id/image_iv"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@mipmap/add_img_wallet"
|
||||
app:ease_radius="@dimen/dp_5"
|
||||
app:es_shape_type="rectangle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tips_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:text="*请注意查看钱包网络类型,网络类型错误会造成资产丢失,请务必确认清楚"
|
||||
android:textColor="#999999"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:text="确定"
|
||||
android:id="@+id/sumbit_bt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/button_true_bg1"
|
||||
android:text="确定"
|
||||
android:textColor="#fff6f8fd"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -130,8 +129,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F6F5F7"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/bind_ly"
|
||||
@@ -140,80 +139,104 @@
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_15">
|
||||
android:background="@drawable/index_user_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/index_user_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.hbl.yuliao.widget.CircleImageView
|
||||
android:id="@+id/image_iv1"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@mipmap/add_img_wallet"
|
||||
app:ease_radius="@dimen/dp_5"
|
||||
app:es_shape_type="rectangle" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="#ededed" />
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/xingming_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="钱包地址:"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/address_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_60"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="TRuf6kD5FXMMV6oxuhD9YJ7WzfH1SoJCAa"
|
||||
android:textColor="#498AFA"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="#EEF0F4" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="网络类型:"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="网络类型:TRC20"
|
||||
android:textColor="#ff333333"
|
||||
android:text="TRC20"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="钱包地址:"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/address_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="TRuf6kD5FXMMV6oxuhD9YJ7WzfH1SoJCAa"
|
||||
android:textColor="#ff4482ff"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/edit_iv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ustdt_edit_iv"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentRight="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="#EEF0F4" />
|
||||
|
||||
<com.hbl.yuliao.widget.CircleImageView
|
||||
android:id="@+id/image_iv1"
|
||||
android:layout_width="@dimen/dp_255"
|
||||
android:layout_height="@dimen/dp_255"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:src="@mipmap/add_img_wallet"
|
||||
app:ease_radius="@dimen/dp_5"
|
||||
app:es_shape_type="rectangle" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/edit_iv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/button_true_bg1"
|
||||
android:text="编辑"
|
||||
android:textColor="#fff6f8fd"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
android:gravity="center"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
android:id="@+id/clyRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_fcfcfc"
|
||||
android:background="@color/color_eefof7"
|
||||
tools:context=".main.mine.EditUserInfoActivity"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/white"
|
||||
app:rightTitleText="@string/allread_text"
|
||||
app:titleText="@string/editchatlist_text"
|
||||
app:titleTextColor="@android:color/black" />
|
||||
|
||||
@@ -43,37 +43,6 @@
|
||||
android:background="#FFFFFF"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/conversation_btn_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
android:onClick="tabClick">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/conversation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@mipmap/index_img_t"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/shouye_txt"
|
||||
android:textColor="@color/color_fe6881"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/conversation_dot"
|
||||
android:layout_width="@dimen/dimen_6_dp"
|
||||
android:layout_height="@dimen/dimen_6_dp"
|
||||
android:layout_alignRight="@+id/conversation"
|
||||
android:layout_marginLeft="@dimen/dimen_10_dp"
|
||||
android:layout_marginTop="@dimen/dimen_7_dp"
|
||||
android:background="@drawable/bg_conversation_red_dot"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
@@ -112,6 +81,38 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/conversation_btn_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
android:onClick="tabClick">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/conversation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@mipmap/voom_img_f"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/voom_txt"
|
||||
android:textColor="@color/color_babeca"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/conversation_dot"
|
||||
android:layout_width="@dimen/dimen_6_dp"
|
||||
android:layout_height="@dimen/dimen_6_dp"
|
||||
android:layout_alignRight="@+id/conversation"
|
||||
android:layout_marginLeft="@dimen/dimen_10_dp"
|
||||
android:layout_marginTop="@dimen/dimen_7_dp"
|
||||
android:background="@drawable/bg_conversation_red_dot"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/live_btn_group"
|
||||
android:layout_width="match_parent"
|
||||
@@ -125,10 +126,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@mipmap/voom_img_f"
|
||||
android:drawableTop="@mipmap/index_img_f"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/voom_txt"
|
||||
android:text="@string/dongtai_txt"
|
||||
android:textColor="@color/color_babeca"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible"
|
||||
app:srlAccentColor="@color/color_6b3689">
|
||||
app:srlAccentColor="@color/color_498afa">
|
||||
|
||||
<com.hbl.yuliao.widget.BezierCircleHeader
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
android:id="@+id/about_title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_fffbfb"
|
||||
android:background="@color/white"
|
||||
app:titleText="@string/activity_msg"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
android:visibility="gone">
|
||||
|
||||
<Button
|
||||
android:id="@+id/wdyhk_bt"
|
||||
@@ -317,6 +317,7 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:background="#D8D8D8" />
|
||||
@@ -326,7 +327,7 @@
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
android:visibility="gone">
|
||||
|
||||
<Button
|
||||
android:id="@+id/wdwx_bt"
|
||||
@@ -347,6 +348,7 @@
|
||||
android:layout_height="1px"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
android:background="#D8D8D8" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -354,7 +356,8 @@
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
android:visibility="gone">
|
||||
|
||||
<Button
|
||||
android:id="@+id/wdzfb_bt"
|
||||
@@ -373,6 +376,7 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:visibility="gone"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:background="#D8D8D8" />
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:background="@color/color_eefof7"
|
||||
android:orientation="vertical"
|
||||
tools:context=".welcome.WelcomeActivity"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:background="@color/white"
|
||||
android:layout_height="?actionBarSize">
|
||||
<ImageView
|
||||
android:id="@+id/back_iv"
|
||||
@@ -23,33 +23,18 @@
|
||||
android:src="@mipmap/push_colose_img"
|
||||
android:scaleType="centerInside"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/user_type_tv"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:drawableLeft="@mipmap/push_show_type_img"
|
||||
android:text="@string/all_visible_txt"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:layout_centerVertical="true"
|
||||
android:maxLength="200"
|
||||
android:layout_toRightOf="@id/back_iv"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:drawableRight="@mipmap/push_quanxian_img" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/push_bt"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/button_false_bg"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/button_false_bg_yl"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@string/push_voom_txt"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:layout_centerVertical="true"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="14sp"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<View
|
||||
@@ -72,7 +57,7 @@
|
||||
android:padding="15dp"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_number_tv"
|
||||
@@ -85,13 +70,14 @@
|
||||
android:maxLength="200"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:visibility="gone"
|
||||
android:background="@color/color_d8d8d8"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -121,6 +107,8 @@
|
||||
android:hint="添加位置信息" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recylerview1"
|
||||
android:background="@color/white"
|
||||
@@ -128,7 +116,44 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="13dp"
|
||||
android:paddingTop="@dimen/dp_25"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:paddingRight="13dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/user_type_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="谁可以看"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_weight="1"
|
||||
android:textStyle="bold"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:drawableLeft="@mipmap/push_show_type_img_yl"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/user_type_tv"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:text="@string/all_visible_txt"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:layout_centerVertical="true"
|
||||
android:maxLength="200"
|
||||
android:layout_toRightOf="@id/back_iv"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:drawableRight="@drawable/ic_frame_mine_right_arrow" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -239,7 +239,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="15dp"
|
||||
android:text="元"
|
||||
android:text=""
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="16sp"
|
||||
android:visibility="visible" />
|
||||
|
||||
@@ -79,10 +79,9 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:background="@color/white"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
@@ -100,11 +99,10 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="58dp"
|
||||
android:background="@drawable/cornor_stroke_thempink_gray"
|
||||
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginTop="7.5dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:background="@drawable/cornor_stroke_thempink_gray"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -112,7 +110,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:text="¥"
|
||||
android:text=""
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
@@ -120,7 +118,6 @@
|
||||
android:id="@+id/edit_query_et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/transparent"
|
||||
android:digits="0123456789"
|
||||
@@ -132,15 +129,15 @@
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textColorHint="#BCBCBC"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/all_tx_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全部提现"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:id="@+id/all_tx_tv"
|
||||
android:text="全部提现"
|
||||
android:textColor="#ff4482ff"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@@ -152,159 +149,136 @@
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/show_yuji_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="预计到账金额:"
|
||||
android:id="@+id/show_yuji_tv"
|
||||
android:visibility="invisible"
|
||||
android:layout_margin="@dimen/dp_15"
|
||||
android:text="预计到账金额:"
|
||||
android:textColor="#ff383838"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:background="#EEF0F7"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:text="提现方式"
|
||||
android:textColor="@color/color_383838"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
<RadioGroup
|
||||
android:id="@+id/radio_rg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:orientation="horizontal">
|
||||
<RadioButton
|
||||
android:id="@+id/rb_bank"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:button="@drawable/radio_button"
|
||||
android:text=" 银行卡"
|
||||
android:textSize="14sp"
|
||||
android:checked="true"
|
||||
android:textColor="@color/color_383838"/>
|
||||
<RadioButton
|
||||
android:id="@+id/rb_wechat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:button="@drawable/radio_button"
|
||||
android:text=" 微信"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/color_383838"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_alipay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:button="@drawable/radio_button"
|
||||
android:text=" 支付宝"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_383838"/>
|
||||
<RadioButton
|
||||
android:id="@+id/rb_usdt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:gravity="center_vertical|right"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:button="@drawable/radio_button"
|
||||
android:text=" USDT"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/color_383838"/>
|
||||
</RadioGroup>
|
||||
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:id="@+id/recycler_installment"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_7"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_7"-->
|
||||
<!-- android:visibility="visible" />-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/shoukuan_bt"
|
||||
style="@style/settings_item_bg_group_full_20191"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:drawablePadding="@dimen/dp_15"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择银行卡"
|
||||
android:textColorHint="#999999"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:drawableRightCompat="@drawable/ic_frame_mine_right_arrow" />
|
||||
</LinearLayout>
|
||||
android:visibility="invisible" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:background="#D8D8D8" />
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:background="#EEF0F7" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_weight="1"
|
||||
android:text="提现方式"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:text="USDT(TRC20)"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/wallet_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/cornor_stroke_thempink_gray"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:text="钱包地址:"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wallet_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:text="dklgjksdlangklasdfnghklfjasdkgjasdkfjgjakdjsgklasdkjkdajgk"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/to_bind_bt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:background="@drawable/cornor_thempink_12dp"
|
||||
android:gravity="center"
|
||||
android:text="绑定USDT"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:text="提现说明:"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tips_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:lineSpacingExtra="@dimen/dp_4"
|
||||
android:text="单笔提现手续费2元\n提现费率0.5%\n预计到账时间2小时以内"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:text="单笔提现手续费2\n提现费率0.5%\n预计到账时间2小时以内"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/tixian_bt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:background="@mipmap/start_reg1"
|
||||
android:background="@drawable/cornor_thempink_12dp1"
|
||||
android:gravity="center"
|
||||
android:text="立即提现"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:text="¥"
|
||||
android:text=""
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp" />
|
||||
|
||||
@@ -129,7 +129,6 @@
|
||||
android:id="@+id/edit_query_et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/transparent"
|
||||
android:digits="0123456789"
|
||||
@@ -203,17 +202,16 @@
|
||||
android:background="#EEF0F4"/>
|
||||
|
||||
|
||||
<com.hbl.yuliao.widget.CircleImageView
|
||||
<ImageView
|
||||
android:id="@+id/usdt_addr_iv"
|
||||
android:layout_width="@dimen/dp_255"
|
||||
android:layout_height="@dimen/dp_255"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"
|
||||
android:padding="2dp"
|
||||
android:padding="10dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@drawable/usdt_qr_bg_new"
|
||||
android:src="@mipmap/add_img_wallet"
|
||||
app:ease_radius="@dimen/dp_10"
|
||||
app:es_shape_type="rectangle" />
|
||||
/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
android:id="@+id/iv_jinbi_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="元"
|
||||
android:text=""
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="@dimen/sp_16"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/user_true"
|
||||
android:background="#EEF0F7"
|
||||
android:fitsSystemWindows="false"
|
||||
android:id="@+id/big_bg"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
@@ -77,7 +77,6 @@
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_weight="1"
|
||||
android:text="11111111111111"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="20sp" />
|
||||
|
||||
@@ -109,7 +108,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:visibility="visible">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -146,7 +145,33 @@
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/private_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_72"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage">
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:background="#EEF0F7" />
|
||||
<Button
|
||||
android:id="@+id/private_tv"
|
||||
style="@style/settings_item_bg_group_full_20191"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:drawablePadding="@dimen/dp_15"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/dongtai_txt"
|
||||
android:textColor="@color/color_2c2c2c"
|
||||
android:textSize="16sp"
|
||||
app:drawableRightCompat="@drawable/ic_frame_mine_right_arrow" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -158,33 +183,6 @@
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/private_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage">
|
||||
|
||||
<Button
|
||||
android:id="@+id/private_tv"
|
||||
style="@style/settings_item_bg_group_full_20191"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:drawablePadding="@dimen/dp_15"
|
||||
android:drawableTint="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/voom_txt"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:drawableRightCompat="@drawable/ic_frame_mine_right_arrow" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
@@ -273,6 +271,7 @@
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bot_line_0"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp" />
|
||||
</LinearLayout>
|
||||
@@ -302,6 +301,7 @@
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bot_line_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp" />
|
||||
</LinearLayout>
|
||||
@@ -355,8 +355,9 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/bot_line_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp" />
|
||||
android:layout_height="0dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -135,7 +135,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24sp"
|
||||
android:gravity="bottom"
|
||||
android:text="元"
|
||||
android:text=""
|
||||
android:textColor="#2C2C2C"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
@@ -200,7 +200,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24sp"
|
||||
android:gravity="bottom"
|
||||
android:text="元"
|
||||
android:text=""
|
||||
android:textColor="#2C2C2C"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@color/transparent"
|
||||
app:tabIndicator="@drawable/tab_line1"
|
||||
app:tabIndicatorColor="@color/color_6b3689"
|
||||
app:tabIndicatorColor="@color/color_themepink"
|
||||
app:tabIndicatorHeight="11dp"
|
||||
app:tabMaxWidth="@dimen/dp_60"
|
||||
app:tabMinWidth="@dimen/dp_60"
|
||||
|
||||
@@ -19,17 +19,22 @@
|
||||
<ImageView
|
||||
android:id="@+id/colose_iv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@mipmap/dialog_colose_img" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:background="#EEF0F7"
|
||||
android:layout_below="@id/colose_iv"
|
||||
android:id="@+id/lins"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/qrcode_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/vvv"
|
||||
android:layout_below="@id/lins"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_5"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="220dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg2"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
@@ -16,8 +16,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/all_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_height="84dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/dp_15"
|
||||
@@ -33,18 +32,17 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:text="@string/all_visible_txt"
|
||||
android:id="@+id/all_visible_tv"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:text="@string/all_visible_des_txt"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="#7E7E7E"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
@@ -58,15 +56,13 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:visibility="visible"
|
||||
android:background="#F4F4F4" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/haoyou_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_height="84dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/dp_15"
|
||||
@@ -82,19 +78,18 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:id="@+id/friend_visible_tv"
|
||||
|
||||
android:text="@string/friend_visible_txt"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:text="@string/friend_visible_des_txt"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="#7E7E7E"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
@@ -109,14 +104,12 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:background="#F4F4F4" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ziji_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_height="84dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/dp_15"
|
||||
@@ -125,13 +118,12 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/onlyme_visible_tv"
|
||||
android:text="@string/onlyme_visible_txt"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="16sp" />
|
||||
<ImageView
|
||||
android:id="@+id/onlyme_visible_iv"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -140,6 +132,25 @@
|
||||
android:src="@mipmap/dialog_duigou_img"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:background="#F4F4F4" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="84dp"
|
||||
android:background="@color/white"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:id="@+id/cancel_tv"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:id="@+id/video_tag"
|
||||
android:layout_alignParentRight="true"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/circle_video_img"/>
|
||||
</RelativeLayout>
|
||||
@@ -76,7 +77,7 @@
|
||||
android:lines="1"
|
||||
android:singleLine="true"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/color_7f7b81"
|
||||
android:textColor="@color/m00_text_black_333333_color"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
<ImageView
|
||||
@@ -93,7 +94,7 @@
|
||||
android:id="@+id/like_number_tv"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="14sp"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:id="@+id/kefu_iv"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/b_kefu"/>
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
android:id="@+id/big_ry"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/color_f7f7f7"
|
||||
android:background="#EEF0F7"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
@@ -15,7 +15,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible"
|
||||
app:srlAccentColor="@color/color_6b3689">
|
||||
app:srlAccentColor="@color/color_498afa">
|
||||
|
||||
<com.hbl.yuliao.widget.BezierCircleHeader
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -610,6 +610,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:textStyle="bold"
|
||||
android:text="我的钱包"
|
||||
android:textColor="#FFE396"
|
||||
android:textSize="14sp" />
|
||||
|
||||
@@ -36,4 +36,5 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -11,24 +11,26 @@
|
||||
android:background="@color/color_f7f7f7"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.hbl.yuliao.widget.StatusLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/quan_bg"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_height="?actionBarSize">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@color/transparent"
|
||||
app:tabIndicator="@drawable/tab_line1"
|
||||
app:tabIndicatorColor="@color/color_c9a3e6"
|
||||
app:tabIndicatorHeight="11dp"
|
||||
app:tabIndicatorColor="@color/color_themeblue"
|
||||
app:tabIndicatorHeight="4dp"
|
||||
app:tabBackground="@color/transparent"
|
||||
app:tabMaxWidth="@dimen/dp_60"
|
||||
app:tabMinWidth="@dimen/dp_60"
|
||||
@@ -39,42 +41,41 @@
|
||||
app:tabRippleColor="@null"
|
||||
app:tabSelectedTextColor="@color/color_333333"
|
||||
app:tabTextAppearance="@style/MyBgTablayoutstyle"
|
||||
app:tabTextColor="@color/color_7f7b81" />
|
||||
app:tabTextColor="@color/color_80333333" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add_cir_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:src="@mipmap/cir_not_img"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="45dp"
|
||||
android:src="@mipmap/cir_not_img1"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_5" />
|
||||
android:layout_marginRight="@dimen/dp_15" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/not_cir_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="45dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:layout_toLeftOf="@id/add_cir_iv"
|
||||
android:src="@mipmap/add_cir_img" />
|
||||
android:src="@mipmap/add_cir_img1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_alarms_list_item_flagNumView"
|
||||
style="@style/text_view_number_style"
|
||||
android:layout_gravity="top|right"
|
||||
android:layout_marginBottom="0dip"
|
||||
android:layout_alignRight="@id/not_cir_iv"
|
||||
android:layout_marginLeft="0dip"
|
||||
android:layout_marginRight="2dip"
|
||||
android:layout_alignTop="@id/not_cir_iv"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="1"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/huifu_txt"
|
||||
android:textColor="#ff6b3689"
|
||||
android:textColor="@color/color_themepink"
|
||||
android:id="@+id/rep_tv"
|
||||
android:layout_toRightOf="@id/time_tv"
|
||||
android:layout_alignTop="@id/time_tv"
|
||||
|
||||
BIN
app/src/main/res/mipmap-xxhdpi/add_cir_img1.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/cir_not_img1.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/push_show_type_img_yl.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/quan_bg.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -98,6 +98,7 @@
|
||||
<string name="shouye_txt">首页</string>
|
||||
<string name="chat_txt">聊天</string>
|
||||
<string name="voom_txt">商城</string>
|
||||
<string name="dongtai_txt">短影音</string>
|
||||
<string name="wallet_txt">钱包</string>
|
||||
<string name="usercenter_txt">个人中心</string>
|
||||
<string name="login_txt">登录</string>
|
||||
@@ -111,6 +112,7 @@
|
||||
<string name="yinsizhengche_txt">隐私政策</string>
|
||||
<string name="taiwan_txt">台湾</string>
|
||||
<string name="zhongguo_txt">中国</string>
|
||||
<string name="mlxy_txt">马来西亚</string>
|
||||
<string name="riben_txt">日本</string>
|
||||
<string name="srndsjh_txt">输入您的手机号</string>
|
||||
<string name="qsrsjh_txt">请输入手机号</string>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<style name="MyBgTablayoutstyle" parent="Base.Widget.Design.TabLayout">
|
||||
|
||||
<item name="android:textSize">@dimen/sp_16</item>
|
||||
<item name="android:textSize">@dimen/sp_18</item>
|
||||
</style>
|
||||
<style name="check_box_big_style1">
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
|
||||