迁移仓库
@@ -13,16 +13,10 @@ Already a pro? Just edit this README.md and make it your own. Want to make it ea
|
|||||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||||
|
|
||||||
```
|
`
|
||||||
cd existing_repo
|
|
||||||
git remote add origin http://git.dengshikj.com/xuhuixiang/lewan_android.git
|
|
||||||
git branch -M master
|
|
||||||
git push -uf origin master
|
|
||||||
```
|
|
||||||
|
|
||||||
## Integrate with your tools
|
## Integrate with your tools
|
||||||
|
|
||||||
- [ ] [Set up project integrations](http://git.dengshikj.com/xuhuixiang/lewan_android/-/settings/integrations)
|
|
||||||
|
|
||||||
## Collaborate with your team
|
## Collaborate with your team
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ android {
|
|||||||
applicationId = "com.hbl.yuliao"
|
applicationId = "com.hbl.yuliao"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 33
|
targetSdk = 33
|
||||||
versionCode = 217
|
versionCode = 102
|
||||||
versionName = "2.1.7"
|
versionName = "1.0.2"
|
||||||
multiDexEnabled = true
|
multiDexEnabled = true
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
manifestPlaceholders["IMAPPKEY"] = "23c9cbddd4b876908efdccd0a6f2638d" //正式
|
manifestPlaceholders["IMAPPKEY"] = "4a2fd910e1dd63ece3b80a0b371af93f" //正式
|
||||||
|
|
||||||
manifestPlaceholders["JPUSH_PKGNAME"] = "com.hbl.yuliao"
|
manifestPlaceholders["JPUSH_PKGNAME"] = "com.hbl.yuliao"
|
||||||
manifestPlaceholders["JPUSH_APPKEY"] = "9041bc22de91e3d9af3cfd23"
|
manifestPlaceholders["JPUSH_APPKEY"] = "9041bc22de91e3d9af3cfd23"
|
||||||
@@ -61,6 +61,7 @@ android {
|
|||||||
ndk {
|
ndk {
|
||||||
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
||||||
// abiFilters += listOf("x86","x86_64","armeabi","armeabi-v7a","arm64-v8a")
|
// abiFilters += listOf("x86","x86_64","armeabi","armeabi-v7a","arm64-v8a")
|
||||||
|
// abiFilters += listOf("armeabi-v7a")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,12 +99,12 @@ android {
|
|||||||
buildConfigField(
|
buildConfigField(
|
||||||
"String",
|
"String",
|
||||||
"AREA_CODE",
|
"AREA_CODE",
|
||||||
"\"+86\""
|
"\"+60\""
|
||||||
)
|
)
|
||||||
// manifestPlaceholders["APPICON"] = "@mipmap/ic_launche" //正式
|
// manifestPlaceholders["APPICON"] = "@mipmap/ic_launche" //正式
|
||||||
// manifestPlaceholders["APPICON_ROUND"] = "@mipmap/ic_launche_round" //正式
|
// manifestPlaceholders["APPICON_ROUND"] = "@mipmap/ic_launche_round" //正式
|
||||||
//正式服
|
//正式服
|
||||||
manifestPlaceholders["IMAPPKEY"] = "23c9cbddd4b876908efdccd0a6f2638d" //正式
|
manifestPlaceholders["IMAPPKEY"] = "4a2fd910e1dd63ece3b80a0b371af93f" //正式
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,12 +126,12 @@ android {
|
|||||||
buildConfigField(
|
buildConfigField(
|
||||||
"String",
|
"String",
|
||||||
"AREA_CODE",
|
"AREA_CODE",
|
||||||
"\"+86\""
|
"\"+60\""
|
||||||
)
|
)
|
||||||
// manifestPlaceholders["APPICON"] = "@mipmap/ic_launche" //正式
|
// manifestPlaceholders["APPICON"] = "@mipmap/ic_launche" //正式
|
||||||
// manifestPlaceholders["APPICON_ROUND"] = "@mipmap/ic_launche_round" //正式
|
// manifestPlaceholders["APPICON_ROUND"] = "@mipmap/ic_launche_round" //正式
|
||||||
|
|
||||||
manifestPlaceholders["IMAPPKEY"] = "23c9cbddd4b876908efdccd0a6f2638d"
|
manifestPlaceholders["IMAPPKEY"] = "4a2fd910e1dd63ece3b80a0b371af93f"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -195,7 +196,15 @@ dependencies {
|
|||||||
implementation(project(":fingermanager"))
|
implementation(project(":fingermanager"))
|
||||||
// implementation(project(":call_sw"))
|
// implementation(project(":call_sw"))
|
||||||
|
|
||||||
implementation("com.netease.yunxin.kit.call:call-ui:1.8.2") //呼叫组件 UI 包
|
implementation("com.netease.yunxin.kit.call:call-ui:1.8.2"){
|
||||||
|
|
||||||
|
exclude(group = "com.netease.nimlib")
|
||||||
|
exclude(group = "com.netease.yunxin", module = "nertc-base")
|
||||||
|
}
|
||||||
|
implementation ("com.netease.yunxin.kit.call:call:1.8.2") // 基础组件包,不含UI 集成时请导入这个包
|
||||||
|
|
||||||
|
// implementation("com.netease.yunxin.kit.call:call-ui:2.1.0") // 含 UI 集成时,请导入这个包
|
||||||
|
|
||||||
api("com.netease.nimlib:avsignalling:9.11.0") //呼叫组件 依赖信令包
|
api("com.netease.nimlib:avsignalling:9.11.0") //呼叫组件 依赖信令包
|
||||||
api("com.netease.nimlib:basesdk:9.11.0") //IM SDK
|
api("com.netease.nimlib:basesdk:9.11.0") //IM SDK
|
||||||
// api("com.netease.nimlib:push:9.19.11")
|
// api("com.netease.nimlib:push:9.19.11")
|
||||||
@@ -263,7 +272,7 @@ dependencies {
|
|||||||
implementation("com.github.iwgang:simplifyspan:2.1")
|
implementation("com.github.iwgang:simplifyspan:2.1")
|
||||||
// implementation("io.github.hariprasanths:bounceview-android:0.2.0")
|
// implementation("io.github.hariprasanths:bounceview-android:0.2.0")
|
||||||
// implementation("com.contrarywind:Android-PickerView:4.1.9")
|
// implementation("com.contrarywind:Android-PickerView:4.1.9")
|
||||||
// implementation("com.aliyun.dpa:oss-android-sdk:2.9.13")
|
implementation("com.aliyun.dpa:oss-android-sdk:2.9.13")
|
||||||
implementation("com.github.jenly1314:zxing-lite:2.1.1")
|
implementation("com.github.jenly1314:zxing-lite:2.1.1")
|
||||||
implementation("com.blankj:utilcodex:1.31.0")
|
implementation("com.blankj:utilcodex:1.31.0")
|
||||||
implementation("com.github.jenly1314.AppUpdater:app-updater:1.1.3")
|
implementation("com.github.jenly1314.AppUpdater:app-updater:1.1.3")
|
||||||
|
|||||||
12
app/proguard-rules.pro
vendored
@@ -204,3 +204,15 @@
|
|||||||
-keep class io.agora.**{*;}
|
-keep class io.agora.**{*;}
|
||||||
-dontwarn io.agora.**
|
-dontwarn io.agora.**
|
||||||
|
|
||||||
|
-keep class com.netease.mobsec.** {*;}
|
||||||
|
|
||||||
|
# NERTC SDK 的类
|
||||||
|
-keep class com.netease.lava.** {*;}
|
||||||
|
-keep class com.netease.yunxin.** {*;}
|
||||||
|
|
||||||
|
# 呼叫组件的类
|
||||||
|
-dontwarn com.netease.yunxin.kit.**
|
||||||
|
-keep class com.netease.yunxin.kit.** {*;}
|
||||||
|
-keep public class * extends com.netease.yunxin.kit.corekit.XKitInitOptions
|
||||||
|
-keep class * implements com.netease.yunxin.kit.corekit.XKitService {*;}
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 217,
|
"versionCode": 102,
|
||||||
"versionName": "2.1.7",
|
"versionName": "1.0.2",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -159,7 +159,7 @@
|
|||||||
<data
|
<data
|
||||||
android:host="time_go_mm"
|
android:host="time_go_mm"
|
||||||
android:path="/add_user"
|
android:path="/add_user"
|
||||||
android:scheme="timego" />
|
android:scheme="yuliao" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
<data
|
<data
|
||||||
android:host="time_go_mm"
|
android:host="time_go_mm"
|
||||||
android:path="/join_group"
|
android:path="/join_group"
|
||||||
android:scheme="timego" />
|
android:scheme="yuliao" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
<data
|
<data
|
||||||
android:host="time_go_mm"
|
android:host="time_go_mm"
|
||||||
android:path="/scan_score"
|
android:path="/scan_score"
|
||||||
android:scheme="timego" />
|
android:scheme="yuliao" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
@@ -198,7 +198,6 @@
|
|||||||
<service
|
<service
|
||||||
android:name="com.netease.nimlib.service.NimService"
|
android:name="com.netease.nimlib.service.NimService"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|
||||||
android:process=":core" />
|
android:process=":core" />
|
||||||
|
|
||||||
<service
|
<service
|
||||||
@@ -279,7 +278,7 @@
|
|||||||
android:name=".contact.UserInfoActivity"
|
android:name=".contact.UserInfoActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppThemeStart">
|
android:theme="@style/SampleTheme_new">
|
||||||
|
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
@@ -359,7 +358,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".main.mine.UserInfoActivity"
|
android:name=".main.mine.UserInfoActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:theme="@style/AppThemeStart"
|
android:theme="@style/SampleTheme_new"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|||||||
@@ -281,6 +281,8 @@ public class IMApplication extends MultiDexApplication {
|
|||||||
|
|
||||||
private void initUIKit() {
|
private void initUIKit() {
|
||||||
SDKOptions sdkOptions = NimSDKOptionConfig.getSDKOptions(this, DataUtils.readAppKey(this));
|
SDKOptions sdkOptions = NimSDKOptionConfig.getSDKOptions(this, DataUtils.readAppKey(this));
|
||||||
|
// SDKOptions sdkOptions = options();
|
||||||
|
|
||||||
IMKitClient.init(this, getLoginInfo(), sdkOptions);
|
IMKitClient.init(this, getLoginInfo(), sdkOptions);
|
||||||
ALog.d(Constant.PROJECT_TAG, TAG, "initUIKit");
|
ALog.d(Constant.PROJECT_TAG, TAG, "initUIKit");
|
||||||
|
|
||||||
@@ -325,7 +327,7 @@ public class IMApplication extends MultiDexApplication {
|
|||||||
private SDKOptions options() {
|
private SDKOptions options() {
|
||||||
SDKOptions options = new SDKOptions();
|
SDKOptions options = new SDKOptions();
|
||||||
//此处仅设置appkey,其他设置请自行参看信令文档设置 :https://dev.yunxin.163.com/docs/product/信令/SDK开发集成/Android开发集成/初始化
|
//此处仅设置appkey,其他设置请自行参看信令文档设置 :https://dev.yunxin.163.com/docs/product/信令/SDK开发集成/Android开发集成/初始化
|
||||||
options.appKey = "23c9cbddd4b876908efdccd0a6f2638d";
|
options.appKey = "4a2fd910e1dd63ece3b80a0b371af93f";
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ public class IMUIKitConfig {
|
|||||||
|
|
||||||
public static String LOC_COUNTRY_CODE = "loc_country_code";
|
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_PRIVACY_CN_URL = "https://download.niuchat.xyz/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_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;
|
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 = 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.yuliao666.top/#/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://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_OLD = "http://admin.niuchat.xyz/#/downLoad";
|
||||||
public static String SHARE_INVCODE_START = "http://admin.yuliao666.top/#/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 二维码
|
* 分享用户ID 二维码
|
||||||
@@ -77,9 +80,9 @@ public class IMUIKitConfig {
|
|||||||
public static String SHARE_ATM_SAVE_CODE = "time_go_mm://payment_atm/%s";
|
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";
|
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;
|
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.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 = 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.yuliao666.top/#/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=" ;
|
// 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.common.auth.OSSStsTokenCredentialProvider;
|
||||||
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||||
//import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
//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.Glide;
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
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.ActivityTransferInfoBinding;
|
||||||
import com.hbl.yuliao.databinding.ReportActivityBinding;
|
import com.hbl.yuliao.databinding.ReportActivityBinding;
|
||||||
import com.hbl.yuliao.model.AlbumBean;
|
import com.hbl.yuliao.model.AlbumBean;
|
||||||
|
import com.hbl.yuliao.model.AvaterBean;
|
||||||
import com.hbl.yuliao.model.GroupActionBean;
|
import com.hbl.yuliao.model.GroupActionBean;
|
||||||
import com.hbl.yuliao.model.ReportBean;
|
import com.hbl.yuliao.model.ReportBean;
|
||||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||||
@@ -261,57 +270,108 @@ public class ReportActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String stsCredentialsBean;
|
StsCredentialsBean stsCredentialsBean;
|
||||||
|
String stsCredentialsBean1;
|
||||||
|
|
||||||
private void toShangchuanAli() {
|
private void toShangchuanAli() {
|
||||||
showLoadingDialog();
|
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())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<>() {
|
.subscribe(new BaseObserver<Result<AvaterBean>>() {
|
||||||
@Override
|
|
||||||
public void onSuccess(Result<String> feedbackResp) {
|
|
||||||
stsCredentialsBean = feedbackResp.data;
|
|
||||||
// toAliYunOss(file, isHead);
|
|
||||||
toUpdateOssNew(0);
|
|
||||||
|
|
||||||
|
@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
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
dimessLoadingDialog();
|
dimessLoadingDialog();
|
||||||
|
ToastX.showShortToast(msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void toAliYunOss() {
|
|
||||||
// String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
private void toAliYunOss() {
|
||||||
// String accessKeyId = "stsCredentialsBean.getAccessKeyId()";
|
String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||||
// String accessKeySecret = "stsCredentialsBean.getAccessKeySecret()";
|
String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||||
// String securityToken = "stsCredentialsBean.getSecurityToken()";
|
String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||||
// String bucketName = IMUIKitConfig.bucketName;
|
String securityToken = stsCredentialsBean.getSecurityToken();
|
||||||
//
|
String bucketName = IMUIKitConfig.bucketName;
|
||||||
// OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
|
||||||
// OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||||
// toUpdateOss(bucketName, 0, oss);
|
OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||||
//
|
toUpdateOss(bucketName, 0, oss);
|
||||||
// }
|
|
||||||
|
}
|
||||||
//
|
//
|
||||||
private void toUpdateOssNew( int i) {
|
private void toUpdateOssNew( int i) {
|
||||||
String updatePathPic = "report";
|
String updatePathPic = "report";
|
||||||
@@ -335,7 +395,7 @@ public class ReportActivity extends BaseActivity {
|
|||||||
byte[] sss = convertFileToBytes(file);
|
byte[] sss = convertFileToBytes(file);
|
||||||
LogUtils.i("结果是啥开始:" + sss);
|
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(info));
|
||||||
LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(response));
|
LogUtils.i("结果是啥2:" + GsonUtils.beanToJSONString(response));
|
||||||
dimessLoadingDialog();
|
dimessLoadingDialog();
|
||||||
@@ -381,69 +441,69 @@ public class ReportActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
||||||
// String updatePathPic = "report";
|
String updatePathPic = "report";
|
||||||
//// Calendar calendar= Calendar.getInstance();
|
// Calendar calendar= Calendar.getInstance();
|
||||||
//// String year = calendar.get(Calendar.YEAR)+"";
|
// 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 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 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());
|
String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||||
// if (i < uris.size()) {
|
if (i < uris.size()) {
|
||||||
//
|
|
||||||
// File file = new File(uriStrings.get(i));
|
File file = new File(uriStrings.get(i));
|
||||||
// String fileName = System.currentTimeMillis() + "_" + file.getName();
|
String fileName = System.currentTimeMillis() + "_" + file.getName();
|
||||||
// // 构造上传请求。
|
// 构造上传请求。
|
||||||
// PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPic + "/" + data + "/" + fileName + ".png", localMedias.get(i).getRealPath());
|
PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + updatePathPic + "/" + data + "/" + fileName + ".png", localMedias.get(i).getRealPath());
|
||||||
//
|
|
||||||
//
|
|
||||||
// put.setProgressCallback((request, currentSize, totalSize) -> {
|
put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||||
// LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||||
//// if(isVideo){
|
// if(isVideo){
|
||||||
//// showLoadingDialog(("正在上传"+(currentSize*100)/totalSize)+"%");
|
// 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);
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
});
|
||||||
// dimessLoadingDialog();
|
|
||||||
// LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
//OSSAsyncTask task =
|
||||||
//
|
oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||||
// // 请求异常。
|
@Override
|
||||||
// if (clientExcepion != null) {
|
public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||||
// // 本地异常,如网络异常等。
|
LogUtils.i("PutObject", "UploadSuccess");
|
||||||
// clientExcepion.printStackTrace();
|
LogUtils.i("ETag", result.getETag());
|
||||||
// }
|
LogUtils.i("RequestId", result.getRequestId());
|
||||||
// if (serviceException != null) {
|
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||||
// // 服务异常。
|
outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + updatePathPic + "/" + data + "/" + fileName + ".png");
|
||||||
// LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||||
// LogUtils.i("RequestId", serviceException.getRequestId());
|
if (i == uris.size() - 1) {
|
||||||
// LogUtils.i("HostId", serviceException.getHostId());
|
sumbit();
|
||||||
// LogUtils.i("RawMessage", serviceException.getRawMessage());
|
} 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() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
package com.hbl.yuliao.contact;
|
package com.hbl.yuliao.contact;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Rect;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
@@ -23,6 +29,7 @@ import androidx.activity.result.ActivityResultLauncher;
|
|||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.AppCompatImageView;
|
import androidx.appcompat.widget.AppCompatImageView;
|
||||||
|
import androidx.core.view.WindowCompat;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
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.adapter.ViewHolder;
|
||||||
import com.hbl.yuliao.databinding.ActivityUserInfoBinding;
|
import com.hbl.yuliao.databinding.ActivityUserInfoBinding;
|
||||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
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.EditFriendUserInfoActivity;
|
||||||
import com.hbl.yuliao.main.mine.EditUserInfoActivity;
|
import com.hbl.yuliao.main.mine.EditUserInfoActivity;
|
||||||
import com.hbl.yuliao.main.mine.photo.UserPhotoListActivity;
|
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.im.utils.RouterConstant;
|
||||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||||
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
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.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -87,6 +97,7 @@ import java.util.Map;
|
|||||||
//import io.agora.onetoone.http.HttpManager;
|
//import io.agora.onetoone.http.HttpManager;
|
||||||
//import io.agora.onetoone.model.EnterRoomInfoModel;
|
//import io.agora.onetoone.model.EnterRoomInfoModel;
|
||||||
//import io.agora.onetoone.utils.SPUtil;
|
//import io.agora.onetoone.utils.SPUtil;
|
||||||
|
import cc.shinichi.library.ImagePreview;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
import kotlin.Unit;
|
import kotlin.Unit;
|
||||||
@@ -106,30 +117,75 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
private int isAllowAdd = 1;
|
private int isAllowAdd = 1;
|
||||||
|
|
||||||
|
|
||||||
public static String kIsRtm = "isRtm";
|
public static String kIsRtm = "isRtm";
|
||||||
public static String kIsShowMode = "isShowMode";
|
public static String kIsShowMode = "isShowMode";
|
||||||
public static String kIsBrodCaster = "isBrodCaster";
|
public static String kIsBrodCaster = "isBrodCaster";
|
||||||
public static String kLocalUid = "localUid";
|
public static String kLocalUid = "localUid";
|
||||||
public static String kOwnerUid = "ownerUid";
|
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
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
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) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
getWindow().setDecorFitsSystemWindows(false);
|
getWindow().setDecorFitsSystemWindows(false);
|
||||||
} else {
|
} 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);
|
||||||
}
|
}
|
||||||
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);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
|
||||||
viewBinding = ActivityUserInfoBinding.inflate(getLayoutInflater());
|
viewBinding = ActivityUserInfoBinding.inflate(getLayoutInflater());
|
||||||
|
|
||||||
setContentView(viewBinding.getRoot());
|
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();
|
initView();
|
||||||
initData();
|
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) {
|
private void loadData(String account) {
|
||||||
@@ -335,10 +413,15 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isVideoCall){
|
if (isVideoCall) {
|
||||||
ChatUtils.startVideoCall(UserInfoActivity.this, userInfoData.data.getAccount());
|
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());
|
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);
|
// SPUtil.putBoolean(UserInfoActivity.kIsRtm, true);
|
||||||
@@ -675,7 +758,6 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
|
|
||||||
cancelFollow(userInfoData.data.getAccount());
|
cancelFollow(userInfoData.data.getAccount());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeUser() {
|
private void changeUser() {
|
||||||
@@ -770,7 +852,9 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
EditUserInfoActivity.launch(getApplicationContext(), Constant.EDIT_SIGN, launcher);
|
EditUserInfoActivity.launch(getApplicationContext(), Constant.EDIT_SIGN, launcher);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
viewBinding.privateTv.setOnClickListener(v -> {
|
||||||
|
getDateList();
|
||||||
|
});
|
||||||
viewModel.init(accId);
|
viewModel.init(accId);
|
||||||
viewModel
|
viewModel
|
||||||
.getFriendFetchResult()
|
.getFriendFetchResult()
|
||||||
@@ -853,6 +937,11 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
}
|
||||||
|
|
||||||
private List<UserAlbumBean> userAlbumBeans = new ArrayList<>();
|
private List<UserAlbumBean> userAlbumBeans = new ArrayList<>();
|
||||||
CommonAdapter commonAdapterAlbum;
|
CommonAdapter commonAdapterAlbum;
|
||||||
|
|
||||||
@@ -916,6 +1005,30 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
.error(R.mipmap.default_head_img)
|
.error(R.mipmap.default_head_img)
|
||||||
.apply(requestOptions).into(viewBinding.logoIv);
|
.apply(requestOptions).into(viewBinding.logoIv);
|
||||||
viewBinding.btnAlbum.setText(getString(R.string.userphoto_title, getString(R.string.wo_txt)));
|
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 {
|
} else {
|
||||||
if (userInfoData.isFriend && !userInfoData.isBlack) {
|
if (userInfoData.isFriend && !userInfoData.isBlack) {
|
||||||
viewBinding.friendLy.setVisibility(View.VISIBLE);
|
viewBinding.friendLy.setVisibility(View.VISIBLE);
|
||||||
@@ -938,10 +1051,10 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
|
|
||||||
if (userInfoData.isBlack) {
|
if (userInfoData.isBlack) {
|
||||||
viewBinding.blackLy.setVisibility(View.VISIBLE);
|
viewBinding.blackLy.setVisibility(View.VISIBLE);
|
||||||
viewBinding.botLy.setVisibility(View.GONE);
|
viewBinding.privateLl.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
viewBinding.blackLy.setVisibility(View.GONE);
|
viewBinding.blackLy.setVisibility(View.GONE);
|
||||||
viewBinding.botLy.setVisibility(View.VISIBLE);
|
viewBinding.privateLl.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userInfoData.friendInfo != null) {
|
if (userInfoData.friendInfo != null) {
|
||||||
@@ -960,7 +1073,8 @@ public class UserInfoActivity extends BaseActivity {
|
|||||||
viewBinding.bigBg.setBackgroundColor(getColor(R.color.color_eefof7));
|
viewBinding.bigBg.setBackgroundColor(getColor(R.color.color_eefof7));
|
||||||
} else {
|
} else {
|
||||||
viewBinding.broLy.setVisibility(View.GONE);
|
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);
|
onNextCallListener.toType(2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
dialogSelectPushTypeBinding.cancelTv.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
changeType();
|
changeType();
|
||||||
|
|
||||||
Window window = getWindow();
|
Window window = getWindow();
|
||||||
@@ -81,15 +88,15 @@ public class SelectPushTypeDialog extends Dialog {
|
|||||||
|
|
||||||
if(type==0){
|
if(type==0){
|
||||||
dialogSelectPushTypeBinding.allVisibleIv.setVisibility(View.VISIBLE);
|
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){
|
}else if(type==1){
|
||||||
dialogSelectPushTypeBinding.friendVisibleIv.setVisibility(View.VISIBLE);
|
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){
|
}else if(type==2){
|
||||||
dialogSelectPushTypeBinding.onlymeVisibleIv.setVisibility(View.VISIBLE);
|
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"}
|
//{"scheme":"time_go_mm://payment_bead/","userId":"10","value":"388a762b474f944b"}
|
||||||
String scheme = qrData.getScheme();
|
String scheme = qrData.getScheme();
|
||||||
if (scheme.startsWith("http")) {
|
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);
|
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://192.168.0.231:8080/");
|
||||||
viewBinding.jsbridgeBridgewebview.loadUrl("http://47.243.153.122:2396/#/");
|
viewBinding.jsbridgeBridgewebview.loadUrl(DataUtils.get(getActivity(), "mall_address", ""));
|
||||||
|
|
||||||
|
|
||||||
viewBinding.jsbridgeBridgewebview.addHandlerLocal("ZeroCard", new BridgeHandler() {
|
viewBinding.jsbridgeBridgewebview.addHandlerLocal("ZeroCard", new BridgeHandler() {
|
||||||
@Override
|
@Override
|
||||||
@@ -198,7 +197,7 @@ public class ShopFragment extends BaseFragment {
|
|||||||
Api.getInstance().authorizeLogin(map)
|
Api.getInstance().authorizeLogin(map)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<Result<AuthorizeBean>>() {
|
.subscribe(new BaseObserver<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<AuthorizeBean> feedbackResp) {
|
public void onSuccess(Result<AuthorizeBean> feedbackResp) {
|
||||||
if (feedbackResp.data != null) {
|
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 实现类
|
* WebChromeClient 实现类
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class ZhuanShuListActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void convert(ViewHolder holder, RedpacketGroupBean s, int index) {
|
public void convert(ViewHolder holder, RedpacketGroupBean s, int index) {
|
||||||
holder.setText(R.id.title_tv,s.getSenderNickname()+"发给我的专属红包");
|
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.setText(R.id.time_tv,""+ s.getSendTime());
|
||||||
|
|
||||||
holder.getView(R.id.item_ry).setOnClickListener(v -> {
|
holder.getView(R.id.item_ry).setOnClickListener(v -> {
|
||||||
|
|||||||
@@ -424,6 +424,8 @@ public class ChongZhiActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.hbl.yuliao.databinding.ActivityPhoneLoginBinding;
|
|||||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||||
import com.hbl.yuliao.dialog.SelectCountryDialog;
|
import com.hbl.yuliao.dialog.SelectCountryDialog;
|
||||||
import com.hbl.yuliao.main.MainActivity;
|
import com.hbl.yuliao.main.MainActivity;
|
||||||
|
import com.hbl.yuliao.model.ConfigBean;
|
||||||
import com.hbl.yuliao.model.CountryBean;
|
import com.hbl.yuliao.model.CountryBean;
|
||||||
import com.hbl.yuliao.model.LoginBean;
|
import com.hbl.yuliao.model.LoginBean;
|
||||||
import com.hbl.yuliao.model.PassWordLoginBean;
|
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.chatkit.ui.common.RxBus;
|
||||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
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.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.common.ui.utils.ToastX;
|
||||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||||
import com.netease.yunxin.kit.corekit.im.login.LoginCallback;
|
import com.netease.yunxin.kit.corekit.im.login.LoginCallback;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import cn.iwgang.simplifyspan.customspan.CustomClickableSpan;
|
import cn.iwgang.simplifyspan.customspan.CustomClickableSpan;
|
||||||
@@ -361,7 +364,7 @@ public class PhoneLoginActivity extends BaseActivity {
|
|||||||
|
|
||||||
PassWordLoginBean passWordLoginBean = new PassWordLoginBean(uidOrMail, loginPsw, countryBean.getAreaCodeName(),
|
PassWordLoginBean passWordLoginBean = new PassWordLoginBean(uidOrMail, loginPsw, countryBean.getAreaCodeName(),
|
||||||
0, GetAndroidUniqueMark.getUniqueId(PhoneLoginActivity.this), IMUIKitConfig.SUBSTATIONID);
|
0, GetAndroidUniqueMark.getUniqueId(PhoneLoginActivity.this), IMUIKitConfig.SUBSTATIONID);
|
||||||
// showLoadingDialog("正在登录……");
|
showLoadingDialog("正在登录……");
|
||||||
Api.getInstance().passwordLogin(passWordLoginBean)
|
Api.getInstance().passwordLogin(passWordLoginBean)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -377,13 +380,13 @@ public class PhoneLoginActivity extends BaseActivity {
|
|||||||
feedbackResp.data.setIsBiz(feedbackResp.data.getUser().getIsBiz());
|
feedbackResp.data.setIsBiz(feedbackResp.data.getUser().getIsBiz());
|
||||||
feedbackResp.data.setAllowGiftCoin(feedbackResp.data.getUser().getAllowGiftCoin());
|
feedbackResp.data.setAllowGiftCoin(feedbackResp.data.getUser().getAllowGiftCoin());
|
||||||
DataUtils.set(PhoneLoginActivity.this, "login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
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
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
// dimessLoadingDialog();
|
dimessLoadingDialog();
|
||||||
// LogUtils.i("获取到的错误:" + code + "" + msg);
|
// LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||||
// WidgetUtils.showToast(LoginActivity.this, msg + "", WidgetUtils.ToastType.ERROR);
|
// WidgetUtils.showToast(LoginActivity.this, msg + "", WidgetUtils.ToastType.ERROR);
|
||||||
ToastX.showShortToast(msg);
|
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() {
|
private void doLogin1() {
|
||||||
hideSoftInput(this);
|
hideSoftInput(this);
|
||||||
|
showLoadingDialog("正在登录……");
|
||||||
Map<String, Object> maps = new HashMap<>();
|
Map<String, Object> maps = new HashMap<>();
|
||||||
maps.put("phone", activityWelcomeBinding.phoneEt.getText().toString());
|
maps.put("phone", activityWelcomeBinding.phoneEt.getText().toString());
|
||||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||||
@@ -421,11 +492,13 @@ public class PhoneLoginActivity extends BaseActivity {
|
|||||||
DataUtils.set(PhoneLoginActivity.this, "login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
DataUtils.set(PhoneLoginActivity.this, "login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
||||||
// loginIM(o.data.getUser_uid(), o.data.getChatToken());
|
// loginIM(o.data.getUser_uid(), o.data.getChatToken());
|
||||||
LogUtils.i("用户信息:" + feedbackResp.data.getUser_uid() + ";;" + feedbackResp.data.getUser().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
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
|
dismissLoading();
|
||||||
ToastX.showShortToast(msg);
|
ToastX.showShortToast(msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -499,12 +572,14 @@ public class PhoneLoginActivity extends BaseActivity {
|
|||||||
new LoginCallback<LoginInfo>() {
|
new LoginCallback<LoginInfo>() {
|
||||||
@Override
|
@Override
|
||||||
public void onError(int errorCode, @NonNull String errorMsg) {
|
public void onError(int errorCode, @NonNull String errorMsg) {
|
||||||
|
dimessLoadingDialog();
|
||||||
ToastX.showShortToast(
|
ToastX.showShortToast(
|
||||||
String.format(getResources().getString(R.string.login_fail), errorCode));
|
String.format(getResources().getString(R.string.login_fail), errorCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(@Nullable LoginInfo data) {
|
public void onSuccess(@Nullable LoginInfo data) {
|
||||||
|
dimessLoadingDialog();
|
||||||
DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, account);
|
DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, account);
|
||||||
DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
||||||
DataUtils.set(PhoneLoginActivity.this,"last_login_time",System.currentTimeMillis());
|
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.common.auth.OSSStsTokenCredentialProvider;
|
||||||
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||||
//import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
//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.Glide;
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
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.dialog.SelectCountryDialog;
|
||||||
import com.hbl.yuliao.main.MainActivity;
|
import com.hbl.yuliao.main.MainActivity;
|
||||||
import com.hbl.yuliao.model.AvaterBean;
|
import com.hbl.yuliao.model.AvaterBean;
|
||||||
|
import com.hbl.yuliao.model.ConfigBean;
|
||||||
import com.hbl.yuliao.model.CountryBean;
|
import com.hbl.yuliao.model.CountryBean;
|
||||||
import com.hbl.yuliao.model.LoginBean;
|
import com.hbl.yuliao.model.LoginBean;
|
||||||
import com.hbl.yuliao.model.PassWordLoginBean;
|
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.GetAndroidUniqueMark;
|
||||||
import com.hbl.yuliao.utils.GsonUtils;
|
import com.hbl.yuliao.utils.GsonUtils;
|
||||||
import com.hbl.yuliao.utils.LogUtils;
|
import com.hbl.yuliao.utils.LogUtils;
|
||||||
|
import com.hbl.yuliao.utils.UpdateUtils;
|
||||||
import com.hbl.yuliao.welcome.WelcomeActivity;
|
import com.hbl.yuliao.welcome.WelcomeActivity;
|
||||||
import com.luck.picture.lib.basic.PictureSelector;
|
import com.luck.picture.lib.basic.PictureSelector;
|
||||||
import com.luck.picture.lib.config.PictureMimeType;
|
import com.luck.picture.lib.config.PictureMimeType;
|
||||||
@@ -119,6 +129,7 @@ import java.io.FileNotFoundException;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@@ -148,6 +159,7 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
String avater = null;
|
String avater = null;
|
||||||
long lastTime =0;
|
long lastTime =0;
|
||||||
PermissionExplainDialog permissionExplainDialog;
|
PermissionExplainDialog permissionExplainDialog;
|
||||||
|
String pathName = "userAvatarFileName";
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||||
@Override
|
@Override
|
||||||
@@ -287,10 +299,8 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
activityWelcomeBinding.areaTv.setText(ApiService.AREA_CODE);
|
activityWelcomeBinding.areaTv.setText(ApiService.AREA_CODE);
|
||||||
|
|
||||||
activityWelcomeBinding.nanIv.setOnClickListener(v -> changeSex(1));
|
activityWelcomeBinding.nanLy.setOnClickListener(v -> changeSex(1));
|
||||||
activityWelcomeBinding.nanTv.setOnClickListener(v -> changeSex(1));
|
activityWelcomeBinding.nvLy.setOnClickListener(v -> changeSex(0));
|
||||||
activityWelcomeBinding.nvIv.setOnClickListener(v -> changeSex(0));
|
|
||||||
activityWelcomeBinding.nvTv.setOnClickListener(v -> changeSex(0));
|
|
||||||
|
|
||||||
AnimUtil.setAnimViews(activityWelcomeBinding.sendSmsTv, activityWelcomeBinding.changePassTv,
|
AnimUtil.setAnimViews(activityWelcomeBinding.sendSmsTv, activityWelcomeBinding.changePassTv,
|
||||||
activityWelcomeBinding.nextIv, activityWelcomeBinding.changeSmsCodeTv, activityWelcomeBinding.areaTv,
|
activityWelcomeBinding.nextIv, activityWelcomeBinding.changeSmsCodeTv, activityWelcomeBinding.areaTv,
|
||||||
@@ -411,6 +421,7 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
|
|
||||||
|
|
||||||
private void phoneRegister() {
|
private void phoneRegister() {
|
||||||
|
showLoadingDialog("注册中…");
|
||||||
Map<String, Object> maps = new HashMap<>();
|
Map<String, Object> maps = new HashMap<>();
|
||||||
maps.put("phone", String.valueOf(activityWelcomeBinding.phoneEt.getText()).trim());
|
maps.put("phone", String.valueOf(activityWelcomeBinding.phoneEt.getText()).trim());
|
||||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||||
@@ -437,6 +448,7 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||||
|
dimessLoadingDialog();
|
||||||
ToastX.showShortToast(msg);
|
ToastX.showShortToast(msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -477,12 +489,13 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
|
|
||||||
DataUtils.set(RegisterActivity.this,"login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
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
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
// dimessLoadingDialog();
|
dimessLoadingDialog();
|
||||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||||
ToastX.showShortToast( 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() {
|
private void toStep2() {
|
||||||
@@ -873,6 +905,7 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
new LoginCallback<LoginInfo>() {
|
new LoginCallback<LoginInfo>() {
|
||||||
@Override
|
@Override
|
||||||
public void onError(int errorCode, @NonNull String errorMsg) {
|
public void onError(int errorCode, @NonNull String errorMsg) {
|
||||||
|
dimessLoadingDialog();
|
||||||
ToastX.showShortToast(
|
ToastX.showShortToast(
|
||||||
String.format(getResources().getString(R.string.login_fail), errorCode));
|
String.format(getResources().getString(R.string.login_fail), errorCode));
|
||||||
}
|
}
|
||||||
@@ -880,7 +913,7 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(@Nullable LoginInfo data) {
|
public void onSuccess(@Nullable LoginInfo data) {
|
||||||
activityWelcomeBinding.getRoot().setVisibility(View.GONE);
|
activityWelcomeBinding.getRoot().setVisibility(View.GONE);
|
||||||
|
dimessLoadingDialog();
|
||||||
DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, account);
|
DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, account);
|
||||||
DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
||||||
DataUtils.set(RegisterActivity.this,"last_login_time",System.currentTimeMillis());
|
DataUtils.set(RegisterActivity.this,"last_login_time",System.currentTimeMillis());
|
||||||
@@ -930,184 +963,39 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
UpdateUtils updateUtils;
|
||||||
String stsCredentialsBean;
|
|
||||||
|
|
||||||
private void toShangchuanAli(File file ) {
|
private void toShangchuanAli(File file ) {
|
||||||
showLoadingDialog("正在上传头像");
|
showLoadingDialog("正在上传头像");
|
||||||
// Api.getInstance().stsCredentials()
|
updateUtils = new UpdateUtils();
|
||||||
// .subscribeOn(Schedulers.io())
|
//Context context, File file, String pathName, OnToActionListener onToActionListener, Handler... handler
|
||||||
// .observeOn(AndroidSchedulers.mainThread())
|
updateUtils.toShangchuanAli(RegisterActivity.this,file, pathName,new UpdateUtils.OnToActionListener() {
|
||||||
// .subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
@Override
|
||||||
// @Override
|
public void toSumbitSuccess(String path) {
|
||||||
// public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
dimessLoadingDialog();
|
||||||
// stsCredentialsBean = feedbackResp.data;
|
avater = path;
|
||||||
// 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));
|
|
||||||
}
|
}
|
||||||
}, 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();
|
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 LoadingDialog loadingDialog;
|
||||||
|
|
||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1136,4 +1024,6 @@ public class RegisterActivity extends BaseActivity {
|
|||||||
return super .onTouchEvent(event);
|
return super .onTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -528,6 +528,8 @@ public class WangjiActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ import com.huawei.hms.ml.scan.HmsScan;
|
|||||||
import com.huawei.hms.ml.scan.HmsScanAnalyzerOptions;
|
import com.huawei.hms.ml.scan.HmsScanAnalyzerOptions;
|
||||||
import com.king.app.updater.AppUpdater;
|
import com.king.app.updater.AppUpdater;
|
||||||
import com.king.zxing.util.CodeUtils;
|
import com.king.zxing.util.CodeUtils;
|
||||||
//import com.netease.lava.nertc.sdk.NERtcOption;
|
|
||||||
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.NIMClient;
|
||||||
import com.netease.nimlib.sdk.Observer;
|
import com.netease.nimlib.sdk.Observer;
|
||||||
@@ -290,7 +289,9 @@ public class MainActivity extends BaseActivity {
|
|||||||
// private ChatMainFragment chatMainFragment;
|
// private ChatMainFragment chatMainFragment;
|
||||||
// private ChatMain2Fragment chatMain2Fragment;
|
// private ChatMain2Fragment chatMain2Fragment;
|
||||||
// private ChatTabFragment chatTabFragment;
|
// private ChatTabFragment chatTabFragment;
|
||||||
private ShopFragment voomFragment;
|
private ShopFragment shopFragment;
|
||||||
|
private VoomFragment voomFragment;
|
||||||
|
|
||||||
private MineFragment walletFragment;
|
private MineFragment walletFragment;
|
||||||
FragmentAdapter fragmentAdapter;
|
FragmentAdapter fragmentAdapter;
|
||||||
|
|
||||||
@@ -426,7 +427,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
if (Build.VERSION.SDK_INT <30) {
|
if (Build.VERSION.SDK_INT < 30) {
|
||||||
setTheme(R.style.AppThemeStart1);
|
setTheme(R.style.AppThemeStart1);
|
||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||||
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
getWindow().setStatusBarColor(Color.TRANSPARENT);
|
||||||
@@ -465,7 +466,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
Log.d("ViewSize", "Height: " + height + ", Width: " + width);
|
Log.d("ViewSize", "Height: " + height + ", Width: " + width);
|
||||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
||||||
ViewGroup.LayoutParams layoutParams = activityMainBinding.bottomV.getLayoutParams();
|
ViewGroup.LayoutParams layoutParams = activityMainBinding.bottomV.getLayoutParams();
|
||||||
layoutParams.height = getNavigationBarHeight(MainActivity.this,height);
|
layoutParams.height = getNavigationBarHeight(MainActivity.this, height);
|
||||||
// if(Build.MANUFACTURER.equals("HUAWEI")){
|
// if(Build.MANUFACTURER.equals("HUAWEI")){
|
||||||
// layoutParams.height = 0;
|
// layoutParams.height = 0;
|
||||||
// }
|
// }
|
||||||
@@ -571,11 +572,22 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
if(activityMainBinding.qrRy.getVisibility()==View.VISIBLE){
|
|
||||||
activityMainBinding.qrRy.removeAllViews();
|
if (activityMainBinding.viewPager.getCurrentItem() == 2) {
|
||||||
activityMainBinding.qrRy.setVisibility(View.GONE);
|
if (shopFragment != null) {
|
||||||
}else {
|
if (!shopFragment.canGoBack()) {
|
||||||
super.onBackPressed();
|
// 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() {
|
private void getVersion() {
|
||||||
try {
|
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)
|
DataUtils.getVersionCode(MainActivity.this), com.netease.yunxin.kit.chatkit.ui.network.ApiService.SUBSTATIONID1)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -906,40 +918,40 @@ public class MainActivity extends BaseActivity {
|
|||||||
int loc = DataUtils.get(MainActivity.this, "locale", 1);
|
int loc = DataUtils.get(MainActivity.this, "locale", 1);
|
||||||
switch (loc) {
|
switch (loc) {
|
||||||
case 1:
|
case 1:
|
||||||
name = versionBean.getUpgradeHintZhCn().replace("\\n","\n");
|
name = versionBean.getUpgradeHintZhCn().replace("\\n", "\n");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
name = versionBean.getUpgradeHintEnUs().replace("\\n","\n");
|
name = versionBean.getUpgradeHintEnUs().replace("\\n", "\n");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
name = versionBean.getUpgradeHintJaJp().replace("\\n","\n");
|
name = versionBean.getUpgradeHintJaJp().replace("\\n", "\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
name = versionBean.getUpgradeHintZhTw().replace("\\n","\n");
|
name = versionBean.getUpgradeHintZhTw().replace("\\n", "\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNavigationBarHeight(Context context,int height) {
|
public int getNavigationBarHeight(Context context, int height) {
|
||||||
Resources resources = context.getResources();
|
Resources resources = context.getResources();
|
||||||
if(isNavBarVisible(this,height)){
|
if (isNavBarVisible(this, height)) {
|
||||||
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
||||||
return resources.getDimensionPixelSize(resourceId);
|
return resources.getDimensionPixelSize(resourceId);
|
||||||
}else{
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean isNavBarVisible(Activity activity,int screenHeight) {
|
private boolean isNavBarVisible(Activity activity, int screenHeight) {
|
||||||
// 获取屏幕的矩形区域,不包含系统UI(如状态栏和导航栏)
|
// 获取屏幕的矩形区域,不包含系统UI(如状态栏和导航栏)
|
||||||
Rect rect = new Rect();
|
Rect rect = new Rect();
|
||||||
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
|
activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
|
||||||
// int screenHeight = activity.getWindow().getDecorView().getRootView().getHeight();
|
// int screenHeight = activity.getWindow().getDecorView().getRootView().getHeight();
|
||||||
LogUtils.i("高度是多少:"+screenHeight+";;"+rect.bottom);
|
LogUtils.i("高度是多少:" + screenHeight + ";;" + rect.bottom);
|
||||||
// 如果矩形区域的高度不等于屏幕高度,说明有系统UI覆盖(如导航栏)
|
// 如果矩形区域的高度不等于屏幕高度,说明有系统UI覆盖(如导航栏)
|
||||||
return (screenHeight - rect.bottom) > 0;
|
return (screenHeight - rect.bottom) > 0;
|
||||||
}
|
}
|
||||||
@@ -1097,7 +1109,32 @@ public class MainActivity extends BaseActivity {
|
|||||||
configCallKit();
|
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() {
|
private void configCallKit() {
|
||||||
CallKitUIOptions options = new CallKitUIOptions.Builder().soundHelper(new SoundHelper() {
|
CallKitUIOptions options = new CallKitUIOptions.Builder().soundHelper(new SoundHelper() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1119,7 +1156,8 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
return resId;
|
return resId;
|
||||||
}
|
}
|
||||||
}).rtcAppKey(DataUtils.readAppKey(this))
|
})
|
||||||
|
.rtcAppKey(DataUtils.readAppKey(this))
|
||||||
.currentUserAccId(IMKitClient.account())
|
.currentUserAccId(IMKitClient.account())
|
||||||
.userInfoHelper(new UserInfoHelper() {
|
.userInfoHelper(new UserInfoHelper() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1170,7 +1208,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
String callName = ChatDataUtils.getCellBell(IMKitClient.getUserInfo());
|
String callName = ChatDataUtils.getCellBell(IMKitClient.getUserInfo());
|
||||||
LogUtils.d("NotificationConfig callName==" + callName);
|
LogUtils.d("NotificationConfig callName==" + callName);
|
||||||
int rawResource = getResources().getIdentifier(callName, "raw", getPackageName());
|
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);
|
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;
|
AppSkinConfig.getInstance().getAppSkinStyle() == AppSkinConfig.AppSkin.commonSkin;
|
||||||
ALog.d(Constant.PROJECT_TAG, "MainActivity:initView");
|
ALog.d(Constant.PROJECT_TAG, "MainActivity:initView");
|
||||||
loadConfig();
|
loadConfig();
|
||||||
|
|
||||||
|
mCurrentTab = activityMainBinding.contactBtnGroup;
|
||||||
|
resetTabSkin(isCommonSkin);
|
||||||
|
checkZhiWen();
|
||||||
|
shareDateUtils = new ShareDateUtils();
|
||||||
|
shareDateUtils.getAllSessionList();
|
||||||
|
shareDateUtils.getLocFriends();
|
||||||
|
initFragment();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initFragment() {
|
||||||
List<Fragment> fragments = new ArrayList<>();
|
List<Fragment> fragments = new ArrayList<>();
|
||||||
// index2Fragment = new HomeFragment();
|
// index2Fragment = new HomeFragment();
|
||||||
chatTabFragment = new ChatTabFragment();
|
chatTabFragment = new ChatTabFragment();
|
||||||
voomFragment = new ShopFragment();
|
|
||||||
walletFragment = new MineFragment();
|
|
||||||
// fragments.add(index2Fragment);
|
|
||||||
fragments.add(chatTabFragment);
|
fragments.add(chatTabFragment);
|
||||||
// if(ApiService.AREA_CODE.equals("+86")) {
|
if (!TextUtils.isEmpty(DataUtils.get(MainActivity.this, "mall_address", ""))) {
|
||||||
fragments.add(voomFragment);
|
shopFragment = new ShopFragment();
|
||||||
// activityMainBinding.liveBtnGroup.setVisibility(View.VISIBLE);
|
fragments.add(shopFragment);
|
||||||
// }else{
|
activityMainBinding.conversationBtnGroup.setVisibility(View.VISIBLE);
|
||||||
// activityMainBinding.liveBtnGroup.setVisibility(View.GONE);
|
} else {
|
||||||
// }
|
activityMainBinding.conversationBtnGroup.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
voomFragment = new VoomFragment();
|
||||||
|
fragments.add(voomFragment);
|
||||||
|
|
||||||
|
walletFragment = new MineFragment();
|
||||||
fragments.add(walletFragment);
|
fragments.add(walletFragment);
|
||||||
|
|
||||||
fragmentAdapter = new FragmentAdapter(this);
|
fragmentAdapter = new FragmentAdapter(this);
|
||||||
@@ -1282,31 +1333,46 @@ public class MainActivity extends BaseActivity {
|
|||||||
public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
super.onPageSelected(position);
|
super.onPageSelected(position);
|
||||||
resetTabStyle();
|
resetTabStyle();
|
||||||
if(position == 0){
|
if (position == 0) {
|
||||||
activityMainBinding.contact.setTextColor(
|
activityMainBinding.contact.setTextColor(
|
||||||
getResources().getColor(R.color.color_2c2c2c));
|
getResources().getColor(R.color.color_2c2c2c));
|
||||||
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
null, getResources().getDrawable(R.mipmap.chat_img_t), null, null);
|
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);
|
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.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
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);
|
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() {
|
private void checkZhiWen() {
|
||||||
@@ -1367,8 +1433,10 @@ public class MainActivity extends BaseActivity {
|
|||||||
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
||||||
if (originalQrcodeStr != null) {
|
if (originalQrcodeStr != null) {
|
||||||
try {
|
try {
|
||||||
|
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START_OLD,IMUIKitConfig.SHARE_INVCODE_START);
|
||||||
|
|
||||||
if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("userId")) {
|
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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String id = uri.getQueryParameter("userId"); //id 值 10943
|
String id = uri.getQueryParameter("userId"); //id 值 10943
|
||||||
@@ -1380,7 +1448,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
.navigate();
|
.navigate();
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START)
|
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START)
|
||||||
&& originalQrcodeStr.contains("teamId")) {
|
&& 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
||||||
@@ -1388,7 +1456,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START)
|
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START)
|
||||||
&& originalQrcodeStr.contains("machineId") && originalQrcodeStr.contains("orderNo")) {
|
&& 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
// LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
||||||
@@ -1397,7 +1465,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
showGiftView(machineId, orderNo, money);
|
showGiftView(machineId, orderNo, money);
|
||||||
|
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("silver_qr_code")) {
|
} 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
||||||
Intent intent2 = new Intent(MainActivity.this, JsBridgeActivity.class);
|
Intent intent2 = new Intent(MainActivity.this, JsBridgeActivity.class);
|
||||||
@@ -1482,14 +1550,14 @@ public class MainActivity extends BaseActivity {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (scheme.startsWith("http")) {
|
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);
|
// sendMachine(scheme);
|
||||||
} else {
|
// } else {
|
||||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||||
intentweb.setData(Uri.parse(scheme));
|
intentweb.setData(Uri.parse(scheme));
|
||||||
startActivity(intentweb);
|
startActivity(intentweb);
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
}
|
}
|
||||||
@@ -1497,14 +1565,14 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (scheme.startsWith("http")) { //是http連接
|
if (scheme.startsWith("http")) { //是http連接
|
||||||
if (scheme.startsWith("https://admin.letschat2023.com/") && scheme.contains("deviceId")) {
|
// if (scheme.startsWith("https://admin.letschat2023.com/") && scheme.contains("deviceId")) {
|
||||||
sendMachine(scheme);
|
// sendMachine(scheme);
|
||||||
} else {
|
// } else {
|
||||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.setData(Uri.parse(scheme));
|
intent.setData(Uri.parse(scheme));
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
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);
|
groupNameTv = (TextView) bottomView.findViewById(R.id.group_name_tv);
|
||||||
|
|
||||||
if (team != null) {
|
if (team != null) {
|
||||||
joinTitleTv1.setText("群成员 "+team.getMemberCount()+"人");
|
joinTitleTv1.setText("群成员 " + team.getMemberCount() + "人");
|
||||||
if (TextUtils.isEmpty(team.getIcon())) {
|
if (TextUtils.isEmpty(team.getIcon())) {
|
||||||
groupHeadIv.setData(com.netease.yunxin.kit.contactkit.ui.R.mipmap.ic_group_defaulthead, "head");
|
groupHeadIv.setData(com.netease.yunxin.kit.contactkit.ui.R.mipmap.ic_group_defaulthead, "head");
|
||||||
} else {
|
} else {
|
||||||
@@ -1898,7 +1966,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
joinTv.setOnClickListener(v -> NIMClient.getService(TeamService.class).applyJoinTeam(groupId, null).setCallback(new RequestCallback<Team>() {
|
joinTv.setOnClickListener(v -> NIMClient.getService(TeamService.class).applyJoinTeam(groupId, null).setCallback(new RequestCallback<Team>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Team team1) {
|
public void onSuccess(Team team1) {
|
||||||
joinTitleTv1.setText("群成员 "+team1.getMemberCount()+"人");
|
joinTitleTv1.setText("群成员 " + team1.getMemberCount() + "人");
|
||||||
|
|
||||||
activityMainBinding.qrRy.removeAllViews();
|
activityMainBinding.qrRy.removeAllViews();
|
||||||
activityMainBinding.qrRy.setVisibility(View.GONE);
|
activityMainBinding.qrRy.setVisibility(View.GONE);
|
||||||
@@ -2061,31 +2129,37 @@ public class MainActivity extends BaseActivity {
|
|||||||
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
null, getResources().getDrawable(R.mipmap.chat_img_t), null, null);
|
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);
|
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.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(
|
activityMainBinding.live.setTextColor(
|
||||||
getResources().getColor(R.color.color_2c2c2c));
|
getResources().getColor(R.color.color_2c2c2c));
|
||||||
activityMainBinding.live.setCompoundDrawablesWithIntrinsicBounds(
|
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);
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||||
} else if (mCurrentTab == activityMainBinding.myselfBtnGroup) {
|
} 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);
|
activityMainBinding.viewPager.setCurrentItem(2, false);
|
||||||
// }else{
|
}
|
||||||
// activityMainBinding.viewPager.setCurrentItem(1, false);
|
|
||||||
// }
|
|
||||||
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
activityMainBinding.mine.setTextColor(getResources().getColor(R.color.color_2c2c2c));
|
||||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
null, getResources().getDrawable(R.mipmap.wo_t), null, null);
|
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);
|
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) {
|
// if (mCurrentTab == activityMainBinding.contactBtnGroup) {
|
||||||
// activityMainBinding.viewPager.setCurrentItem(1, false);
|
// activityMainBinding.viewPager.setCurrentItem(1, false);
|
||||||
@@ -2125,7 +2199,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
activityMainBinding.conversation.setTextColor(
|
activityMainBinding.conversation.setTextColor(
|
||||||
getResources().getColor(R.color.color_babeca));
|
getResources().getColor(R.color.color_babeca));
|
||||||
activityMainBinding.conversation.setCompoundDrawablesWithIntrinsicBounds(
|
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.setTextColor(getResources().getColor(R.color.color_babeca));
|
||||||
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
activityMainBinding.contact.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
@@ -2133,7 +2207,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
activityMainBinding.live.setTextColor(getResources().getColor(R.color.color_babeca));
|
activityMainBinding.live.setTextColor(getResources().getColor(R.color.color_babeca));
|
||||||
activityMainBinding.live.setCompoundDrawablesWithIntrinsicBounds(
|
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.setTextColor(getResources().getColor(R.color.color_babeca));
|
||||||
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
activityMainBinding.mine.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
@@ -2501,6 +2575,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
* 赠送开关配置
|
* 赠送开关配置
|
||||||
*/
|
*/
|
||||||
private void getConfig() {
|
private void getConfig() {
|
||||||
|
// DataUtils.set(MainActivity.this, "mall_address", "");
|
||||||
Api.getInstance().getConfig()
|
Api.getInstance().getConfig()
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -2514,15 +2589,13 @@ public class MainActivity extends BaseActivity {
|
|||||||
if (configBean.getId() == 1) {
|
if (configBean.getId() == 1) {
|
||||||
DataUtils.set(MainActivity.this, "transfer_cash", configBean.getVal().equals("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) {
|
if (configBean.getId() == 4) {
|
||||||
DataUtils.set(MainActivity.this, "redpkg_score", configBean.getVal().equals("1"));
|
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
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,19 +97,35 @@ public class ChatMain2Fragment extends BaseFragment {
|
|||||||
private final NetworkUtils.NetworkStateListener networkStateListener =
|
private final NetworkUtils.NetworkStateListener networkStateListener =
|
||||||
new NetworkUtils.NetworkStateListener() {
|
new NetworkUtils.NetworkStateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAvailable(NetworkInfo network) {
|
public void onAvailable(NetworkInfo networkInfo) {
|
||||||
if (viewBinding != null) {
|
if (viewBinding != null) {
|
||||||
viewBinding.errorTv.setVisibility(View.GONE);
|
viewBinding.errorTv.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLost(NetworkInfo network) {
|
public void onLost(NetworkInfo networkInfo) {
|
||||||
if (viewBinding != null) {
|
if (viewBinding != null) {
|
||||||
viewBinding.errorTv.setVisibility(View.VISIBLE);
|
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 =
|
protected final EventNotify<ConversationEditEvent> editConversation =
|
||||||
|
|||||||
@@ -111,19 +111,20 @@ public class ChatTabFragment extends BaseFragment {
|
|||||||
private final NetworkUtils.NetworkStateListener networkStateListener =
|
private final NetworkUtils.NetworkStateListener networkStateListener =
|
||||||
new NetworkUtils.NetworkStateListener() {
|
new NetworkUtils.NetworkStateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAvailable(NetworkInfo network) {
|
public void onAvailable(NetworkInfo networkInfo) {
|
||||||
if (viewBinding != null) {
|
if (viewBinding != null) {
|
||||||
viewBinding.errorTv.setVisibility(View.GONE);
|
viewBinding.errorTv.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLost(NetworkInfo network) {
|
public void onLost(NetworkInfo networkInfo) {
|
||||||
if (viewBinding != null) {
|
if (viewBinding != null) {
|
||||||
viewBinding.errorTv.setVisibility(View.VISIBLE);
|
viewBinding.errorTv.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
protected final EventNotify<ConversationEditEvent> editConversation =
|
protected final EventNotify<ConversationEditEvent> editConversation =
|
||||||
|
|||||||
@@ -495,8 +495,10 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
|||||||
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
||||||
if (originalQrcodeStr != null) {
|
if (originalQrcodeStr != null) {
|
||||||
try {
|
try {
|
||||||
|
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START_OLD,IMUIKitConfig.SHARE_INVCODE_START);
|
||||||
|
|
||||||
if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("userId")) {
|
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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String id = uri.getQueryParameter("userId"); //id 值 10943
|
String id = uri.getQueryParameter("userId"); //id 值 10943
|
||||||
@@ -507,14 +509,14 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
|||||||
.withParam("userId", id)
|
.withParam("userId", id)
|
||||||
.navigate();
|
.navigate();
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("teamId")) {
|
} 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
||||||
showQrcodeView(id);
|
showQrcodeView(id);
|
||||||
|
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("machineId") && originalQrcodeStr.contains("orderNo")) {
|
} 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
||||||
@@ -523,7 +525,7 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
|||||||
showGiftView(machineId, orderNo, money);
|
showGiftView(machineId, orderNo, money);
|
||||||
|
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("silver_qr_code")) {
|
} 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
||||||
Intent intent2 = new Intent(AddFriendsActivity.this, JsBridgeActivity.class);
|
Intent intent2 = new Intent(AddFriendsActivity.this, JsBridgeActivity.class);
|
||||||
@@ -612,16 +614,16 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (scheme.startsWith("http")) {
|
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);
|
// sendMachine(scheme);
|
||||||
} else {
|
// } else {
|
||||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||||
intentweb.setData(Uri.parse(scheme));
|
intentweb.setData(Uri.parse(scheme));
|
||||||
startActivity(intentweb);
|
startActivity(intentweb);
|
||||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
||||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
|
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
//Context context, String content, String cancel, String sure,boolean showCancel
|
//Context context, String content, String cancel, String sure,boolean showCancel
|
||||||
@@ -631,15 +633,15 @@ public class AddFriendsActivity extends LllChatBaseActivity {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (scheme.startsWith("http")) {
|
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);
|
// sendMachine(scheme);
|
||||||
} else {
|
// } else {
|
||||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
||||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||||
intentweb.setData(Uri.parse(scheme));
|
intentweb.setData(Uri.parse(scheme));
|
||||||
startActivity(intentweb);
|
startActivity(intentweb);
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
showErrCode(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 -> {
|
saveTv.setOnClickListener(v -> {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
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();
|
doSaveQrcode();
|
||||||
} else {
|
} else {
|
||||||
if (PermissionUtils.hasPermissions(
|
if (PermissionUtils.hasPermissions(
|
||||||
|
|||||||
@@ -270,6 +270,8 @@ public class AccoutListActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -231,6 +231,8 @@ public class CloseAccountActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.content.Intent;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.InputFilter;
|
import android.text.InputFilter;
|
||||||
@@ -112,26 +113,31 @@ public class EditFriendUserInfoActivity extends BaseActivity {
|
|||||||
binding.tvDone.setOnClickListener(
|
binding.tvDone.setOnClickListener(
|
||||||
v -> {
|
v -> {
|
||||||
ContactRepo.updateAlias(friendInfo.getAccount(), binding.etNickname.getText().toString());
|
ContactRepo.updateAlias(friendInfo.getAccount(), binding.etNickname.getText().toString());
|
||||||
Api.getInstance().addRemark(friendInfo.getAccount(), binding.etNickname.getText().toString())
|
// Api.getInstance().addRemark(friendInfo.getAccount(), binding.etNickname.getText().toString())
|
||||||
.subscribeOn(Schedulers.io())
|
// .subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
// .observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<>() {
|
// .subscribe(new BaseObserver<>() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess(Result feedbackResp) {
|
// public void onSuccess(Result feedbackResp) {
|
||||||
if (isFollowValue == 1) {
|
// if (isFollowValue == 1) {
|
||||||
RxBus.getInstance().post(IMUIKitConfig.CHANGE_FOLLOW_USER);
|
// RxBus.getInstance().post(IMUIKitConfig.CHANGE_FOLLOW_USER);
|
||||||
}
|
// }
|
||||||
ToastX.showShortToast(getString(R.string.xiugaichenggong_txt));
|
// ToastX.showShortToast(getString(R.string.xiugaichenggong_txt));
|
||||||
setResult(RESULT_OK);
|
// setResult(RESULT_OK);
|
||||||
finish();
|
// finish();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onError(int code, String msg) {
|
// public void onError(int code, String msg) {
|
||||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
// LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||||
ToastX.showShortToast(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() {
|
private void getVersion() {
|
||||||
try {
|
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())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<>() {
|
.subscribe(new BaseObserver<>() {
|
||||||
|
|||||||
@@ -230,6 +230,8 @@ public class UnBindPhoneActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -268,6 +268,8 @@ public class UserHeadEditActivity extends BaseActivity implements CommonCallback
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,14 @@ import androidx.core.content.ContextCompat;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
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.bumptech.glide.Glide;
|
||||||
import com.codersun.fingerprintcompat.AonFingerChangeCallback;
|
import com.codersun.fingerprintcompat.AonFingerChangeCallback;
|
||||||
import com.codersun.fingerprintcompat.FingerManager;
|
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.SelectHeadDialog;
|
||||||
import com.hbl.yuliao.dialog.SelectSexDialog;
|
import com.hbl.yuliao.dialog.SelectSexDialog;
|
||||||
import com.hbl.yuliao.game.JsBridgeActivity;
|
import com.hbl.yuliao.game.JsBridgeActivity;
|
||||||
|
import com.hbl.yuliao.login.RegisterActivity;
|
||||||
import com.hbl.yuliao.main.MainActivity;
|
import com.hbl.yuliao.main.MainActivity;
|
||||||
import com.hbl.yuliao.main.authorize.AuthorizeActivity;
|
import com.hbl.yuliao.main.authorize.AuthorizeActivity;
|
||||||
import com.hbl.yuliao.main.index.add.AddFriendsActivity;
|
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.BindBean;
|
||||||
import com.hbl.yuliao.model.LoginBean;
|
import com.hbl.yuliao.model.LoginBean;
|
||||||
|
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||||
import com.hbl.yuliao.model.UserShareBean;
|
import com.hbl.yuliao.model.UserShareBean;
|
||||||
import com.hbl.yuliao.model.UserUpdateEvent;
|
import com.hbl.yuliao.model.UserUpdateEvent;
|
||||||
import com.hbl.yuliao.model.WalletBean;
|
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.QRCodeScheme;
|
||||||
import com.hbl.yuliao.utils.ShareDateUtils;
|
import com.hbl.yuliao.utils.ShareDateUtils;
|
||||||
import com.hbl.yuliao.utils.ToolKits;
|
import com.hbl.yuliao.utils.ToolKits;
|
||||||
|
import com.hbl.yuliao.utils.UpdateUtils;
|
||||||
import com.hbl.yuliao.wallet.SetPayPasswordActivity;
|
import com.hbl.yuliao.wallet.SetPayPasswordActivity;
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||||
import com.hbl.yuliao.widget.CircleImageView;
|
import com.hbl.yuliao.widget.CircleImageView;
|
||||||
@@ -155,6 +167,9 @@ import java.util.UUID;
|
|||||||
import cc.shinichi.library.ImagePreview;
|
import cc.shinichi.library.ImagePreview;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
import okhttp3.MediaType;
|
||||||
|
import okhttp3.MultipartBody;
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
public class UserInfoActivity extends BaseActivity implements CommonCallback<File>{
|
public class UserInfoActivity extends BaseActivity implements CommonCallback<File>{
|
||||||
private ActivityLocUserInfoBinding binding;
|
private ActivityLocUserInfoBinding binding;
|
||||||
@@ -165,15 +180,29 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
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) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
getWindow().setDecorFitsSystemWindows(false);
|
getWindow().setDecorFitsSystemWindows(false);
|
||||||
} else {
|
} else {
|
||||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||||
| 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);
|
super.onCreate(savedInstanceState);
|
||||||
binding = ActivityLocUserInfoBinding.inflate(getLayoutInflater());
|
binding = ActivityLocUserInfoBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
@@ -331,8 +360,9 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
public void processQRCodeScanResult(Activity activity, String originalQrcodeStr) {
|
||||||
if (originalQrcodeStr != null) {
|
if (originalQrcodeStr != null) {
|
||||||
try {
|
try {
|
||||||
|
originalQrcodeStr = originalQrcodeStr.replace(IMUIKitConfig.SHARE_INVCODE_START_OLD,IMUIKitConfig.SHARE_INVCODE_START);
|
||||||
if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("userId")) {
|
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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String id = uri.getQueryParameter("userId"); //id 值 10943
|
String id = uri.getQueryParameter("userId"); //id 值 10943
|
||||||
@@ -343,14 +373,14 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
.withParam("userId", id)
|
.withParam("userId", id)
|
||||||
.navigate();
|
.navigate();
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("teamId")) {
|
} 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
String id = uri.getQueryParameter("teamId"); //id 值 10943
|
||||||
showQrcodeView(id);
|
showQrcodeView(id);
|
||||||
|
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("machineId") && originalQrcodeStr.contains("orderNo")) {
|
} 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
LogUtils.i("数据是啥:" + originalQrcodeStr);
|
||||||
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
String machineId = uri.getQueryParameter("machineId"); //id 值 10943
|
||||||
@@ -359,7 +389,7 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
showGiftView(machineId, orderNo, money);
|
showGiftView(machineId, orderNo, money);
|
||||||
|
|
||||||
} else if (originalQrcodeStr.startsWith(IMUIKitConfig.SHARE_INVCODE_START) && originalQrcodeStr.contains("silver_qr_code")) {
|
} 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);
|
Uri uri = Uri.parse(originalQrcodeStr);
|
||||||
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
String silverQrCode = uri.getQueryParameter("silver_qr_code"); //
|
||||||
Intent intent2 = new Intent(UserInfoActivity.this, JsBridgeActivity.class);
|
Intent intent2 = new Intent(UserInfoActivity.this, JsBridgeActivity.class);
|
||||||
@@ -455,15 +485,15 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
// break;
|
// break;
|
||||||
default:
|
default:
|
||||||
if (scheme.startsWith("http")) {
|
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);
|
// sendMachine(scheme);
|
||||||
} else {
|
// } else {
|
||||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
||||||
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||||
intentweb.setData(Uri.parse(scheme));
|
intentweb.setData(Uri.parse(scheme));
|
||||||
startActivity(intentweb);
|
startActivity(intentweb);
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
//Context context, String content, String cancel, String sure,boolean showCancel
|
//Context context, String content, String cancel, String sure,boolean showCancel
|
||||||
@@ -473,13 +503,9 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (scheme.startsWith("http")) {
|
if (scheme.startsWith("http")) {
|
||||||
if (scheme.startsWith("http://admin.yuliao666.top/") && scheme.contains("deviceId")) {
|
Intent intentweb = new Intent(Intent.ACTION_VIEW);
|
||||||
sendMachine(scheme);
|
intentweb.setData(Uri.parse(scheme));
|
||||||
} else {
|
startActivity(intentweb);
|
||||||
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
|
|
||||||
showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
// ToastX.showLongToast(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));
|
||||||
showErrCode(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())) {
|
if (loginBean != null && loginBean.getUser() != null && !TextUtils.isEmpty(loginBean.getUser().getPostHomepageBackground())) {
|
||||||
List<String> urls = new ArrayList<>();
|
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);
|
urls.add(url);
|
||||||
ImagePreview
|
ImagePreview
|
||||||
.getInstance()
|
.getInstance()
|
||||||
@@ -1060,12 +1089,18 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
}
|
}
|
||||||
|
|
||||||
String pram = loginBean.getUser().getPostHomepageBackground();
|
String pram = loginBean.getUser().getPostHomepageBackground();
|
||||||
String url = IMUIKitConfig.OSS_URL + pram;
|
String url = pram;
|
||||||
Glide.with(UserInfoActivity.this)
|
if(!TextUtils.isEmpty(url)) {
|
||||||
.load(url)
|
if (!url.startsWith("http")) {
|
||||||
.placeholder(R.color.color_themepink)
|
url = IMUIKitConfig.OSS_URL + pram;
|
||||||
.error(R.color.color_themepink)
|
}
|
||||||
.into(binding.forbgIv);
|
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());
|
loadData(IMKitClient.account());
|
||||||
@@ -1091,14 +1126,17 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
changeIndex(feedbackResp.data);
|
changeIndex(feedbackResp.data);
|
||||||
|
|
||||||
DataUtils.set(UserInfoActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
DataUtils.set(UserInfoActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
||||||
|
|
||||||
String pram = locUser.getPostHomepageBackground();
|
String pram = locUser.getPostHomepageBackground();
|
||||||
String url = IMUIKitConfig.OSS_URL + pram;
|
if(!TextUtils.isEmpty(pram)) {
|
||||||
Glide.with(UserInfoActivity.this)
|
if (!pram.startsWith("http")) {
|
||||||
.load(url)
|
pram = IMUIKitConfig.OSS_URL + pram;
|
||||||
.placeholder(R.color.color_themepink)
|
}
|
||||||
.error(R.color.color_themepink)
|
Glide.with(UserInfoActivity.this)
|
||||||
.into(binding.forbgIv);
|
.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(
|
binding.cavAvatar.setData(
|
||||||
R.mipmap.default_head_img, "", 0);
|
R.mipmap.default_head_img, "", 0);
|
||||||
} else {
|
} else {
|
||||||
|
LogUtils.i("地址是啥:"+userInfo.getAvatar());
|
||||||
binding.cavAvatar.setData(
|
binding.cavAvatar.setData(
|
||||||
userInfo.getAvatar(), "",
|
userInfo.getAvatar(), "",
|
||||||
AvatarColor.avatarColor(IMKitClient.account()));
|
AvatarColor.avatarColor(IMKitClient.account()));
|
||||||
@@ -1290,7 +1329,9 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
binding.tvSexual.setText(sexualValue);
|
binding.tvSexual.setText(sexualValue);
|
||||||
binding.tvBirthday.setText(userInfo.getBirthday());
|
binding.tvBirthday.setText(userInfo.getBirthday());
|
||||||
shengri = 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.tvEmail.setText(userInfo.getEmail());
|
||||||
binding.tvSign.setText(userInfo.getSignature());
|
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) {
|
private void toShangchuanAli(File file, boolean isHead) {
|
||||||
showLoadingDialog(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())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<>() {
|
.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
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
dimessLoadingDialog();
|
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 LoadingDialog loadingDialog;
|
||||||
|
|
||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2124,8 +2315,8 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
//
|
||||||
private void toQIiNiuYunOss(File file, boolean isHead) {
|
private void toQIiNiuYunOss(File file, boolean isHead) {
|
||||||
String updatePathPic = "postHomepageBackground";
|
String updatePathPic = "postHomepageBackground";
|
||||||
String updatePathPicHead = "userAvatarFileName";
|
String updatePathPicHead = "userAvatarFileName";
|
||||||
@@ -2145,7 +2336,7 @@ public class UserInfoActivity extends BaseActivity implements CommonCallback<Fil
|
|||||||
files = "media/" + updatePathPicHead + "/" + fileName;
|
files = "media/" + updatePathPicHead + "/" + fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadManager.put(file, files, stsCredentialsBean, (key, info, response) -> {
|
uploadManager.put(file, files, stsCredentialsBean1, (key, info, response) -> {
|
||||||
dimessLoadingDialog();
|
dimessLoadingDialog();
|
||||||
if (info != null && info.isOK()) {
|
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.common.auth.OSSStsTokenCredentialProvider;
|
||||||
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
//import com.alibaba.sdk.android.oss.model.PutObjectRequest;
|
||||||
//import com.alibaba.sdk.android.oss.model.PutObjectResult;
|
//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.Glide;
|
||||||
import com.hbl.yuliao.IMUIKitConfig;
|
import com.hbl.yuliao.IMUIKitConfig;
|
||||||
import com.hbl.yuliao.R;
|
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.event.UserAlbumsUpdateEvent;
|
||||||
import com.hbl.yuliao.model.AlbumBean;
|
import com.hbl.yuliao.model.AlbumBean;
|
||||||
import com.hbl.yuliao.model.AlbumItemBean;
|
import com.hbl.yuliao.model.AlbumItemBean;
|
||||||
|
import com.hbl.yuliao.model.AvaterBean;
|
||||||
import com.hbl.yuliao.model.HisChatShowBean;
|
import com.hbl.yuliao.model.HisChatShowBean;
|
||||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||||
import com.hbl.yuliao.model.UserAlbumBean;
|
import com.hbl.yuliao.model.UserAlbumBean;
|
||||||
@@ -122,6 +131,9 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
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() {
|
public void onSubmitPic() {
|
||||||
showLoading();
|
showLoading();
|
||||||
// Api.getInstance().stsCredentials()
|
|
||||||
// .subscribeOn(Schedulers.io())
|
if(IMUIKitConfig.UPLOAD_TYPE == 0) {
|
||||||
// .observeOn(AndroidSchedulers.mainThread())
|
updateImage(0);
|
||||||
// .subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
}else if(IMUIKitConfig.UPLOAD_TYPE == 1){
|
||||||
// @Override
|
Api.getInstance().stsCredentials()
|
||||||
// public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
.subscribeOn(Schedulers.io())
|
||||||
// stsCredentialsBean = feedbackResp.data;
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
// toAliYunOss();
|
.subscribe(new BaseObserver<Result<StsCredentialsBean>>() {
|
||||||
// }
|
@Override
|
||||||
//
|
public void onSuccess(Result<StsCredentialsBean> feedbackResp) {
|
||||||
// @Override
|
stsCredentialsBean = feedbackResp.data;
|
||||||
// public void onError(int code, String msg) {
|
toAliYunOss();
|
||||||
// dismissLoading();
|
}
|
||||||
// }
|
|
||||||
// });
|
@Override
|
||||||
Api.getInstance().stsCredentials1()
|
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())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<>() {
|
.subscribe(new BaseObserver<Result<AvaterBean>>() {
|
||||||
@Override
|
|
||||||
public void onSuccess(Result<String> feedbackResp) {
|
|
||||||
stsCredentialsBean1 = feedbackResp.data;
|
|
||||||
// toAliYunOss(file, isHead);
|
|
||||||
toUpdateOssNew(0);
|
|
||||||
|
|
||||||
|
@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
|
@Override
|
||||||
public void onError(int code, String msg) {
|
public void onError(int code, String msg) {
|
||||||
dismissLoading();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void toUpdateOssNew( int i) {
|
private void toUpdateOssNew( int i) {
|
||||||
String updatePathPic = "user_album";
|
String updatePathPic = "user_album";
|
||||||
UploadOptions options = new UploadOptions(null, null, true,
|
UploadOptions options = new UploadOptions(null, null, true,
|
||||||
@@ -848,9 +900,6 @@ public class UserPhotoDetailsActivity extends LllChatBaseActivity {
|
|||||||
if (info != null && info.isOK()) {
|
if (info != null && info.isOK()) {
|
||||||
// 上传成功
|
// 上传成功
|
||||||
outputStrings.add(IMUIKitConfig.OSS_URL + files);
|
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) {
|
if (i == uriStrings.size() - 1) {
|
||||||
toAddPhotos();
|
toAddPhotos();
|
||||||
} else {
|
} else {
|
||||||
@@ -884,76 +933,76 @@ public class UserPhotoDetailsActivity extends LllChatBaseActivity {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// private void toAliYunOss() {
|
private void toAliYunOss() {
|
||||||
// String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
String endpoint = "https://oss-cn-hongkong.aliyuncs.com";
|
||||||
// String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
String accessKeyId = stsCredentialsBean.getAccessKeyId();
|
||||||
// String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
String accessKeySecret = stsCredentialsBean.getAccessKeySecret();
|
||||||
// String securityToken = stsCredentialsBean.getSecurityToken();
|
String securityToken = stsCredentialsBean.getSecurityToken();
|
||||||
// String bucketName = IMUIKitConfig.bucketName;
|
String bucketName = IMUIKitConfig.bucketName;
|
||||||
// OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
|
||||||
// OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
OSSClient oss = new OSSClient(getApplicationContext(), endpoint, credentialProvider);
|
||||||
// toUpdateOss(bucketName, 0, oss);
|
toUpdateOss(bucketName, 0, oss);
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
private void toUpdateOss(String bucketName, int i, OSSClient oss) {
|
||||||
// String picPath = "user_album";
|
String picPath = "user_album";
|
||||||
// String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
||||||
// if (i < uriStrings.size()) {
|
if (i < uriStrings.size()) {
|
||||||
//
|
|
||||||
//// File file = new File(uriStrings.get(i));
|
// File file = new File(uriStrings.get(i));
|
||||||
// String fileName = System.currentTimeMillis() + "_" + localMedias.get(i).getFileName();
|
String fileName = System.currentTimeMillis() + "_" + localMedias.get(i).getFileName();
|
||||||
// LogUtils.i("上传文件是啥:" + GsonUtils.beanToJSONString(localMedias.get(i)));
|
LogUtils.i("上传文件是啥:" + GsonUtils.beanToJSONString(localMedias.get(i)));
|
||||||
// LogUtils.i("上传文件是啥:" + fileName);
|
LogUtils.i("上传文件是啥:" + fileName);
|
||||||
//
|
|
||||||
// // 构造上传请求。
|
// 构造上传请求。
|
||||||
// PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + picPath + "/" + data + "/" + fileName, localMedias.get(i).getRealPath());
|
PutObjectRequest put = new PutObjectRequest(bucketName, "media/" + picPath + "/" + data + "/" + fileName, localMedias.get(i).getRealPath());
|
||||||
// put.setProgressCallback((request, currentSize, totalSize) -> {
|
put.setProgressCallback((request, currentSize, totalSize) -> {
|
||||||
// LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
LogUtils.i("PutObject", "currentSize: " + currentSize + " totalSize: " + totalSize);
|
||||||
//// if(isVideo){
|
// if(isVideo){
|
||||||
//// showLoadingDialog(("正在上传"+(currentSize*100)/totalSize)+"%");
|
// 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);
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
//
|
});
|
||||||
// @Override
|
|
||||||
// public void onFailure(PutObjectRequest request, ClientException clientExcepion, ServiceException serviceException) {
|
//OSSAsyncTask task =
|
||||||
// dismissLoading();
|
oss.asyncPutObject(put, new OSSCompletedCallback<>() {
|
||||||
// LogUtils.i("ErrorCode", clientExcepion.getMessage());
|
@Override
|
||||||
//
|
public void onSuccess(PutObjectRequest request, PutObjectResult result) {
|
||||||
// // 请求异常。
|
LogUtils.i("PutObject", "UploadSuccess");
|
||||||
// if (clientExcepion != null) {
|
LogUtils.i("ETag", result.getETag());
|
||||||
// // 本地异常,如网络异常等。
|
LogUtils.i("RequestId", result.getRequestId());
|
||||||
// clientExcepion.printStackTrace();
|
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(result));
|
||||||
// }
|
outputStrings.add(IMUIKitConfig.OSS_URL + "media/" + picPath + "/" + data + "/" + fileName);
|
||||||
// if (serviceException != null) {
|
//https://shenqi777.oss-cn-hongkong.aliyuncs.com/qtalk/pic_output/20230914/null_false53.jpg
|
||||||
// // 服务异常。
|
if (i == uriStrings.size() - 1) {
|
||||||
// LogUtils.i("ErrorCode", serviceException.getErrorCode());
|
toAddPhotos();
|
||||||
// LogUtils.i("RequestId", serviceException.getRequestId());
|
} else {
|
||||||
// LogUtils.i("HostId", serviceException.getHostId());
|
toUpdateOss(bucketName, i + 1, oss);
|
||||||
// LogUtils.i("RawMessage", serviceException.getRawMessage());
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
// });
|
@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() {
|
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 com.hbl.yuliao.utils.LogUtils;
|
||||||
|
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
@@ -56,6 +58,14 @@ public class Api extends BaseApi {
|
|||||||
builder.writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS);
|
builder.writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS);
|
||||||
//错误重连
|
//错误重连
|
||||||
builder.retryOnConnectionFailure(true);
|
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());
|
builder.addInterceptor(new HeaderInterceptor());
|
||||||
|
|
||||||
// if (Config.IS_DEBUG) {
|
// 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.PayInfoWxBean;
|
||||||
import com.hbl.yuliao.model.QuesListBean;
|
import com.hbl.yuliao.model.QuesListBean;
|
||||||
import com.hbl.yuliao.model.ReadMessageBean;
|
import com.hbl.yuliao.model.ReadMessageBean;
|
||||||
|
import com.hbl.yuliao.model.RechargeAccountBean;
|
||||||
import com.hbl.yuliao.model.RedLogBean;
|
import com.hbl.yuliao.model.RedLogBean;
|
||||||
import com.hbl.yuliao.model.RegisteredBean;
|
import com.hbl.yuliao.model.RegisteredBean;
|
||||||
import com.hbl.yuliao.model.RtcTokenBean;
|
import com.hbl.yuliao.model.RtcTokenBean;
|
||||||
@@ -105,8 +106,8 @@ public interface ApiService {
|
|||||||
/***
|
/***
|
||||||
* 打包的国家编码
|
* 打包的国家编码
|
||||||
*/
|
*/
|
||||||
// String AREA_CODE = "+886";
|
String AREA_CODE = "+60";
|
||||||
String AREA_CODE = BuildConfig.AREA_CODE;
|
// 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);
|
viewBinding.numberTv1Ly.setVisibility(View.GONE);
|
||||||
if (redpacketGroupBean.getType().equals("0")) {
|
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));
|
// 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 {
|
} else {
|
||||||
if (redpacketGroupBean.getGrabbers() == null || redpacketGroupBean.getGrabbers().size() == 0) {
|
if (redpacketGroupBean.getGrabbers() == null || redpacketGroupBean.getGrabbers().size() == 0) {
|
||||||
if (redpacketGroupBean.getStatus() == 2) {
|
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 {
|
} 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 {
|
} else {
|
||||||
int size = 0;
|
int size = 0;
|
||||||
@@ -428,10 +428,10 @@ public class ReceiveRedPacketActivity extends BaseActivity implements View.OnCli
|
|||||||
}
|
}
|
||||||
if (redpacketGroupBean.getStatus() == 2) {
|
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)
|
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 {
|
} else {
|
||||||
viewBinding.titleTipsTv.setText(getString(R.string.received_txt1) + redpacketGroupBean.getGrabbers().size() + "/" + redpacketGroupBean.getCount() + getString(R.string.ge_gong_txt)
|
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;
|
// return country;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
if(ApiService.AREA_CODE.equals("+86")){
|
// if(ApiService.AREA_CODE.equals("+86")){
|
||||||
return new CountryBean("+86", context.getString(R.string.zhongguo_txt));
|
// return new CountryBean("+86", context.getString(R.string.zhongguo_txt));
|
||||||
}else{
|
// }else{
|
||||||
return new CountryBean("+886",context.getString(R.string.taiwan_txt));
|
// 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.DataUtils;
|
||||||
import com.hbl.yuliao.utils.GsonUtils;
|
import com.hbl.yuliao.utils.GsonUtils;
|
||||||
import com.hbl.yuliao.utils.LogUtils;
|
import com.hbl.yuliao.utils.LogUtils;
|
||||||
import com.hbl.yuliao.utils.ScreenUtils;
|
|
||||||
import com.hbl.yuliao.widget.CircleImageView;
|
import com.hbl.yuliao.widget.CircleImageView;
|
||||||
//import com.ethanhua.skeleton.Skeleton;
|
//import com.ethanhua.skeleton.Skeleton;
|
||||||
//import com.ethanhua.skeleton.SkeletonScreen;
|
//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.repo.ContactRepo;
|
||||||
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
||||||
import com.netease.yunxin.kit.common.ui.fragments.BaseFragment;
|
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.IMKitClient;
|
||||||
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
||||||
|
|
||||||
@@ -240,6 +240,9 @@ public class CircleFragment extends BaseFragment {
|
|||||||
.skipMemoryCache(false)
|
.skipMemoryCache(false)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
||||||
linearLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
|
linearLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
|
||||||
|
if(ScreenUtils.getDisplayWidth()>1800){
|
||||||
|
linearLayoutManager = new StaggeredGridLayoutManager(4, StaggeredGridLayoutManager.VERTICAL);
|
||||||
|
}
|
||||||
linearLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_NONE);
|
linearLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_NONE);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import android.graphics.Color;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
@@ -28,14 +29,6 @@ import androidx.core.content.ContextCompat;
|
|||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
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.bumptech.glide.Glide;
|
||||||
import com.hbl.yuliao.IMApplication;
|
import com.hbl.yuliao.IMApplication;
|
||||||
import com.hbl.yuliao.IMUIKitConfig;
|
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.adapter.ViewHolder;
|
||||||
import com.hbl.yuliao.databinding.ActivityPushBinding;
|
import com.hbl.yuliao.databinding.ActivityPushBinding;
|
||||||
import com.hbl.yuliao.dialog.SelectPushTypeDialog;
|
import com.hbl.yuliao.dialog.SelectPushTypeDialog;
|
||||||
import com.hbl.yuliao.model.StsCredentialsBean;
|
|
||||||
import com.hbl.yuliao.network.Api;
|
import com.hbl.yuliao.network.Api;
|
||||||
import com.hbl.yuliao.network.BaseObserver;
|
import com.hbl.yuliao.network.BaseObserver;
|
||||||
import com.hbl.yuliao.network.Result;
|
import com.hbl.yuliao.network.Result;
|
||||||
import com.hbl.yuliao.utils.Constant;
|
import com.hbl.yuliao.utils.Constant;
|
||||||
import com.hbl.yuliao.utils.DataUtils;
|
|
||||||
import com.hbl.yuliao.utils.GsonUtils;
|
import com.hbl.yuliao.utils.GsonUtils;
|
||||||
import com.hbl.yuliao.utils.ItemDragTouchHelperCallback;
|
import com.hbl.yuliao.utils.ItemDragTouchHelperCallback;
|
||||||
import com.hbl.yuliao.utils.LogUtils;
|
import com.hbl.yuliao.utils.LogUtils;
|
||||||
|
import com.hbl.yuliao.utils.UpdateUtils;
|
||||||
import com.hbl.yuliao.widget.CircleImageView;
|
import com.hbl.yuliao.widget.CircleImageView;
|
||||||
import com.luck.picture.lib.basic.PictureSelector;
|
import com.luck.picture.lib.basic.PictureSelector;
|
||||||
import com.luck.picture.lib.config.SelectMimeType;
|
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.IMKitClient;
|
||||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
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.File;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
@@ -120,7 +103,7 @@ public class PushActivity extends BaseActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
getWindow().setStatusBarColor(getResources().getColor(R.color.color_white));
|
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");
|
ALog.d(Constant.PROJECT_TAG, TAG, "onCreateView");
|
||||||
IMApplication.setColdStart(true);
|
IMApplication.setColdStart(true);
|
||||||
@@ -236,18 +219,10 @@ public class PushActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
activityWelcomeBinding.backIv.setOnClickListener(v -> onBackPressed());
|
activityWelcomeBinding.backIv.setOnClickListener(v -> onBackPressed());
|
||||||
activityWelcomeBinding.userTypeTv.setOnClickListener(new View.OnClickListener() {
|
activityWelcomeBinding.userTypeLy.setOnClickListener(v -> {
|
||||||
@Override
|
SelectPushTypeDialog selectPushTypeDialog = new SelectPushTypeDialog(PushActivity.this, pushType);
|
||||||
public void onClick(View v) {
|
selectPushTypeDialog.setOnToVipListener(type -> changTopType(type));
|
||||||
SelectPushTypeDialog selectPushTypeDialog = new SelectPushTypeDialog(PushActivity.this, pushType);
|
selectPushTypeDialog.show();
|
||||||
selectPushTypeDialog.setOnToVipListener(new SelectPushTypeDialog.OnToTypeListener() {
|
|
||||||
@Override
|
|
||||||
public void toType(int type) {
|
|
||||||
changTopType(type);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
selectPushTypeDialog.show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
activityWelcomeBinding.pushBt.setOnClickListener(new View.OnClickListener() {
|
activityWelcomeBinding.pushBt.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -275,231 +250,66 @@ public class PushActivity extends BaseActivity {
|
|||||||
if (isPush) {
|
if (isPush) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
hideSoftInput(PushActivity.this);
|
||||||
isPush = true;
|
isPush = true;
|
||||||
toShangchuanAli();
|
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";
|
UpdateUtils updateUtils;
|
||||||
String updatePathVideo = "video_input";
|
int updateIndex = 0;
|
||||||
|
String pathName = "pic_input";
|
||||||
UploadOptions options = new UploadOptions(null, null, true,
|
private void toShangchuanAli() {
|
||||||
(key, percent) -> {
|
showLoadingDialog("正在发布动态…");
|
||||||
LogUtils.i("结果是啥进度:" + percent);
|
updateUtils = new UpdateUtils();
|
||||||
}, () -> {
|
if (localMedias.get(0).getMimeType().contains("video")) {
|
||||||
LogUtils.i("结果是啥进度112222222111:");
|
pathName = "video_input";
|
||||||
return false;
|
}
|
||||||
});
|
updateUtils.toShangchuanAli(PushActivity.this,new File(localMedias.get(updateIndex).getRealPath()), pathName,new UpdateUtils.OnToActionListener() {
|
||||||
Configuration configuration = new Configuration.Builder()
|
@Override
|
||||||
.build();
|
public void toSumbitSuccess(String path) {
|
||||||
UploadManager uploadManager = new UploadManager(configuration);
|
if (localMedias.get(0).getMimeType().contains("video")) {
|
||||||
|
outputStrings.add(path);
|
||||||
String data = DataUtils.getCurrentTimeTypeNoline(System.currentTimeMillis());
|
toPush();
|
||||||
|
} else {
|
||||||
if (i < uris.size()) {
|
outputStrings.add(path);
|
||||||
File file = new File(localMedias.get(i).getRealPath());
|
if (updateIndex == uris.size() - 1) {
|
||||||
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) {
|
|
||||||
toPush();
|
toPush();
|
||||||
} else {
|
} 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) {
|
@Override
|
||||||
// 使用ByteArrayOutputStream来收集字节数据
|
public void toSumbitFails(String message) {
|
||||||
FileInputStream fis = null;
|
dimessLoadingDialog();
|
||||||
try {
|
ToastX.showShortToast(message);
|
||||||
fis = new FileInputStream(file);
|
}
|
||||||
byte[] bytesArray = new byte[(int) file.length()];
|
},handler);
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
// //
|
public Handler handler = new 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());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
private void toPush() {
|
private void toPush() {
|
||||||
LogUtils.i("上传的数据:" + GsonUtils.beanToJSONString(outputStrings));
|
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<>();
|
List<MultipartBody.Part> map = new ArrayList<>();
|
||||||
|
|
||||||
@@ -804,15 +614,15 @@ public class PushActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void changeRight(boolean b) {
|
private void changeRight(boolean b) {
|
||||||
if (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.setTextColor(getResources().getColor(R.color.color_white));
|
||||||
activityWelcomeBinding.pushBt.setVisibility(View.VISIBLE);
|
activityWelcomeBinding.pushBt.setVisibility(View.VISIBLE);
|
||||||
activityWelcomeBinding.pushBt.setBackgroundResource(R.drawable.button_true_bg);
|
activityWelcomeBinding.pushBt.setBackgroundResource(R.drawable.button_true_bg_yl);
|
||||||
} else {
|
} 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.setTextColor(getResources().getColor(R.color.color_999999));
|
||||||
activityWelcomeBinding.pushBt.setVisibility(View.VISIBLE);
|
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() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ public class VoomFragment extends BaseFragment {
|
|||||||
|
|
||||||
private void initShow() {
|
private void initShow() {
|
||||||
|
|
||||||
titles = new ArrayList<>(3);
|
titles = new ArrayList<>(2);
|
||||||
titles.add(getString(R.string.tuijian_txt));
|
titles.add(getString(R.string.tuijian_txt));
|
||||||
titles.add(getString(R.string.haoyou_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 = new ArrayList<>();
|
||||||
listFragment.add(discoverFragment=CircleFragment.newInstance(0));
|
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.DataUtils;
|
||||||
import com.hbl.yuliao.utils.GsonUtils;
|
import com.hbl.yuliao.utils.GsonUtils;
|
||||||
import com.hbl.yuliao.utils.LogUtils;
|
import com.hbl.yuliao.utils.LogUtils;
|
||||||
import com.hbl.yuliao.utils.ScreenUtils;
|
|
||||||
import com.hbl.yuliao.voom.TiktokActivity;
|
import com.hbl.yuliao.voom.TiktokActivity;
|
||||||
import com.hbl.yuliao.widget.CircleImageView;
|
import com.hbl.yuliao.widget.CircleImageView;
|
||||||
//import com.ethanhua.skeleton.Skeleton;
|
//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.repo.ContactRepo;
|
||||||
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
||||||
import com.netease.yunxin.kit.common.ui.fragments.BaseFragment;
|
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.IMKitClient;
|
||||||
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
import com.netease.yunxin.kit.corekit.im.model.FriendInfo;
|
||||||
|
|
||||||
@@ -255,6 +255,9 @@ public class CircleFragment1 extends BaseFragment {
|
|||||||
.skipMemoryCache(false)
|
.skipMemoryCache(false)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
||||||
linearLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
|
linearLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
|
||||||
|
if(ScreenUtils.getDisplayWidth()>1800){
|
||||||
|
linearLayoutManager = new StaggeredGridLayoutManager(4, StaggeredGridLayoutManager.VERTICAL);
|
||||||
|
}
|
||||||
linearLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_NONE);
|
linearLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_NONE);
|
||||||
// linearLayoutManager.setReverseLayout(true);
|
// linearLayoutManager.setReverseLayout(true);
|
||||||
//防止item 交换位置
|
//防止item 交换位置
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
@@ -13,6 +14,14 @@ import androidx.activity.result.contract.ActivityResultContracts;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.ContextCompat;
|
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.bumptech.glide.Glide;
|
||||||
import com.hbl.yuliao.IMUIKitConfig;
|
import com.hbl.yuliao.IMUIKitConfig;
|
||||||
import com.hbl.yuliao.R;
|
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.databinding.ActivityBindWechatAlipayBinding;
|
||||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||||
import com.hbl.yuliao.main.mine.ChangeAccoutActionActivity;
|
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.BindBean;
|
||||||
import com.hbl.yuliao.model.PayInfoWxBean;
|
import com.hbl.yuliao.model.PayInfoWxBean;
|
||||||
|
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||||
import com.hbl.yuliao.model.WalletBean;
|
import com.hbl.yuliao.model.WalletBean;
|
||||||
import com.hbl.yuliao.network.Api;
|
import com.hbl.yuliao.network.Api;
|
||||||
import com.hbl.yuliao.network.BaseObserver;
|
import com.hbl.yuliao.network.BaseObserver;
|
||||||
import com.hbl.yuliao.network.Result;
|
import com.hbl.yuliao.network.Result;
|
||||||
import com.hbl.yuliao.utils.GsonUtils;
|
import com.hbl.yuliao.utils.GsonUtils;
|
||||||
import com.hbl.yuliao.utils.LogUtils;
|
import com.hbl.yuliao.utils.LogUtils;
|
||||||
|
import com.hbl.yuliao.utils.UpdateUtils;
|
||||||
import com.luck.picture.lib.basic.PictureSelector;
|
import com.luck.picture.lib.basic.PictureSelector;
|
||||||
import com.luck.picture.lib.config.SelectMimeType;
|
import com.luck.picture.lib.config.SelectMimeType;
|
||||||
import com.luck.picture.lib.entity.LocalMedia;
|
import com.luck.picture.lib.entity.LocalMedia;
|
||||||
@@ -59,6 +72,9 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
import okhttp3.MediaType;
|
||||||
|
import okhttp3.MultipartBody;
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
public class AddOrChangeUSDTActivity extends BaseActivity {
|
public class AddOrChangeUSDTActivity extends BaseActivity {
|
||||||
ActivityBindUsdtBinding viewBinding;
|
ActivityBindUsdtBinding viewBinding;
|
||||||
@@ -103,18 +119,10 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
|||||||
getWallet();
|
getWallet();
|
||||||
bindInfo();
|
bindInfo();
|
||||||
authPayInfo();
|
authPayInfo();
|
||||||
viewBinding.editIv.setOnClickListener(new View.OnClickListener() {
|
viewBinding.editIv.setOnClickListener(v -> {
|
||||||
@Override
|
viewBinding.contactListActivityTitleBar.setTitle("修改钱包地址");
|
||||||
public void onClick(View v) {
|
viewBinding.changeLy.setVisibility(View.VISIBLE);
|
||||||
viewBinding.editIv.setOnClickListener(new View.OnClickListener() {
|
viewBinding.needDataLy.setVisibility(View.GONE);
|
||||||
@Override
|
|
||||||
public void onClick(View 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) {
|
private void showType(PayInfoWxBean feedbackResp) {
|
||||||
if(feedbackResp!=null&&!TextUtils.isEmpty(feedbackResp.getUsdtAddress())){
|
if(feedbackResp!=null&&!TextUtils.isEmpty(feedbackResp.getUsdtAddress())){
|
||||||
|
payInfoWxBean = feedbackResp;
|
||||||
viewBinding.needDataLy.setVisibility(View.VISIBLE);
|
viewBinding.needDataLy.setVisibility(View.VISIBLE);
|
||||||
viewBinding.contactListActivityTitleBar.setTitle("我的USDT钱包地址");
|
viewBinding.contactListActivityTitleBar.setTitle("我的USDT钱包地址");
|
||||||
viewBinding.addressTv.setText(""+feedbackResp.getUsdtAddress());
|
viewBinding.addressTv.setText(""+feedbackResp.getUsdtAddress());
|
||||||
@@ -208,7 +217,7 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
|||||||
.setMaxSelectNum(1)
|
.setMaxSelectNum(1)
|
||||||
// .setMaxVideoSelectNum(9)
|
// .setMaxVideoSelectNum(9)
|
||||||
.setSelectorUIStyle(selectorStyle)
|
.setSelectorUIStyle(selectorStyle)
|
||||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
.forResult(new OnResultCallbackListener<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResult(ArrayList<LocalMedia> result) {
|
public void onResult(ArrayList<LocalMedia> result) {
|
||||||
for (int i = 0; i < result.size(); ++i) {
|
for (int i = 0; i < result.size(); ++i) {
|
||||||
@@ -231,7 +240,7 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
|||||||
Api.getInstance().bindInfo(IMKitClient.account())
|
Api.getInstance().bindInfo(IMKitClient.account())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
.subscribe(new BaseObserver<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||||
bindBean = feedbackResp.data;
|
bindBean = feedbackResp.data;
|
||||||
@@ -252,18 +261,21 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
|||||||
|
|
||||||
viewBinding.imageIv.setOnClickListener(v -> choicePhoto());
|
viewBinding.imageIv.setOnClickListener(v -> choicePhoto());
|
||||||
|
|
||||||
viewBinding.sumbitBt.setOnClickListener(new View.OnClickListener() {
|
viewBinding.sumbitBt.setOnClickListener(v -> {
|
||||||
@Override
|
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||||
public void onClick(View v) {
|
ToastX.showShortToast("请输入您的钱包地址");
|
||||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
return;
|
||||||
ToastX.showShortToast("请输入您的钱包地址");
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (imageFile == null) {
|
if (imageFile == null) {
|
||||||
|
if(payInfoWxBean==null||TextUtils.isEmpty(payInfoWxBean.getUsdtUrl())) {
|
||||||
ToastX.showShortToast("上传钱包地址二维码");
|
ToastX.showShortToast("上传钱包地址二维码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(imageFile==null){
|
||||||
|
toPush(payInfoWxBean.getUsdtUrl());
|
||||||
|
}else{
|
||||||
toShangchuanAli(imageFile);
|
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() {
|
private void getWallet() {
|
||||||
Api.getInstance().walletInfo(IMKitClient.account())
|
Api.getInstance().walletInfo(IMKitClient.account())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
@@ -384,88 +353,56 @@ public class AddOrChangeUSDTActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String stsCredentialsBean;
|
UpdateUtils updateUtils;
|
||||||
|
|
||||||
private void toShangchuanAli(File file) {
|
private void toShangchuanAli(File file) {
|
||||||
showLoadingDialog("正在上传图片");
|
showLoadingDialog("正在上传图片");
|
||||||
Api.getInstance().stsCredentials1()
|
updateUtils = new UpdateUtils();
|
||||||
.subscribeOn(Schedulers.io())
|
updateUtils.toShangchuanAli(AddOrChangeUSDTActivity.this,file, "usdt",new UpdateUtils.OnToActionListener() {
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
@Override
|
||||||
.subscribe(new BaseObserver<>() {
|
public void toSumbitSuccess(String path) {
|
||||||
@Override
|
dimessLoadingDialog();
|
||||||
public void onSuccess(Result<String> feedbackResp) {
|
toPush(path);
|
||||||
stsCredentialsBean = feedbackResp.data;
|
}
|
||||||
// toAliYunOss(file, isHead);
|
|
||||||
toQIiNiuYunOss(file);
|
@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 LoadingDialog loadingDialog;
|
||||||
|
|
||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
// if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
// loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
// loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showLoadingDialog(String msg) {
|
public void showLoadingDialog(String msg) {
|
||||||
// if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
// loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
// loadingDialog.setLoadingText(msg);
|
loadingDialog.setLoadingText(msg);
|
||||||
// loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void dimessLoadingDialog() {
|
public void dimessLoadingDialog() {
|
||||||
// if (loadingDialog != null) {
|
if (loadingDialog != null) {
|
||||||
// loadingDialog.dismiss();
|
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) {
|
private void toPush(String key) {
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
map.put("usdtAddress", viewBinding.nameEt.getText().toString().trim());
|
map.put("usdtAddress", viewBinding.nameEt.getText().toString().trim());
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.content.Intent;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
@@ -13,6 +14,14 @@ import androidx.activity.result.contract.ActivityResultContracts;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.ContextCompat;
|
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.bumptech.glide.Glide;
|
||||||
import com.hbl.yuliao.IMUIKitConfig;
|
import com.hbl.yuliao.IMUIKitConfig;
|
||||||
import com.hbl.yuliao.R;
|
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.databinding.ActivityShimingBinding;
|
||||||
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
import com.hbl.yuliao.dialog.ActionConfirmDialog;
|
||||||
import com.hbl.yuliao.main.mine.ChangeAccoutActionActivity;
|
import com.hbl.yuliao.main.mine.ChangeAccoutActionActivity;
|
||||||
|
import com.hbl.yuliao.model.AvaterBean;
|
||||||
import com.hbl.yuliao.model.BindBean;
|
import com.hbl.yuliao.model.BindBean;
|
||||||
|
import com.hbl.yuliao.model.StsCredentialsBean;
|
||||||
import com.hbl.yuliao.model.WalletBean;
|
import com.hbl.yuliao.model.WalletBean;
|
||||||
import com.hbl.yuliao.network.Api;
|
import com.hbl.yuliao.network.Api;
|
||||||
import com.hbl.yuliao.network.BaseObserver;
|
import com.hbl.yuliao.network.BaseObserver;
|
||||||
import com.hbl.yuliao.network.Result;
|
import com.hbl.yuliao.network.Result;
|
||||||
import com.hbl.yuliao.utils.GsonUtils;
|
import com.hbl.yuliao.utils.GsonUtils;
|
||||||
import com.hbl.yuliao.utils.LogUtils;
|
import com.hbl.yuliao.utils.LogUtils;
|
||||||
|
import com.hbl.yuliao.utils.UpdateUtils;
|
||||||
import com.luck.picture.lib.basic.PictureSelector;
|
import com.luck.picture.lib.basic.PictureSelector;
|
||||||
import com.luck.picture.lib.config.SelectMimeType;
|
import com.luck.picture.lib.config.SelectMimeType;
|
||||||
import com.luck.picture.lib.entity.LocalMedia;
|
import com.luck.picture.lib.entity.LocalMedia;
|
||||||
@@ -64,6 +76,9 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
import okhttp3.MediaType;
|
||||||
|
import okhttp3.MultipartBody;
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
public class BindWeChatOrAliPayActivity extends BaseActivity {
|
public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||||
ActivityBindWechatAlipayBinding viewBinding;
|
ActivityBindWechatAlipayBinding viewBinding;
|
||||||
@@ -154,7 +169,7 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
|||||||
.setMaxSelectNum(1)
|
.setMaxSelectNum(1)
|
||||||
// .setMaxVideoSelectNum(9)
|
// .setMaxVideoSelectNum(9)
|
||||||
.setSelectorUIStyle(selectorStyle)
|
.setSelectorUIStyle(selectorStyle)
|
||||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
.forResult(new OnResultCallbackListener<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResult(ArrayList<LocalMedia> result) {
|
public void onResult(ArrayList<LocalMedia> result) {
|
||||||
for (int i = 0; i < result.size(); ++i) {
|
for (int i = 0; i < result.size(); ++i) {
|
||||||
@@ -177,7 +192,7 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
|||||||
Api.getInstance().bindInfo(IMKitClient.account())
|
Api.getInstance().bindInfo(IMKitClient.account())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
.subscribe(new BaseObserver<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||||
bindBean = feedbackResp.data;
|
bindBean = feedbackResp.data;
|
||||||
@@ -205,33 +220,30 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
|||||||
|
|
||||||
viewBinding.imageIv.setOnClickListener(v -> choicePhoto());
|
viewBinding.imageIv.setOnClickListener(v -> choicePhoto());
|
||||||
|
|
||||||
viewBinding.sumbitBt.setOnClickListener(new View.OnClickListener() {
|
viewBinding.sumbitBt.setOnClickListener(v -> {
|
||||||
@Override
|
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||||
public void onClick(View v) {
|
ToastX.showShortToast("请输入您的真实姓名");
|
||||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
return;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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() {
|
private void getWallet() {
|
||||||
Api.getInstance().walletInfo(IMKitClient.account())
|
Api.getInstance().walletInfo(IMKitClient.account())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
@@ -326,9 +295,6 @@ public class BindWeChatOrAliPayActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void changeInfo() {
|
private void changeInfo() {
|
||||||
if (walletBean != null) {
|
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)
|
Glide.with(BindWeChatOrAliPayActivity.this)
|
||||||
.load(file.getAbsolutePath())
|
.load(file.getAbsolutePath())
|
||||||
.into(viewBinding.imageIv);
|
.into(viewBinding.imageIv);
|
||||||
|
|
||||||
// toShangchuanAli(file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UpdateUtils updateUtils;
|
||||||
String stsCredentialsBean;
|
|
||||||
|
|
||||||
private void toShangchuanAli(File file) {
|
private void toShangchuanAli(File file) {
|
||||||
showLoadingDialog("正在上传图片");
|
showLoadingDialog("正在上传图片");
|
||||||
Api.getInstance().stsCredentials1()
|
updateUtils = new UpdateUtils();
|
||||||
.subscribeOn(Schedulers.io())
|
updateUtils.toShangchuanAli(BindWeChatOrAliPayActivity.this,file, isWeChat ? "wechat" : "alipay",new UpdateUtils.OnToActionListener() {
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
@Override
|
||||||
.subscribe(new BaseObserver<>() {
|
public void toSumbitSuccess(String path) {
|
||||||
@Override
|
dimessLoadingDialog();
|
||||||
public void onSuccess(Result<String> feedbackResp) {
|
toPush(path);
|
||||||
stsCredentialsBean = feedbackResp.data;
|
}
|
||||||
// toAliYunOss(file, isHead);
|
|
||||||
toQIiNiuYunOss(file);
|
|
||||||
|
|
||||||
}
|
@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 LoadingDialog loadingDialog;
|
||||||
|
|
||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
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) {
|
private void toPush(String key) {
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
if (isWeChat) {
|
if (isWeChat) {
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ public class MyWalletActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void changeInfo() {
|
private void changeInfo() {
|
||||||
// if (walletBean != null) {
|
// if (walletBean != null) {
|
||||||
viewBinding.jinbiYueTv.setText("¥ " + AppUtils.getQian(walletBean.getGoldCoin()));
|
viewBinding.jinbiYueTv.setText(" " + AppUtils.getQian(walletBean.getGoldCoin()));
|
||||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -289,6 +289,8 @@ public class SetPayPasswordActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ import java.io.FileInputStream;
|
|||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -88,7 +89,7 @@ public class SumbitUsdtActivity extends BaseActivity {
|
|||||||
List<String> outputStrings = new ArrayList<>();
|
List<String> outputStrings = new ArrayList<>();
|
||||||
int number = 0;
|
int number = 0;
|
||||||
private SumbitUsdtActivityBinding viewBinding;
|
private SumbitUsdtActivityBinding viewBinding;
|
||||||
|
long orderId = 0;
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
// getWindow().setStatusBarColor(getResources().getColor(R.color.color_fcfcfc));
|
// getWindow().setStatusBarColor(getResources().getColor(R.color.color_fcfcfc));
|
||||||
@@ -101,6 +102,7 @@ public class SumbitUsdtActivity extends BaseActivity {
|
|||||||
|
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
number = getIntent().getIntExtra("number",0);
|
number = getIntent().getIntExtra("number",0);
|
||||||
|
orderId = getIntent().getLongExtra("order_id",0);
|
||||||
viewBinding.mainAboutTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
viewBinding.mainAboutTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
||||||
viewBinding.numberTv.setText(number+"");
|
viewBinding.numberTv.setText(number+"");
|
||||||
initAdapter();
|
initAdapter();
|
||||||
@@ -110,6 +112,12 @@ public class SumbitUsdtActivity extends BaseActivity {
|
|||||||
viewBinding.tijiaoTv.setOnClickListener(v -> {
|
viewBinding.tijiaoTv.setOnClickListener(v -> {
|
||||||
|
|
||||||
KeyboardUtil.hideSoftInput(SumbitUsdtActivity.this);
|
KeyboardUtil.hideSoftInput(SumbitUsdtActivity.this);
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(viewBinding.beizhuEt.getText().toString().trim())){
|
||||||
|
ToastX.showShortToast("交易hash不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (localMedias == null || localMedias.size() == 0) {
|
if (localMedias == null || localMedias.size() == 0) {
|
||||||
ToastX.showShortToast("请先上传充值凭证");
|
ToastX.showShortToast("请先上传充值凭证");
|
||||||
} else {
|
} else {
|
||||||
@@ -188,7 +196,7 @@ public class SumbitUsdtActivity extends BaseActivity {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
private void toUpdateOssNew( int i) {
|
private void toUpdateOssNew( int i) {
|
||||||
String updatePathPic = "userAvatarFileName";
|
String updatePathPic = "recharge";
|
||||||
UploadOptions options = new UploadOptions(null, null, true,
|
UploadOptions options = new UploadOptions(null, null, true,
|
||||||
(key, percent) -> {
|
(key, percent) -> {
|
||||||
LogUtils.i("结果是啥进度:" + percent);
|
LogUtils.i("结果是啥进度:" + percent);
|
||||||
@@ -230,24 +238,21 @@ public class SumbitUsdtActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void sumbit() {
|
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++) {
|
Api.getInstance().rechargeOrder(map)
|
||||||
MultipartBody.Part imageBodyPart = MultipartBody.Part.createFormData("screenshot" + (i + 1), outputStrings.get(i));
|
|
||||||
map.add(imageBodyPart);
|
|
||||||
}
|
|
||||||
|
|
||||||
Api.getInstance().report(map)
|
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<Result>() {
|
.subscribe(new BaseObserver<Result>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result feedbackResp) {
|
public void onSuccess(Result feedbackResp) {
|
||||||
dimessLoadingDialog();
|
dimessLoadingDialog();
|
||||||
if (feedbackResp.data != null) {
|
ToastX.showShortToast("充值申请提交成功");
|
||||||
|
finish();
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -266,6 +271,8 @@ public class SumbitUsdtActivity extends BaseActivity {
|
|||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
if (loadingDialog == null)
|
if (loadingDialog == null)
|
||||||
loadingDialog = new LoadingDialog(this);
|
loadingDialog = new LoadingDialog(this);
|
||||||
|
loadingDialog.setLoadingText("Loading…");
|
||||||
|
|
||||||
loadingDialog.show();
|
loadingDialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
int defaultIndex = 0; //输入的金额
|
int defaultIndex = 0; //输入的金额
|
||||||
private boolean isFenqi = false;
|
private boolean isFenqi = false;
|
||||||
private int installmentNum; //分期數
|
private int installmentNum; //分期數
|
||||||
TiXianConfBean bankConfBean;
|
|
||||||
TiXianConfBean aliPayConfBean;
|
|
||||||
TiXianConfBean tiXianConfBean;
|
TiXianConfBean tiXianConfBean;
|
||||||
|
|
||||||
ArrayList<BankBean> bankBeans = new ArrayList<>();
|
ArrayList<BankBean> bankBeans = new ArrayList<>();
|
||||||
@@ -87,17 +85,15 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
viewBinding = ActivityTixianBinding.inflate(getLayoutInflater());
|
viewBinding = ActivityTixianBinding.inflate(getLayoutInflater());
|
||||||
setContentView(viewBinding.getRoot());
|
setContentView(viewBinding.getRoot());
|
||||||
initView();
|
initView();
|
||||||
viewBinding.rbBank.setVisibility(View.GONE);
|
|
||||||
viewBinding.rbAlipay.setVisibility(View.GONE);
|
|
||||||
getConf();
|
getConf();
|
||||||
getWallet();
|
getWallet();
|
||||||
getBankList();
|
// getBankList();
|
||||||
authPayInfo();
|
viewBinding.toBindBt.setOnClickListener(v -> startActivity(new Intent(TiXianActivity.this, AddOrChangeUSDTActivity.class)));
|
||||||
|
|
||||||
viewBinding.allTxTv.setPaintFlags(viewBinding.allTxTv.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);
|
viewBinding.allTxTv.setPaintFlags(viewBinding.allTxTv.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PayInfoWxBean payInfoWxBean;
|
||||||
private void authPayInfo() {
|
private void authPayInfo() {
|
||||||
Api.getInstance().authPayInfo()
|
Api.getInstance().authPayInfo()
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
@@ -106,24 +102,22 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<PayInfoWxBean> feedbackResp) {
|
public void onSuccess(Result<PayInfoWxBean> feedbackResp) {
|
||||||
if(feedbackResp!=null&&feedbackResp.data!=null){
|
if(feedbackResp!=null&&feedbackResp.data!=null){
|
||||||
if(!TextUtils.isEmpty(feedbackResp.data.getAlipayNo())){
|
payInfoWxBean = feedbackResp.data;
|
||||||
BankBean bankBean = new BankBean();
|
if(!TextUtils.isEmpty(feedbackResp.data.getUsdtAddress())){
|
||||||
bankBean.setBankName("支付宝");
|
viewBinding.walletLy.setVisibility(View.VISIBLE);
|
||||||
bankBean.setCardholderName(feedbackResp.data.getAlipayRealName());
|
viewBinding.toBindBt.setVisibility(View.GONE);
|
||||||
bankBean.setNumber(feedbackResp.data.getAlipayNo());
|
viewBinding.walletTv.setText(feedbackResp.data.getUsdtAddress());
|
||||||
bankBean.setId(-1);
|
}else{
|
||||||
aliPayBeans.clear();
|
viewBinding.walletLy.setVisibility(View.GONE);
|
||||||
aliPayBeans.add(bankBean);
|
viewBinding.toBindBt.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
if(viewBinding.rbAlipay.isChecked()){
|
|
||||||
showAlipay();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(int code, String msg) {
|
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
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
authPayInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +154,7 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
shouxufei = tiXianConfBean.getBaseFee();
|
shouxufei = tiXianConfBean.getBaseFee();
|
||||||
}
|
}
|
||||||
double sizes = defaultIndex*1.0-shouxufei;
|
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{
|
}else{
|
||||||
viewBinding.showYujiTv.setVisibility(View.INVISIBLE);
|
viewBinding.showYujiTv.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
@@ -172,32 +167,6 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
public void afterTextChanged(Editable s) {
|
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 -> {
|
viewBinding.allTxTv.setOnClickListener(v -> {
|
||||||
if(walletBean!=null){
|
if(walletBean!=null){
|
||||||
@@ -213,18 +182,18 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
ToastX.showShortToast("请先输入提现金额");
|
ToastX.showShortToast("请先输入提现金额");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(walletBean==null){
|
// if(walletBean==null){
|
||||||
ToastX.showShortToast("获取钱包信息失败");
|
// ToastX.showShortToast("获取钱包信息失败");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if(Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())>walletBean.getGoldCoin()/100){
|
if(Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())>walletBean.getGoldCoin()/100){
|
||||||
ToastX.showShortToast("最多可以提取"+(walletBean.getGoldCoin()/100)+"元");
|
ToastX.showShortToast("最多可以提取"+(walletBean.getGoldCoin()/100)+"");
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (bankBean == null){
|
|
||||||
ToastX.showShortToast("请先选择提现渠道");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// if (bankBean == null){
|
||||||
|
// ToastX.showShortToast("请先选择提现渠道");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
PayDialog payDialog = new PayDialog(TiXianActivity.this, "", false);
|
PayDialog payDialog = new PayDialog(TiXianActivity.this, "", false);
|
||||||
payDialog.setOntoAlbumListener(new PayDialog.OnListItemClickListener() {
|
payDialog.setOntoAlbumListener(new PayDialog.OnListItemClickListener() {
|
||||||
@@ -247,10 +216,10 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
private void toSumbit() {
|
private void toSumbit() {
|
||||||
Map<String,Object> map = new HashMap<String, Object>();
|
Map<String,Object> map = new HashMap<String, Object>();
|
||||||
map.put("amount", Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())*100);
|
map.put("amount", Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())*100);
|
||||||
map.put("withdrawConfId", tiXianConfBean.getId()); //信用卡支付
|
map.put("withdrawConfId", 3); //信用卡支付
|
||||||
if(tiXianConfBean.getType() ==1){
|
// if(tiXianConfBean.getType() ==1){
|
||||||
map.put("bankCardId", bankBean.getId()); //信用卡支付
|
map.put("bankCardId", ""); //信用卡支付
|
||||||
}
|
// }
|
||||||
Api.getInstance().withdrawApply(map)
|
Api.getInstance().withdrawApply(map)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@@ -260,8 +229,10 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
// startToWeb(feedbackResp.data);
|
// startToWeb(feedbackResp.data);
|
||||||
//{"data":"https://z80.fenouliu.cc/pay/wechat/250428091839829744550037","code":1}
|
//{"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}
|
//{"data":"https://t501.pay24t.com/form/payorderzz.html?id=db04e412-be26-4946-8f06-c00c582137df","code":1}
|
||||||
|
ToastX.showShortToast("提现申请发送成功!");
|
||||||
viewBinding.editQueryEt.setText("");
|
viewBinding.editQueryEt.setText("");
|
||||||
getWallet();
|
getWallet();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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() {
|
private void getConf() {
|
||||||
Map<String, Object> conf = new HashMap<>();
|
Map<String, Object> conf = new HashMap<>();
|
||||||
conf.put("token", DataUtils.getToken());
|
conf.put("token", DataUtils.getToken());
|
||||||
@@ -360,15 +253,15 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
.subscribe(new BaseObserver<>() {
|
.subscribe(new BaseObserver<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Result<List<TiXianConfBean>> feedbackResp) {
|
public void onSuccess(Result<List<TiXianConfBean>> feedbackResp) {
|
||||||
// {"data":[{"id":1,"channel":"支付宝","code":"902","type":2,"baseFee":2.00,"feeRate":8.00,"status":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}],"code":1}
|
// {"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){
|
if(feedbackResp!=null&&feedbackResp.data!=null&&feedbackResp.data.size()>0){
|
||||||
for (int i = 0;i<feedbackResp.data.size();i++) {
|
for (int i = 0;i<feedbackResp.data.size();i++) {
|
||||||
if (feedbackResp.data.get(i).getType() == 1) {
|
if (feedbackResp.data.get(i).getType() == 3) {
|
||||||
bankConfBean = feedbackResp.data.get(i);
|
tiXianConfBean = feedbackResp.data.get(i);
|
||||||
} else if (feedbackResp.data.get(i).getType() == 2) {
|
|
||||||
aliPayConfBean = feedbackResp.data.get(i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -382,50 +275,34 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//
|
||||||
private void getBankList() {
|
// private void getBankList() {
|
||||||
|
//
|
||||||
Api.getInstance().getBanks()
|
// Api.getInstance().getBanks()
|
||||||
.subscribeOn(Schedulers.io())
|
// .subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
// .observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new BaseObserver<>() {
|
// .subscribe(new BaseObserver<>() {
|
||||||
@Override
|
// @Override
|
||||||
public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
// public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
||||||
if(feedbackResp!=null&&feedbackResp.data.size()>0){
|
// if(feedbackResp!=null&&feedbackResp.data.size()>0){
|
||||||
bankBeans = (ArrayList<BankBean>) feedbackResp.data;
|
// bankBeans = (ArrayList<BankBean>) feedbackResp.data;
|
||||||
if(viewBinding.rbBank.isChecked()){
|
// if(viewBinding.rbBank.isChecked()){
|
||||||
showBank();
|
// showBank();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onError(int code, String msg) {
|
// public void onError(int code, String msg) {
|
||||||
// ToastX.showShortToast(msg);
|
//// ToastX.showShortToast(msg);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
private void changeBottomType() {
|
private void changeBottomType() {
|
||||||
if(bankConfBean!=null){
|
|
||||||
tiXianConfBean = bankConfBean;
|
|
||||||
viewBinding.rbBank.setVisibility(View.VISIBLE);
|
|
||||||
viewBinding.shoukuanBt.setHint("请选择银行卡");
|
|
||||||
|
|
||||||
if(aliPayConfBean!=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>小时以内"));
|
||||||
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>小时以内"));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,7 +373,7 @@ public class TiXianActivity extends BaseActivity {
|
|||||||
|
|
||||||
|
|
||||||
private void changeInfo() {
|
private void changeInfo() {
|
||||||
viewBinding.dianshuTv.setText("¥ "+AppUtils.getQian(walletBean.getGoldCoin()));
|
viewBinding.dianshuTv.setText(" "+AppUtils.getQian(walletBean.getGoldCoin()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
|
|
||||||
import com.blankj.utilcode.util.StringUtils;
|
import com.blankj.utilcode.util.StringUtils;
|
||||||
import com.blankj.utilcode.util.ToastUtils;
|
import com.blankj.utilcode.util.ToastUtils;
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
import com.hbl.yuliao.IMUIKitConfig;
|
import com.hbl.yuliao.IMUIKitConfig;
|
||||||
import com.hbl.yuliao.R;
|
import com.hbl.yuliao.R;
|
||||||
import com.hbl.yuliao.adapter.CommonAdapter;
|
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.ChongZhiQuDaoBean;
|
||||||
import com.hbl.yuliao.model.ExchangeConfBean;
|
import com.hbl.yuliao.model.ExchangeConfBean;
|
||||||
import com.hbl.yuliao.model.InstallmentBean;
|
import com.hbl.yuliao.model.InstallmentBean;
|
||||||
|
import com.hbl.yuliao.model.RechargeAccountBean;
|
||||||
import com.hbl.yuliao.model.SendOrderBean;
|
import com.hbl.yuliao.model.SendOrderBean;
|
||||||
import com.hbl.yuliao.model.SeqBean;
|
import com.hbl.yuliao.model.SeqBean;
|
||||||
import com.hbl.yuliao.model.SeqBeanTop;
|
import com.hbl.yuliao.model.SeqBeanTop;
|
||||||
@@ -88,6 +90,26 @@ public class TopUpActivity extends BaseActivity {
|
|||||||
bindInfo();
|
bindInfo();
|
||||||
// getConf();
|
// getConf();
|
||||||
getConf1();
|
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() {
|
private void getConf1() {
|
||||||
@@ -183,10 +205,15 @@ public class TopUpActivity extends BaseActivity {
|
|||||||
ToastX.showShortToast("请先选择充值金额");
|
ToastX.showShortToast("请先选择充值金额");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(rechargeAccountBean==null){
|
||||||
|
ToastX.showShortToast("没有获取到充值账户");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// launchTRC20Wallet(TopUpActivity.this,"TSkB56Bib6iihk6zsUDfwgyXBqvkDvFzBz",defaultIndex+"");
|
// launchTRC20Wallet(TopUpActivity.this,"TSkB56Bib6iihk6zsUDfwgyXBqvkDvFzBz",defaultIndex+"");
|
||||||
Intent intent = new Intent(TopUpActivity.this,SumbitUsdtActivity.class);
|
Intent intent = new Intent(TopUpActivity.this,SumbitUsdtActivity.class);
|
||||||
intent.putExtra("number",defaultIndex);
|
intent.putExtra("number",defaultIndex);
|
||||||
|
intent.putExtra("order_id",rechargeAccountBean.getId());
|
||||||
|
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} );
|
} );
|
||||||
// AnimUtil.setAnimViews(viewBinding.topupTv);
|
// AnimUtil.setAnimViews(viewBinding.topupTv);
|
||||||
@@ -415,7 +442,7 @@ public class TopUpActivity extends BaseActivity {
|
|||||||
|
|
||||||
|
|
||||||
private void changeInfo() {
|
private void changeInfo() {
|
||||||
viewBinding.dianshuTv.setText("¥ "+AppUtils.getQian(walletBean.getGoldCoin()));
|
viewBinding.dianshuTv.setText(" "+AppUtils.getQian(walletBean.getGoldCoin()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import com.hbl.yuliao.login.LoginActivity;
|
|||||||
import com.hbl.yuliao.login.PhoneLoginActivity;
|
import com.hbl.yuliao.login.PhoneLoginActivity;
|
||||||
import com.hbl.yuliao.login.RegisterActivity;
|
import com.hbl.yuliao.login.RegisterActivity;
|
||||||
import com.hbl.yuliao.main.mine.UserHeadEditActivity;
|
import com.hbl.yuliao.main.mine.UserHeadEditActivity;
|
||||||
|
import com.hbl.yuliao.model.ConfigBean;
|
||||||
import com.hbl.yuliao.model.LoginBean;
|
import com.hbl.yuliao.model.LoginBean;
|
||||||
import com.hbl.yuliao.model.NotifyCountBean;
|
import com.hbl.yuliao.model.NotifyCountBean;
|
||||||
import com.hbl.yuliao.network.Api;
|
import com.hbl.yuliao.network.Api;
|
||||||
@@ -121,6 +122,7 @@ public class WelcomeActivity extends BaseActivity {
|
|||||||
} else {
|
} else {
|
||||||
activityWelcomeBinding.bottomLy.setVisibility(View.GONE);
|
activityWelcomeBinding.bottomLy.setVisibility(View.GONE);
|
||||||
showIsLogin(true);
|
showIsLogin(true);
|
||||||
|
getConfig();
|
||||||
new Handler().postDelayed(() -> {
|
new Handler().postDelayed(() -> {
|
||||||
showMainActivityAndFinish();
|
showMainActivityAndFinish();
|
||||||
}, 3 * 1000);
|
}, 3 * 1000);
|
||||||
@@ -235,7 +237,7 @@ public class WelcomeActivity extends BaseActivity {
|
|||||||
// 访问路劲
|
// 访问路劲
|
||||||
String path = uri.getPath();
|
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")) {
|
if (path.contains("add_user")) {
|
||||||
String goodsId = uri.getQueryParameter("userId");
|
String goodsId = uri.getQueryParameter("userId");
|
||||||
LogUtils.i("111111111userId: " + goodsId);
|
LogUtils.i("111111111userId: " + goodsId);
|
||||||
@@ -352,11 +354,11 @@ public class WelcomeActivity extends BaseActivity {
|
|||||||
loginBean.setCashFeeRate(feedbackResp.data.getCashFeeRate());
|
loginBean.setCashFeeRate(feedbackResp.data.getCashFeeRate());
|
||||||
loginBean.setSilverFeeRate(feedbackResp.data.getSilverFeeRate());
|
loginBean.setSilverFeeRate(feedbackResp.data.getSilverFeeRate());
|
||||||
loginBean.setMmSilverFeeRate(feedbackResp.data.getMmSilverFeeRate());
|
loginBean.setMmSilverFeeRate(feedbackResp.data.getMmSilverFeeRate());
|
||||||
|
loginBean.setUserAvatarFileName(feedbackResp.data.getUserAvatarFileName());
|
||||||
DataUtils.set(WelcomeActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
DataUtils.set(WelcomeActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
||||||
// IMKitClient.init(WelcomeActivity.this, null, IMApplication.getSdkOptions());
|
// IMKitClient.init(WelcomeActivity.this, null, IMApplication.getSdkOptions());
|
||||||
|
getConfig(account,token);
|
||||||
|
|
||||||
|
|
||||||
new Handler().postDelayed(() -> loginIM(account, token), 3000);
|
|
||||||
// new Handler().postDelayed(() -> showMainActivityAndFinish(), 3000);
|
// new Handler().postDelayed(() -> showMainActivityAndFinish(), 3000);
|
||||||
// showMainActivityAndFinish()
|
// showMainActivityAndFinish()
|
||||||
// new Handler().postDelayed(() -> {
|
// 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() {
|
private void showLoginView() {
|
||||||
LogUtils.i(TAG, "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"
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/big_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white"
|
android:background="#EEF0F7"
|
||||||
android:id="@+id/big_bg"
|
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
@@ -26,103 +26,102 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/change_ly"
|
android:id="@+id/change_ly"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/dp_15"
|
android:orientation="vertical"
|
||||||
android:orientation="vertical">
|
android:visibility="gone">
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="钱包地址"
|
|
||||||
android:textColor="#ff383838"
|
|
||||||
android:textSize="14sp"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<EditText
|
<LinearLayout
|
||||||
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
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
android:background="@color/white"
|
||||||
android:id="@+id/tips_tv"
|
android:orientation="vertical"
|
||||||
android:text="*请注意查看钱包网络类型,网络类型错误会造成资产丢失,请务必确认清楚"
|
android:padding="@dimen/dp_15">
|
||||||
android:textColor="#999999"
|
|
||||||
android:textSize="14sp"
|
<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
|
<Button
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_marginTop="@dimen/dp_100"
|
|
||||||
android:text="确定"
|
|
||||||
android:id="@+id/sumbit_bt"
|
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:background="@drawable/button_true_bg1"
|
||||||
|
android:text="确定"
|
||||||
android:textColor="#fff6f8fd"
|
android:textColor="#fff6f8fd"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -130,8 +129,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#F6F5F7"
|
android:background="#F6F5F7"
|
||||||
android:visibility="gone"
|
android:orientation="vertical"
|
||||||
android:orientation="vertical">
|
android:visibility="visible">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/bind_ly"
|
android:id="@+id/bind_ly"
|
||||||
@@ -140,80 +139,104 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/dp_15">
|
android:background="@drawable/index_user_bg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/index_user_bg"
|
android:layout_marginTop="15dp"
|
||||||
android:orientation="vertical">
|
android:layout_marginBottom="@dimen/dp_15"
|
||||||
|
android:orientation="horizontal">
|
||||||
<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" />
|
|
||||||
|
|
||||||
<TextView
|
<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_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="15dp"
|
android:layout_marginStart="15dp"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
android:text="网络类型:TRC20"
|
android:text="TRC20"
|
||||||
android:textColor="#ff333333"
|
android:textColor="@color/color_2c2c2c"
|
||||||
android:textSize="16sp" />
|
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>
|
</LinearLayout>
|
||||||
<ImageView
|
|
||||||
android:id="@+id/edit_iv"
|
<View
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="1px"
|
||||||
android:src="@mipmap/ustdt_edit_iv"
|
android:layout_marginStart="@dimen/dp_15"
|
||||||
android:visibility="gone"
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
android:layout_alignParentRight="true"/>
|
android:background="#EEF0F4" />
|
||||||
</RelativeLayout>
|
|
||||||
|
<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>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="#ff333333"
|
android:textColor="#ff333333"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_30"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
android:id="@+id/clyRoot"
|
android:id="@+id/clyRoot"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/color_fcfcfc"
|
android:background="@color/color_eefof7"
|
||||||
tools:context=".main.mine.EditUserInfoActivity"
|
tools:context=".main.mine.EditUserInfoActivity"
|
||||||
tools:ignore="MissingDefaultResource">
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:background="@color/white"
|
||||||
app:rightTitleText="@string/allread_text"
|
app:rightTitleText="@string/allread_text"
|
||||||
app:titleText="@string/editchatlist_text"
|
app:titleText="@string/editchatlist_text"
|
||||||
app:titleTextColor="@android:color/black" />
|
app:titleTextColor="@android:color/black" />
|
||||||
|
|||||||
@@ -43,37 +43,6 @@
|
|||||||
android:background="#FFFFFF"
|
android:background="#FFFFFF"
|
||||||
android:orientation="horizontal">
|
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
|
<RelativeLayout
|
||||||
@@ -112,6 +81,38 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</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
|
<RelativeLayout
|
||||||
android:id="@+id/live_btn_group"
|
android:id="@+id/live_btn_group"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -125,10 +126,10 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:drawableTop="@mipmap/voom_img_f"
|
android:drawableTop="@mipmap/index_img_f"
|
||||||
android:drawablePadding="3dp"
|
android:drawablePadding="3dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/voom_txt"
|
android:text="@string/dongtai_txt"
|
||||||
android:textColor="@color/color_babeca"
|
android:textColor="@color/color_babeca"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:srlAccentColor="@color/color_6b3689">
|
app:srlAccentColor="@color/color_498afa">
|
||||||
|
|
||||||
<com.hbl.yuliao.widget.BezierCircleHeader
|
<com.hbl.yuliao.widget.BezierCircleHeader
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
android:id="@+id/about_title_bar"
|
android:id="@+id/about_title_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/color_fffbfb"
|
android:background="@color/white"
|
||||||
app:titleText="@string/activity_msg"
|
app:titleText="@string/activity_msg"
|
||||||
tools:ignore="MissingConstraints" />
|
tools:ignore="MissingConstraints" />
|
||||||
|
|
||||||
|
|||||||
@@ -298,7 +298,7 @@
|
|||||||
android:layout_height="@dimen/dp_64"
|
android:layout_height="@dimen/dp_64"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility="visible">
|
android:visibility="gone">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/wdyhk_bt"
|
android:id="@+id/wdyhk_bt"
|
||||||
@@ -317,6 +317,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
android:background="#D8D8D8" />
|
android:background="#D8D8D8" />
|
||||||
@@ -326,7 +327,7 @@
|
|||||||
android:layout_height="@dimen/dp_64"
|
android:layout_height="@dimen/dp_64"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility="visible">
|
android:visibility="gone">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/wdwx_bt"
|
android:id="@+id/wdwx_bt"
|
||||||
@@ -347,6 +348,7 @@
|
|||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
|
android:visibility="gone"
|
||||||
android:background="#D8D8D8" />
|
android:background="#D8D8D8" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -354,7 +356,8 @@
|
|||||||
android:layout_height="@dimen/dp_64"
|
android:layout_height="@dimen/dp_64"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility="visible">
|
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/wdzfb_bt"
|
android:id="@+id/wdzfb_bt"
|
||||||
@@ -373,6 +376,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
android:background="#D8D8D8" />
|
android:background="#D8D8D8" />
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white"
|
android:background="@color/color_eefof7"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".welcome.WelcomeActivity"
|
tools:context=".welcome.WelcomeActivity"
|
||||||
tools:ignore="MissingDefaultResource">
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
android:layout_height="?actionBarSize">
|
android:layout_height="?actionBarSize">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back_iv"
|
android:id="@+id/back_iv"
|
||||||
@@ -23,33 +23,18 @@
|
|||||||
android:src="@mipmap/push_colose_img"
|
android:src="@mipmap/push_colose_img"
|
||||||
android:scaleType="centerInside"/>
|
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
|
<Button
|
||||||
android:id="@+id/push_bt"
|
android:id="@+id/push_bt"
|
||||||
android:layout_width="58dp"
|
android:layout_width="68dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="40dp"
|
||||||
android:background="@drawable/button_false_bg"
|
android:background="@drawable/button_false_bg_yl"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:text="@string/push_voom_txt"
|
android:text="@string/push_voom_txt"
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:textColor="@color/color_999999"
|
android:textColor="@color/color_999999"
|
||||||
android:textSize="14sp"
|
android:textSize="16sp"
|
||||||
/>
|
/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<View
|
<View
|
||||||
@@ -72,7 +57,7 @@
|
|||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
android:textColorHint="@color/color_bcbcbc"
|
android:textColorHint="@color/color_bcbcbc"
|
||||||
android:textColor="@color/color_333333"
|
android:textColor="@color/color_333333"
|
||||||
android:textSize="@dimen/sp_14" />
|
android:textSize="@dimen/sp_16" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/content_number_tv"
|
android:id="@+id/content_number_tv"
|
||||||
@@ -85,13 +70,14 @@
|
|||||||
android:maxLength="200"
|
android:maxLength="200"
|
||||||
android:layout_marginBottom="@dimen/dp_6"
|
android:layout_marginBottom="@dimen/dp_6"
|
||||||
android:textColor="@color/color_999999"
|
android:textColor="@color/color_999999"
|
||||||
android:textSize="12sp"
|
android:textSize="14sp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
|
android:visibility="gone"
|
||||||
android:background="@color/color_d8d8d8"/>
|
android:background="@color/color_d8d8d8"/>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -121,6 +107,8 @@
|
|||||||
android:hint="添加位置信息" />
|
android:hint="添加位置信息" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recylerview1"
|
android:id="@+id/recylerview1"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
@@ -128,7 +116,44 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingLeft="13dp"
|
android:paddingLeft="13dp"
|
||||||
android:paddingTop="@dimen/dp_25"
|
android:paddingTop="@dimen/dp_25"
|
||||||
android:paddingBottom="@dimen/dp_10"
|
android:paddingBottom="@dimen/dp_15"
|
||||||
android:paddingRight="13dp" />
|
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>
|
</LinearLayout>
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginRight="15dp"
|
android:layout_marginRight="15dp"
|
||||||
android:text="元"
|
android:text=""
|
||||||
android:textColor="@color/color_666666"
|
android:textColor="@color/color_666666"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
|
|||||||
@@ -79,10 +79,9 @@
|
|||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/dp_15"
|
android:paddingBottom="@dimen/dp_15"
|
||||||
android:background="@color/white"
|
|
||||||
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
@@ -100,11 +99,10 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="58dp"
|
android:layout_height="58dp"
|
||||||
android:background="@drawable/cornor_stroke_thempink_gray"
|
|
||||||
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
android:layout_marginTop="7.5dp"
|
android:layout_marginTop="15dp"
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
|
android:background="@drawable/cornor_stroke_thempink_gray"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
@@ -112,7 +110,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp_10"
|
android:layout_marginLeft="@dimen/dp_10"
|
||||||
android:text="¥"
|
android:text=""
|
||||||
android:textColor="@color/color_2c2c2c"
|
android:textColor="@color/color_2c2c2c"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
@@ -120,7 +118,6 @@
|
|||||||
android:id="@+id/edit_query_et"
|
android:id="@+id/edit_query_et"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
android:digits="0123456789"
|
android:digits="0123456789"
|
||||||
@@ -132,15 +129,15 @@
|
|||||||
android:textColor="@color/color_2c2c2c"
|
android:textColor="@color/color_2c2c2c"
|
||||||
android:textColorHint="#BCBCBC"
|
android:textColorHint="#BCBCBC"
|
||||||
android:textSize="24sp" />
|
android:textSize="24sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/all_tx_tv"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="全部提现"
|
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:id="@+id/all_tx_tv"
|
android:text="全部提现"
|
||||||
android:textColor="#ff4482ff"
|
android:textColor="#ff4482ff"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@@ -152,159 +149,136 @@
|
|||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/show_yuji_tv"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="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:layout_margin="@dimen/dp_15"
|
||||||
|
android:text="预计到账金额:"
|
||||||
android:textColor="#ff383838"
|
android:textColor="#ff383838"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
/>
|
android:visibility="invisible" />
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="@dimen/dp_10"
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
android:background="#EEF0F7" />
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
|
||||||
android:background="#D8D8D8" />
|
<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>
|
||||||
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
android:layout_marginStart="@dimen/dp_15"
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
android:text="提现说明:"
|
android:text="提现说明:"
|
||||||
android:textColor="#ff333333"
|
android:textStyle="bold"
|
||||||
android:textSize="14sp"
|
android:textColor="@color/color_2c2c2c"
|
||||||
/>
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tips_tv"
|
android:id="@+id/tips_tv"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
android:layout_marginStart="@dimen/dp_15"
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
android:lineSpacingExtra="@dimen/dp_4"
|
android:lineSpacingExtra="@dimen/dp_4"
|
||||||
android:text="单笔提现手续费2元\n提现费率0.5%\n预计到账时间2小时以内"
|
android:text="单笔提现手续费2\n提现费率0.5%\n预计到账时间2小时以内"
|
||||||
android:textColor="#ff333333"
|
android:textColor="@color/color_2c2c2c"
|
||||||
android:textSize="14sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/tixian_bt"
|
android:id="@+id/tixian_bt"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="@dimen/dp_20"
|
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:layout_marginRight="@dimen/dp_20"
|
||||||
android:background="@mipmap/start_reg1"
|
android:background="@drawable/cornor_thempink_12dp1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="立即提现"
|
android:text="立即提现"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/color_white"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp_10"
|
android:layout_marginLeft="@dimen/dp_10"
|
||||||
android:text="¥"
|
android:text=""
|
||||||
android:textColor="@color/color_2c2c2c"
|
android:textColor="@color/color_2c2c2c"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
@@ -129,7 +129,6 @@
|
|||||||
android:id="@+id/edit_query_et"
|
android:id="@+id/edit_query_et"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
android:digits="0123456789"
|
android:digits="0123456789"
|
||||||
@@ -203,17 +202,16 @@
|
|||||||
android:background="#EEF0F4"/>
|
android:background="#EEF0F4"/>
|
||||||
|
|
||||||
|
|
||||||
<com.hbl.yuliao.widget.CircleImageView
|
<ImageView
|
||||||
android:id="@+id/usdt_addr_iv"
|
android:id="@+id/usdt_addr_iv"
|
||||||
android:layout_width="@dimen/dp_255"
|
android:layout_width="@dimen/dp_255"
|
||||||
android:layout_height="@dimen/dp_255"
|
android:layout_height="@dimen/dp_255"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:padding="2dp"
|
android:padding="10dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
android:background="@drawable/usdt_qr_bg_new"
|
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>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
android:id="@+id/iv_jinbi_type"
|
android:id="@+id/iv_jinbi_type"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="元"
|
android:text=""
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/color_2c2c2c"
|
android:textColor="@color/color_2c2c2c"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_16"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/user_true"
|
android:background="#EEF0F7"
|
||||||
android:fitsSystemWindows="false"
|
android:fitsSystemWindows="false"
|
||||||
android:id="@+id/big_bg"
|
android:id="@+id/big_bg"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
@@ -77,7 +77,6 @@
|
|||||||
android:layout_marginTop="@dimen/dp_40"
|
android:layout_marginTop="@dimen/dp_40"
|
||||||
android:layout_marginBottom="@dimen/dp_15"
|
android:layout_marginBottom="@dimen/dp_15"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="11111111111111"
|
|
||||||
android:textColor="@color/color_2c2c2c"
|
android:textColor="@color/color_2c2c2c"
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
@@ -109,7 +108,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="visible">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -146,7 +145,33 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</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>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
@@ -158,33 +183,6 @@
|
|||||||
android:layout_marginBottom="@dimen/dp_50"
|
android:layout_marginBottom="@dimen/dp_50"
|
||||||
android:orientation="vertical">
|
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
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_1"
|
android:layout_height="@dimen/dp_1"
|
||||||
@@ -273,6 +271,7 @@
|
|||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/bot_line_0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="40dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -302,6 +301,7 @@
|
|||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/bot_line_1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="40dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -355,8 +355,9 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/bot_line_2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp" />
|
android:layout_height="0dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24sp"
|
android:layout_height="24sp"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:text="元"
|
android:text=""
|
||||||
android:textColor="#2C2C2C"
|
android:textColor="#2C2C2C"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="24sp"
|
android:layout_height="24sp"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:text="元"
|
android:text=""
|
||||||
android:textColor="#2C2C2C"
|
android:textColor="#2C2C2C"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
app:tabIndicator="@drawable/tab_line1"
|
app:tabIndicator="@drawable/tab_line1"
|
||||||
app:tabIndicatorColor="@color/color_6b3689"
|
app:tabIndicatorColor="@color/color_themepink"
|
||||||
app:tabIndicatorHeight="11dp"
|
app:tabIndicatorHeight="11dp"
|
||||||
app:tabMaxWidth="@dimen/dp_60"
|
app:tabMaxWidth="@dimen/dp_60"
|
||||||
app:tabMinWidth="@dimen/dp_60"
|
app:tabMinWidth="@dimen/dp_60"
|
||||||
|
|||||||
@@ -19,17 +19,22 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/colose_iv"
|
android:id="@+id/colose_iv"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="?actionBarSize"
|
||||||
android:layout_marginLeft="@dimen/dp_17"
|
android:layout_marginLeft="@dimen/dp_17"
|
||||||
android:layout_marginTop="@dimen/dp_21"
|
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
android:src="@mipmap/dialog_colose_img" />
|
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
|
<LinearLayout
|
||||||
android:id="@+id/qrcode_ly"
|
android:id="@+id/qrcode_ly"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/vvv"
|
android:layout_below="@id/lins"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="@dimen/dp_5"
|
android:padding="@dimen/dp_5"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="220dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/shape_dialog_bg2"
|
android:background="@drawable/shape_dialog_bg2"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -16,8 +16,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/all_ly"
|
android:id="@+id/all_ly"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="84dp"
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="@dimen/dp_15"
|
android:paddingLeft="@dimen/dp_15"
|
||||||
@@ -33,18 +32,17 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="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:text="@string/all_visible_txt"
|
||||||
android:id="@+id/all_visible_tv"
|
android:id="@+id/all_visible_tv"
|
||||||
android:textColor="@color/color_333333"
|
android:textColor="@color/color_333333"
|
||||||
android:textSize="14sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/dp_6"
|
|
||||||
android:text="@string/all_visible_des_txt"
|
android:text="@string/all_visible_des_txt"
|
||||||
android:textColor="@color/color_999999"
|
android:textColor="#7E7E7E"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -58,15 +56,13 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginLeft="@dimen/dp_14"
|
|
||||||
android:layout_marginRight="@dimen/dp_14"
|
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
android:background="#F4F4F4" />
|
android:background="#F4F4F4" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/haoyou_ly"
|
android:id="@+id/haoyou_ly"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="84dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="@dimen/dp_15"
|
android:paddingLeft="@dimen/dp_15"
|
||||||
@@ -82,19 +78,18 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="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:id="@+id/friend_visible_tv"
|
||||||
|
|
||||||
android:text="@string/friend_visible_txt"
|
android:text="@string/friend_visible_txt"
|
||||||
android:textColor="@color/color_333333"
|
android:textColor="@color/color_333333"
|
||||||
android:textSize="14sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/dp_6"
|
|
||||||
android:text="@string/friend_visible_des_txt"
|
android:text="@string/friend_visible_des_txt"
|
||||||
android:textColor="@color/color_999999"
|
android:textColor="#7E7E7E"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -109,14 +104,12 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginLeft="@dimen/dp_14"
|
|
||||||
android:layout_marginRight="@dimen/dp_14"
|
|
||||||
android:background="#F4F4F4" />
|
android:background="#F4F4F4" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ziji_ly"
|
android:id="@+id/ziji_ly"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="84dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="@dimen/dp_15"
|
android:paddingLeft="@dimen/dp_15"
|
||||||
@@ -125,13 +118,12 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/dp_2"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:id="@+id/onlyme_visible_tv"
|
android:id="@+id/onlyme_visible_tv"
|
||||||
android:text="@string/onlyme_visible_txt"
|
android:text="@string/onlyme_visible_txt"
|
||||||
android:textColor="@color/color_333333"
|
android:textColor="@color/color_333333"
|
||||||
android:textSize="14sp" />
|
android:textSize="16sp" />
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/onlyme_visible_iv"
|
android:id="@+id/onlyme_visible_iv"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -140,6 +132,25 @@
|
|||||||
android:src="@mipmap/dialog_duigou_img"/>
|
android:src="@mipmap/dialog_duigou_img"/>
|
||||||
</LinearLayout>
|
</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>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
android:layout_height="@dimen/dp_20"
|
android:layout_height="@dimen/dp_20"
|
||||||
android:layout_margin="@dimen/dp_10"
|
android:layout_margin="@dimen/dp_10"
|
||||||
android:id="@+id/video_tag"
|
android:id="@+id/video_tag"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:src="@mipmap/circle_video_img"/>
|
android:src="@mipmap/circle_video_img"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -76,7 +77,7 @@
|
|||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:textColor="@color/color_7f7b81"
|
android:textColor="@color/m00_text_black_333333_color"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
/>
|
/>
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -93,7 +94,7 @@
|
|||||||
android:id="@+id/like_number_tv"
|
android:id="@+id/like_number_tv"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:textColor="#ff333333"
|
android:textColor="#ff333333"
|
||||||
android:textSize="14sp"
|
android:textSize="12sp"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
android:layout_height="@dimen/dp_32"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:layout_marginEnd="@dimen/dp_15"
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
android:id="@+id/kefu_iv"
|
android:id="@+id/kefu_iv"
|
||||||
|
android:visibility="gone"
|
||||||
android:src="@mipmap/b_kefu"/>
|
android:src="@mipmap/b_kefu"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
android:id="@+id/big_ry"
|
android:id="@+id/big_ry"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@color/color_f7f7f7"
|
android:background="#EEF0F7"
|
||||||
tools:ignore="MissingDefaultResource">
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:srlAccentColor="@color/color_6b3689">
|
app:srlAccentColor="@color/color_498afa">
|
||||||
|
|
||||||
<com.hbl.yuliao.widget.BezierCircleHeader
|
<com.hbl.yuliao.widget.BezierCircleHeader
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -610,6 +610,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawablePadding="@dimen/dp_5"
|
android:drawablePadding="@dimen/dp_5"
|
||||||
|
android:textStyle="bold"
|
||||||
android:text="我的钱包"
|
android:text="我的钱包"
|
||||||
android:textColor="#FFE396"
|
android:textColor="#FFE396"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|||||||
@@ -36,4 +36,5 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -11,24 +11,26 @@
|
|||||||
android:background="@color/color_f7f7f7"
|
android:background="@color/color_f7f7f7"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<com.hbl.yuliao.widget.StatusLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
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
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@color/white"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="?actionBarSize">
|
android:layout_marginBottom="@dimen/dp_2">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tablayout"
|
android:id="@+id/tablayout"
|
||||||
android:layout_width="@dimen/dp_200"
|
android:layout_width="@dimen/dp_140"
|
||||||
android:layout_height="@dimen/dp_40"
|
android:layout_height="@dimen/dp_45"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
app:tabIndicator="@drawable/tab_line1"
|
app:tabIndicator="@drawable/tab_line1"
|
||||||
app:tabIndicatorColor="@color/color_c9a3e6"
|
app:tabIndicatorColor="@color/color_themeblue"
|
||||||
app:tabIndicatorHeight="11dp"
|
app:tabIndicatorHeight="4dp"
|
||||||
app:tabBackground="@color/transparent"
|
app:tabBackground="@color/transparent"
|
||||||
app:tabMaxWidth="@dimen/dp_60"
|
app:tabMaxWidth="@dimen/dp_60"
|
||||||
app:tabMinWidth="@dimen/dp_60"
|
app:tabMinWidth="@dimen/dp_60"
|
||||||
@@ -39,42 +41,41 @@
|
|||||||
app:tabRippleColor="@null"
|
app:tabRippleColor="@null"
|
||||||
app:tabSelectedTextColor="@color/color_333333"
|
app:tabSelectedTextColor="@color/color_333333"
|
||||||
app:tabTextAppearance="@style/MyBgTablayoutstyle"
|
app:tabTextAppearance="@style/MyBgTablayoutstyle"
|
||||||
app:tabTextColor="@color/color_7f7b81" />
|
app:tabTextColor="@color/color_80333333" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_cir_iv"
|
android:id="@+id/add_cir_iv"
|
||||||
android:layout_width="40dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="45dp"
|
||||||
android:src="@mipmap/cir_not_img"
|
android:src="@mipmap/cir_not_img1"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="@dimen/dp_5" />
|
android:layout_marginRight="@dimen/dp_15" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/not_cir_iv"
|
android:id="@+id/not_cir_iv"
|
||||||
android:layout_width="40dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="45dp"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
android:layout_toLeftOf="@id/add_cir_iv"
|
android:layout_toLeftOf="@id/add_cir_iv"
|
||||||
android:src="@mipmap/add_cir_img" />
|
android:src="@mipmap/add_cir_img1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/main_alarms_list_item_flagNumView"
|
android:id="@+id/main_alarms_list_item_flagNumView"
|
||||||
style="@style/text_view_number_style"
|
style="@style/text_view_number_style"
|
||||||
android:layout_gravity="top|right"
|
android:layout_gravity="top|right"
|
||||||
android:layout_marginBottom="0dip"
|
|
||||||
android:layout_alignRight="@id/not_cir_iv"
|
android:layout_alignRight="@id/not_cir_iv"
|
||||||
android:layout_marginLeft="0dip"
|
android:layout_marginLeft="0dip"
|
||||||
android:layout_marginRight="2dip"
|
|
||||||
android:layout_alignTop="@id/not_cir_iv"
|
android:layout_alignTop="@id/not_cir_iv"
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:text="1"
|
android:text="1"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/huifu_txt"
|
android:text="@string/huifu_txt"
|
||||||
android:textColor="#ff6b3689"
|
android:textColor="@color/color_themepink"
|
||||||
android:id="@+id/rep_tv"
|
android:id="@+id/rep_tv"
|
||||||
android:layout_toRightOf="@id/time_tv"
|
android:layout_toRightOf="@id/time_tv"
|
||||||
android:layout_alignTop="@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="shouye_txt">首页</string>
|
||||||
<string name="chat_txt">聊天</string>
|
<string name="chat_txt">聊天</string>
|
||||||
<string name="voom_txt">商城</string>
|
<string name="voom_txt">商城</string>
|
||||||
|
<string name="dongtai_txt">短影音</string>
|
||||||
<string name="wallet_txt">钱包</string>
|
<string name="wallet_txt">钱包</string>
|
||||||
<string name="usercenter_txt">个人中心</string>
|
<string name="usercenter_txt">个人中心</string>
|
||||||
<string name="login_txt">登录</string>
|
<string name="login_txt">登录</string>
|
||||||
@@ -111,6 +112,7 @@
|
|||||||
<string name="yinsizhengche_txt">隐私政策</string>
|
<string name="yinsizhengche_txt">隐私政策</string>
|
||||||
<string name="taiwan_txt">台湾</string>
|
<string name="taiwan_txt">台湾</string>
|
||||||
<string name="zhongguo_txt">中国</string>
|
<string name="zhongguo_txt">中国</string>
|
||||||
|
<string name="mlxy_txt">马来西亚</string>
|
||||||
<string name="riben_txt">日本</string>
|
<string name="riben_txt">日本</string>
|
||||||
<string name="srndsjh_txt">输入您的手机号</string>
|
<string name="srndsjh_txt">输入您的手机号</string>
|
||||||
<string name="qsrsjh_txt">请输入手机号</string>
|
<string name="qsrsjh_txt">请输入手机号</string>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<style name="MyBgTablayoutstyle" parent="Base.Widget.Design.TabLayout">
|
<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>
|
||||||
<style name="check_box_big_style1">
|
<style name="check_box_big_style1">
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class ChatKitUIConstant {
|
|||||||
/**
|
/**
|
||||||
* 订单详情
|
* 订单详情
|
||||||
*/
|
*/
|
||||||
public static String ORDERDETAILS_URL = ApiService.URL.equals("https://api.letschat2023.com/") ? "https://shop.letschat2023.com/#/pages/payother/order?" : "https://shop-test.yuliao666.top/#/pages/payother/order?";
|
public static String ORDERDETAILS_URL = ApiService.URL.equals("https://api.letschat2023.com/") ? "https://shop.letschat2023.com/#/pages/payother/order?" : "https://shop-test.niuchat.xyz/#/pages/payother/order?";
|
||||||
|
|
||||||
|
|
||||||
// 合并转发消息数量限制
|
// 合并转发消息数量限制
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.PATH_CHAT_S
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.netease.nim.highavailable.LogUtils;
|
||||||
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
||||||
import com.netease.yunxin.kit.alog.ALog;
|
import com.netease.yunxin.kit.alog.ALog;
|
||||||
import com.netease.yunxin.kit.chatkit.ChatService;
|
import com.netease.yunxin.kit.chatkit.ChatService;
|
||||||
@@ -188,7 +190,9 @@ public class ChatUIService extends ChatService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(int code) {
|
public void onFailed(int code) {
|
||||||
if (observer != null) {
|
LogUtils.i("错误码","错误码111:"+code);
|
||||||
|
|
||||||
|
if (observer != null) {
|
||||||
observer.onResult(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
observer.onResult(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||||
}
|
}
|
||||||
ALog.e(
|
ALog.e(
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ public class RedPacketViewHolder extends ChatBaseMessageViewHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setStatusView(TextView tvstatus, RedpacketBean1 data, ChatMessageBean message, RedpacketGroupBean redpacketGroupBean) {
|
public void setStatusView(TextView tvstatus, RedpacketBean1 data, ChatMessageBean message, RedpacketGroupBean redpacketGroupBean) {
|
||||||
tvstatus.setText("¥ "+getQian(data.getAmount()));
|
tvstatus.setText(" "+getQian(data.getAmount()));
|
||||||
// switch (data.getStatus()) {
|
// switch (data.getStatus()) {
|
||||||
// case "0":
|
// case "0":
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -57,7 +57,12 @@ public interface ApiService {
|
|||||||
/**
|
/**
|
||||||
* 测试环境
|
* 测试环境
|
||||||
*/
|
*/
|
||||||
String URL = "http://8.217.182.79:8003/";
|
// String URL = "http://192.168.0.165:8003/";
|
||||||
|
|
||||||
|
// String URL = "https://api.niuchat.xyz/";
|
||||||
|
|
||||||
|
String URL = "https://api.niuchat.xyz/";
|
||||||
|
|
||||||
|
|
||||||
String SUBSTATIONID = "1703655363476242434";
|
String SUBSTATIONID = "1703655363476242434";
|
||||||
// String SUBSTATIONID = "";
|
// String SUBSTATIONID = "";
|
||||||
|
|||||||
@@ -915,6 +915,7 @@ public abstract class ChatBaseViewModel extends BaseViewModel {
|
|||||||
map.put("sessionid", IMKitClient.account());
|
map.put("sessionid", IMKitClient.account());
|
||||||
map.put("sessiontype", 1);
|
map.put("sessiontype", 1);
|
||||||
message.setPushPayload(map);
|
message.setPushPayload(map);
|
||||||
|
LogUtils.i("错误码","错误码数据是啥:"+GsonUtils.beanToJSONString(message));
|
||||||
ChatRepo.sendMessage(
|
ChatRepo.sendMessage(
|
||||||
message,
|
message,
|
||||||
resend,
|
resend,
|
||||||
@@ -922,6 +923,7 @@ public abstract class ChatBaseViewModel extends BaseViewModel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(int code) {
|
public void onFailed(int code) {
|
||||||
|
LogUtils.i("错误码","错误码:"+code);
|
||||||
if (code == RES_IN_BLACK_LIST) {
|
if (code == RES_IN_BLACK_LIST) {
|
||||||
MessageHelper.saveLocalBlackTipMessageAndNotify(message);
|
MessageHelper.saveLocalBlackTipMessageAndNotify(message);
|
||||||
}
|
}
|
||||||
@@ -933,6 +935,7 @@ public abstract class ChatBaseViewModel extends BaseViewModel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailed(int i) {
|
public void onFailed(int i) {
|
||||||
|
LogUtils.i("错误码","错误码222:"+i);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_marginTop="@dimen/dimen_20_dp"
|
android:layout_marginTop="@dimen/dimen_20_dp"
|
||||||
app:avatarCorner="@dimen/dimen_88_dp"
|
app:avatarCorner="@dimen/dimen_88_dp"
|
||||||
|
android:background="@mipmap/default_head_img_group"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||||
@@ -33,7 +34,6 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="@+id/ic_grouphead"
|
app:layout_constraintBottom_toBottomOf="@+id/ic_grouphead"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:background="@mipmap/default_head_img_group"
|
|
||||||
app:srcCompat="@mipmap/ic_grouphead_setting" />
|
app:srcCompat="@mipmap/ic_grouphead_setting" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="250dp"
|
android:layout_marginTop="250dp"
|
||||||
|
android:layout_marginBottom="100dp"
|
||||||
android:layout_gravity="center_horizontal"/>
|
android:layout_gravity="center_horizontal"/>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
package com.netease.yunxin.kit.conversationkit.ui.normal.viewholder;
|
package com.netease.yunxin.kit.conversationkit.ui.normal.viewholder;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.netease.nim.highavailable.LogUtils;
|
||||||
import com.netease.yunxin.kit.common.ui.utils.AvatarColor;
|
import com.netease.yunxin.kit.common.ui.utils.AvatarColor;
|
||||||
import com.netease.yunxin.kit.conversationkit.ui.databinding.ConversationViewHolderBinding;
|
import com.netease.yunxin.kit.conversationkit.ui.databinding.ConversationViewHolderBinding;
|
||||||
import com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean;
|
import com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean;
|
||||||
@@ -22,6 +24,7 @@ public class ConversationP2PViewHolder extends ConversationBaseViewHolder {
|
|||||||
data.infoData.getAvatar(),
|
data.infoData.getAvatar(),
|
||||||
data.infoData.getAvatarName(),
|
data.infoData.getAvatarName(),
|
||||||
AvatarColor.avatarColor(data.infoData.getContactId()));
|
AvatarColor.avatarColor(data.infoData.getContactId()));
|
||||||
|
// LogUtils.i("地址","地址是啥:"+data.infoData.getAvatar());
|
||||||
viewBinding.nameTv.setText(name);
|
viewBinding.nameTv.setText(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||