语圈基本完成
2、个人主页完成
@@ -21,6 +21,14 @@ android {
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [
|
||||
AROUTER_MODULE_NAME: project.getName()
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
signingConfigs {
|
||||
|
||||
@@ -112,18 +120,26 @@ dependencies {
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
implementation project(':modulemain')
|
||||
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
api project(":moduleUtil")
|
||||
api project(":moduleLogin")
|
||||
|
||||
implementation files('libs/auth_number_product-2.14.7-log-online-standard-cuum-release.aar')
|
||||
implementation files('libs/logger-2.2.2-release.aar')
|
||||
implementation files('libs/main-2.2.3-release.aar')
|
||||
|
||||
implementation (libs.arouter.api.v150)
|
||||
//annotationProcessor
|
||||
annotationProcessor libs.arouter.compiler
|
||||
implementation project(':modulevocal') // 必须
|
||||
annotationProcessor project(':modulevocal') // 关键!
|
||||
|
||||
api project(":moduleUtil")
|
||||
api project(":moduleLogin")
|
||||
implementation project(':modulemain')
|
||||
|
||||
//aar的名称,例如:WbCloudFaceLiveSdk-v6.0.0-1234567.aar,填入'WbCloudFaceLiveSdk-v6.0.0-1234567'
|
||||
// implementation(name: 'WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc', ext: 'aar')
|
||||
////2. 云normal SDK,
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
<package android:name="com.tencent.mm" />
|
||||
</queries>
|
||||
|
||||
|
||||
<application
|
||||
android:name="AppContext"
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentEnum;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentPrefs;
|
||||
@@ -18,6 +19,7 @@ public class AppContext extends CommonAppContext {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
ToastUtils.init(this);
|
||||
ARouter.init(this);
|
||||
// ToastUtils.setInterceptor(new IToastInterceptor() {
|
||||
// @Override
|
||||
// public boolean intercept(CharSequence charSequence) {
|
||||
@@ -28,6 +30,7 @@ public class AppContext extends CommonAppContext {
|
||||
}
|
||||
public static void initSdk() {
|
||||
CommonAppContext context = CommonAppContext.getInstance();
|
||||
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// L.e("应用签名:" + context.getAppSignature());
|
||||
// //L.e("facebook散列秘钥------>" + context.getFacebookHashKey());
|
||||
|
||||
@@ -95,7 +95,7 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
|
||||
}
|
||||
|
||||
private void checkOnePass() {
|
||||
if (!TextUtils.isEmpty(AppContext.getInstance().getToken())) {
|
||||
if (!TextUtils.isEmpty(AppContext.getInstance().getToken()) && !TextUtils.isEmpty(AppContext.getInstance().getUser().getTencent_im())) {
|
||||
isRoot();
|
||||
return;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(AppContext.getInstance().getToken())) {
|
||||
if (TextUtils.isEmpty(AppContext.getInstance().getToken()) || TextUtils.isEmpty(AppContext.getInstance().getUser().getTencent_im())) {
|
||||
Logger.e("SplashEnd", "ARouters.CODE_LOGIN");
|
||||
if (canOnePass) {
|
||||
phoneNumberAuthHelper.setAuthListener(tokenResultListener);
|
||||
@@ -161,15 +161,9 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
|
||||
}
|
||||
} else {
|
||||
Logger.e("SplashEnd", "ARouters.MAIN");
|
||||
|
||||
UserBean userBean = CommonAppContext.getInstance().getUser();
|
||||
if (userBean.getSex() == 0) {
|
||||
Intent intent = new Intent(this, ImproveInfoActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userBean", userBean);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
TUILogin.login(getBaseContext(), CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), String.valueOf(userBean.getUser_code()), userBean.getTencent_im(), new TUICallback() {
|
||||
TUILogin.login(getBaseContext(), CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), "u"+userBean.getUser_id(), userBean.getTencent_im(), new TUICallback() {
|
||||
@Override
|
||||
public void onError(final int code, final String desc) {
|
||||
LogUtils.e("@@@",code,"描述:",desc);
|
||||
@@ -179,6 +173,14 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
|
||||
LogUtils.e("@@@","成功");
|
||||
}
|
||||
});
|
||||
if (userBean.getSex() == 0) {
|
||||
Intent intent = new Intent(this, ImproveInfoActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userBean", userBean);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
}
|
||||
finish();
|
||||
|
||||
24
build.gradle
@@ -1,6 +1,30 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
|
||||
// build.gradle (Project-level)
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.9.24' // 根据你使用的 Kotlin 版本调整
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.4.2' // 或你使用的 Android Gradle 插件版本
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// ✅ 添加 ARouter 插件依赖
|
||||
classpath 'com.alibaba:arouter-register:1.0.2'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
}
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
@@ -34,3 +34,14 @@ APP_VERSION_CODE=1
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
|
||||
|
||||
android.enableR8=true
|
||||
#isModule
|
||||
modulevoice=false
|
||||
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
beta=false
|
||||
|
||||
org.gradle.caching=false
|
||||
# ??APT????
|
||||
kapt.incremental.apt=false
|
||||
@@ -1,6 +1,7 @@
|
||||
[versions]
|
||||
agp = "8.8.0"
|
||||
alipayAlipaysdkAndroid = "15.8.33"
|
||||
arouterApiVersion = "1.5.2"
|
||||
comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5"
|
||||
custompopwindow = "2.1.1"
|
||||
databindingRuntimeVersion = "7.0.2"
|
||||
@@ -11,6 +12,7 @@ githubBannerviewpagerVersion = "3.5.12"
|
||||
githubGlide = "4.12.0"
|
||||
githubNiceSpinnerVersion = "1.4.4"
|
||||
githubPhotoview = "2.3.0"
|
||||
githubRealtimeblurviewVersion = "1.2.1"
|
||||
githubShadowlayout = "3.3.1"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.1.5"
|
||||
@@ -22,6 +24,7 @@ marqueeview = "1.1.0"
|
||||
material = "1.10.0"
|
||||
activity = "1.8.0"
|
||||
constraintlayout = "2.1.4"
|
||||
arouter = "1.0.2"
|
||||
|
||||
arouterAnnotation = "1.0.6"
|
||||
arouterCompiler = "1.5.2"
|
||||
@@ -47,6 +50,7 @@ scwangSmartrefreshheader = "1.1.0-alpha-20"
|
||||
singledateandtimepicker = "2.2.7"
|
||||
svgaplayerAndroid = "2.5.13"
|
||||
toastVersion = "8.2"
|
||||
togglebuttonLibraryVersion = "1.0.0"
|
||||
utilcode = "1.30.6"
|
||||
databindingRuntime = "8.8.0"
|
||||
datastoreCoreAndroid = "1.1.5"
|
||||
@@ -64,8 +68,10 @@ xbanner = "1.7.0"
|
||||
[libraries]
|
||||
alipay-alipaysdk-android = { module = "com.alipay.sdk:alipaysdk-android", version.ref = "alipayAlipaysdkAndroid" }
|
||||
android-flexbox = { module = "com.google.android:flexbox", version.ref = "flexboxVersion" }
|
||||
arouter-api-v150 = { module = "com.alibaba:arouter-api", version.ref = "arouterApiVersion" }
|
||||
com-github-arcadefire-nice-spinner = { module = "com.github.arcadefire:nice-spinner", version.ref = "githubNiceSpinnerVersion" }
|
||||
com-github-bumptech-glide-glide = { module = "com.github.bumptech.glide:glide", version.ref = "githubGlide" }
|
||||
com-github-mmin18-realtimeblurview = { module = "com.github.mmin18:realtimeblurview", version.ref = "githubRealtimeblurviewVersion" }
|
||||
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" }
|
||||
com-jacktuotuo-customview-verificationcodeview3 = { module = "com.jacktuotuo.customview:verificationcodeview", version.ref = "comJacktuotuoCustomviewVerificationcodeview2" }
|
||||
custompopwindow = { module = "com.github.pinguo-zhouwei:CustomPopwindow", version.ref = "custompopwindow" }
|
||||
@@ -129,6 +135,7 @@ lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-lived
|
||||
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||
wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdkAndroid" }
|
||||
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
|
||||
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
|
||||
|
||||
|
||||
[plugins]
|
||||
@@ -136,4 +143,5 @@ android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
|
||||
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinVersion" }
|
||||
alibaba-arouter = { id = "com.alibaba.arouter", version.ref = "arouter" }
|
||||
|
||||
|
||||
@@ -49,3 +49,5 @@ dependencies {
|
||||
|
||||
implementation project(":moduleUtil")
|
||||
}
|
||||
|
||||
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.qxcm.modulelogin.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
@@ -9,6 +11,8 @@ import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.modulelogin.R;
|
||||
import com.qxcm.modulelogin.databinding.ActivityForgetPasswordBinding;
|
||||
import com.qxcm.modulelogin.databinding.ActivityLoginBinding;
|
||||
@@ -16,14 +20,19 @@ import com.qxcm.modulelogin.present.LoginContacter;
|
||||
import com.qxcm.modulelogin.present.LoginPresenter;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/3
|
||||
*@description: 忘记密码重新修改密码
|
||||
*/
|
||||
public class ForgetPasswordActivity extends BaseMvpActivity<LoginPresenter, ActivityForgetPasswordBinding> implements LoginContacter.View, View.OnClickListener {
|
||||
|
||||
|
||||
private CountDownTimer mTimer;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
mBinding.tvSendCode.setOnClickListener(this::onClick);
|
||||
mBinding.btnSubmit.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,13 +42,78 @@ public class ForgetPasswordActivity extends BaseMvpActivity<LoginPresenter, Acti
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.tv_send_code) {
|
||||
String phone = mBinding.edPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
||||
return;
|
||||
}
|
||||
sendCodeSuccess(phone);
|
||||
MvpPre.sendCode(phone, 3);
|
||||
}
|
||||
else if (v.getId() == R.id.btnSubmit){
|
||||
String phone = mBinding.edPhone.getText().toString().trim();
|
||||
String code = mBinding.edPassword.getText().toString().trim();
|
||||
String password = mBinding.editTextNewPassword.getText().toString().trim();
|
||||
String confirmPassword = mBinding.editTextConfirmPassword.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(code)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(password)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入密码");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(confirmPassword)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("两次密码不一致");
|
||||
return;
|
||||
}
|
||||
if (!password.equals(confirmPassword)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("两次密码不一致");
|
||||
return;
|
||||
}
|
||||
MvpPre.forgotPassword(password,phone,code);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
private void releaseTimer() {
|
||||
if (mTimer != null) {
|
||||
mTimer.cancel();
|
||||
mTimer = null;
|
||||
}
|
||||
}
|
||||
public void sendCodeSuccess(String phoneNumber) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
|
||||
mBinding.tvSendCode.setEnabled(false);
|
||||
mBinding.tvSendCode.setAlpha(0.5f);
|
||||
releaseTimer();
|
||||
if (mTimer != null) {
|
||||
mTimer.cancel();
|
||||
}
|
||||
mTimer = new CountDownTimer(60000L, 1000L) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
if (mBinding.tvSendCode != null) {
|
||||
mBinding.tvSendCode.setText(String.format("重新发送(%s)", millisUntilFinished / 1000));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
mBinding.tvSendCode.setAlpha(1f);
|
||||
mBinding.tvSendCode.setEnabled(true);
|
||||
mBinding.tvSendCode.setText("重新发送");
|
||||
}
|
||||
};
|
||||
mTimer.start();
|
||||
}
|
||||
@Override
|
||||
public void sendCodeSuccess1(String phoneNumber) {
|
||||
|
||||
LogUtils.e(phoneNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,8 +126,14 @@ public class ForgetPasswordActivity extends BaseMvpActivity<LoginPresenter, Acti
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ysxlSuccess(String s) {
|
||||
ToastUtils.showShort(s);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LoginPresenter bindPresenter() {
|
||||
return null;
|
||||
return new LoginPresenter(this, this);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.luck.picture.lib.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
@@ -19,6 +20,7 @@ import com.qxcm.modulelogin.present.ImproveInfoContacts;
|
||||
import com.qxcm.modulelogin.present.ImproveInfoPresenter;
|
||||
import com.qxcm.modulemain.activity.MainActivity;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserPictrue;
|
||||
import com.qxcm.moduleutil.utils.DateSelectDialog;
|
||||
@@ -28,6 +30,13 @@ import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.tencent.imsdk.v2.V2TIMValueCallback;
|
||||
import com.tencent.qcloud.tuicore.TUIConfig;
|
||||
import com.tencent.qcloud.tuicore.TUILogin;
|
||||
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
|
||||
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -64,7 +73,7 @@ public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, A
|
||||
Bundle extras = getIntent().getExtras();
|
||||
userBean= extras != null ? (UserBean) extras.getSerializable("userBean") : null;
|
||||
assert userBean != null;
|
||||
if (userBean.getNickname().isEmpty()){
|
||||
if (userBean.getNickname()!=null&&!"".equals(userBean.getNickname())){
|
||||
MvpPre.updateNickname();
|
||||
}else {
|
||||
mBinding.edNickName.setText(userBean.getNickname());
|
||||
@@ -258,8 +267,37 @@ public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, A
|
||||
|
||||
@Override
|
||||
public void updateSuccess(UserBean userBean) {
|
||||
SpUtil.saveUserInfo(userBean);
|
||||
EventBus.getDefault().post(userBean);
|
||||
// SpUtil.saveUserBean(userBean);
|
||||
EventBus.getDefault().post(SpUtil.getUserBean());
|
||||
|
||||
// TUILogin.login(ImproveInfoActivity.this, CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), String.valueOf(userBean.getUser_code()), userBean.getTencent_im(), new TUICallback() {
|
||||
// @Override
|
||||
// public void onError(final int code, final String desc) {
|
||||
// LogUtils.e("@@@",code,"描述:",desc);
|
||||
// }
|
||||
// @Override
|
||||
// public void onSuccess() {
|
||||
// LogUtils.e("@@@","成功");
|
||||
// }
|
||||
// });
|
||||
V2TIMUserFullInfo userFullInfo = new V2TIMUserFullInfo();
|
||||
userFullInfo.setNickname(userBean.getNickname());
|
||||
userFullInfo.setFaceUrl(userBean.getAvatar());
|
||||
userFullInfo.setAllowType(userBean.getSex());
|
||||
V2TIMManager.getInstance().setSelfInfo(userFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
LogUtils.e("@@@", "成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
LogUtils.e("@@@", "描述"+desc);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
|
||||
@@ -69,7 +69,7 @@ public class LoginActivity extends BaseMvpActivity<LoginPresenter, ActivityLogin
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EventBus.getDefault().register(this);
|
||||
// EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -201,6 +201,11 @@ public class LoginActivity extends BaseMvpActivity<LoginPresenter, ActivityLogin
|
||||
zfbLogin(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ysxlSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
boolean isPasswordVisible = false;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,7 +53,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EventBus.getDefault().register(this);
|
||||
// EventBus.getDefault().register(this);
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A0101);
|
||||
}
|
||||
|
||||
@@ -271,6 +271,11 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
||||
zfbLogin(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ysxlSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
private void zfbLogin(String s) {
|
||||
LogUtils.e("@@@",s);
|
||||
CommonAppContext.getInstance();
|
||||
|
||||
@@ -85,4 +85,9 @@ public class SwitchAccountsActivity extends BaseMvpActivity<LoginPresenter, Acti
|
||||
public void authorizationSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ysxlSuccess(String s) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ public final class LoginContacter {
|
||||
void loginSuccess(UserBean userBean);
|
||||
|
||||
void authorizationSuccess(String s);
|
||||
|
||||
void ysxlSuccess(String s);
|
||||
}
|
||||
|
||||
public interface ILoginPre extends IPresenter {
|
||||
@@ -25,6 +27,7 @@ public final class LoginContacter {
|
||||
void switchAccounts(String loginId);//切换账号
|
||||
|
||||
|
||||
void forgotPassword(String new_password,String mobile, String sms_code );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class LoginPresenter extends BasePresenter<LoginContacter.View> implement
|
||||
|
||||
@Override
|
||||
public void sendCode(String phoneNumber, int type) {
|
||||
api.sendCode(phoneNumber,"default", new BaseObserver<Object>() {
|
||||
api.sendCode(phoneNumber,type+"", new BaseObserver<Object>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
@@ -134,6 +134,21 @@ public class LoginPresenter extends BasePresenter<LoginContacter.View> implement
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forgotPassword(String new_password, String mobile, String sms_code) {
|
||||
api.forgotPassword(new_password, mobile, sms_code, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().ysxlSuccess(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachView() {
|
||||
|
||||
|
||||
@@ -15,6 +15,14 @@ android {
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [
|
||||
AROUTER_MODULE_NAME: project.getName()
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -42,6 +50,8 @@ dependencies {
|
||||
implementation libs.material
|
||||
implementation libs.core.ktx
|
||||
implementation project(':moduletablayout')
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
@@ -113,6 +123,10 @@ dependencies {
|
||||
//支付宝
|
||||
api(libs.alipay.alipaysdk.android)
|
||||
|
||||
api(libs.arouter.api.v150)
|
||||
annotationProcessor libs.arouter.annotation
|
||||
annotationProcessor libs.arouter.compiler
|
||||
|
||||
api(libs.easypermissions)
|
||||
api(libs.xbanner)
|
||||
|
||||
@@ -123,6 +137,10 @@ dependencies {
|
||||
|
||||
//定位
|
||||
api('com.google.android.gms:play-services-location:21.0.1')
|
||||
//SwitchButton
|
||||
api(libs.zcw.togglebutton.library)
|
||||
//图片模糊
|
||||
api(libs.com.github.mmin18.realtimeblurview)
|
||||
|
||||
//腾讯im
|
||||
// api project(':tuiconversation')
|
||||
@@ -134,3 +152,5 @@ dependencies {
|
||||
//2. 云normal SDK,
|
||||
//aar的名称,例如:WbCloudNormal-v5.1.10-123456789.aar,填入 'WbCloudNormal-v5.1.10-123456789.aar'
|
||||
}
|
||||
|
||||
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||
@@ -3,10 +3,14 @@
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<application
|
||||
android:allowBackup="true">
|
||||
|
||||
<application android:allowBackup="true">
|
||||
<activity
|
||||
android:name="com.qxcm.moduleutil.activity.news.OfficialNoticeActivity"
|
||||
android:name=".activity.WebViewActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.news.OfficialNoticeActivity"
|
||||
android:exported="false" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -17,10 +17,16 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.BarUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.utils.LanguageUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends AppCompatActivity {
|
||||
@Override
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
@@ -37,6 +43,8 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
setContentView(getLayoutId());
|
||||
mBinding = DataBindingUtil.setContentView(this, getLayoutId());
|
||||
mBinding.setLifecycleOwner(this);
|
||||
|
||||
ARouter.getInstance().inject(this);
|
||||
BarUtils.setStatusBarLightMode(this, isLightMode());
|
||||
BarUtils.transparentStatusBar(this);
|
||||
initView();
|
||||
@@ -54,6 +62,19 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
// 可在此处添加针对旧版本的处理逻辑(如果需要)
|
||||
}
|
||||
|
||||
// 动态判断是否包含 @Subscribe 注解的方法
|
||||
boolean hasSubscribeMethods = false;
|
||||
for (Method method : getClass().getDeclaredMethods()) {
|
||||
if (method.isAnnotationPresent(Subscribe.class)) {
|
||||
hasSubscribeMethods = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasSubscribeMethods) {
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,7 +21,11 @@ import com.blankj.utilcode.util.LogUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.utils.LanguageUtil;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.tencent.qcloud.tuicore.TUILogin;
|
||||
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
|
||||
|
||||
@@ -75,10 +79,10 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void logOutEvent(UserBean userBean) {
|
||||
// 在用户 UI 点击登录的时候调用
|
||||
TUILogin.login(getBaseContext(), CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), String.valueOf(userBean.getUser_code()), userBean.getTencent_im(), new TUICallback() {
|
||||
TUILogin.login(getBaseContext(), CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), "u"+userBean.getUser_id(), userBean.getTencent_im(), new TUICallback() {
|
||||
@Override
|
||||
public void onError(final int code, final String desc) {
|
||||
LogUtils.e("@@@",code,"描述:",desc);
|
||||
LogUtils.e("@@@1",code,"描述:",desc);
|
||||
}
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
@@ -87,6 +91,25 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void userInfoEvent(UserInfo event) {
|
||||
V2TIMUserFullInfo userFullInfo = new V2TIMUserFullInfo();
|
||||
userFullInfo.setNickname(event.getNickname());
|
||||
userFullInfo.setFaceUrl(event.getAvatar());
|
||||
userFullInfo.setAllowType(event.getSex());
|
||||
V2TIMManager.getInstance().setSelfInfo(userFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
LogUtils.e("@@@", "成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
LogUtils.e("@@@", "描述"+desc);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示全局飘屏消息(支持任意位置飘过)
|
||||
*
|
||||
@@ -168,9 +191,4 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.qxcm.moduleutil.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.databinding.ActivityWebViewBinding;
|
||||
|
||||
import java.util.Map;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/3
|
||||
*@description: webview公共方法
|
||||
*/
|
||||
public class WebViewActivity extends BaseAppCompatActivity<ActivityWebViewBinding> {
|
||||
|
||||
public String title;
|
||||
public String url;
|
||||
@Override
|
||||
protected void initData() {
|
||||
WebSettings webSettings = mBinding.webView.getSettings();
|
||||
webSettings.setUseWideViewPort(true);
|
||||
webSettings.setLoadWithOverviewMode(true);
|
||||
webSettings.setJavaScriptEnabled(true);
|
||||
//增加JSBridge
|
||||
mBinding.webView.addJavascriptInterface(new WebAppInterface(this), "Android");
|
||||
// mBinding.webView.addJavascriptInterface(new WebViewBridgeConfig(title), WebViewBridgeConfig.NAME);
|
||||
webSettings.setBuiltInZoomControls(false);
|
||||
webSettings.setSupportZoom(false);
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
webSettings.setBlockNetworkImage(false);//解决图片不显示
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
|
||||
mBinding.webView.setHorizontalScrollBarEnabled(false);//水平不显示
|
||||
mBinding.webView.setVerticalScrollBarEnabled(false); //垂直不显示
|
||||
mBinding.webView.requestFocus();
|
||||
mBinding.webView.loadUrl(url);
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void initView() {
|
||||
title = getIntent().getStringExtra("title");
|
||||
url = getIntent().getStringExtra("url");
|
||||
mBinding.topBar.setTitle(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_web_view;
|
||||
}
|
||||
public class WebAppInterface {
|
||||
Context mContext;
|
||||
|
||||
WebAppInterface(Context c) {
|
||||
mContext = c;
|
||||
}
|
||||
|
||||
// 被 H5 调用的方法
|
||||
@JavascriptInterface
|
||||
public void showToast(String toast) {
|
||||
Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,403 @@
|
||||
package com.qxcm.moduleutil.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.webkit.JavascriptInterface;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.ThreadUtils;
|
||||
import com.qxcm.moduleutil.utils.logger.Logger;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.yutang.xqipao.ui.h5
|
||||
* 创建人 王欧
|
||||
* 创建时间 2020/6/16 1:26 PM
|
||||
* 描述 describe
|
||||
*/
|
||||
public class WebViewBridgeConfig {
|
||||
public static final String NAME = "bridge";
|
||||
public static final String TYPE_QQ_SERVICE = "qqService";
|
||||
public static final String TYPE_FEEDBACK = "feedback";
|
||||
public static final String TYPE_USER_ZONE = "userZone";
|
||||
public static final String TYPE_RECHARGE = "recharge";
|
||||
public static final String TYPE_BACK = "onBackPressed";
|
||||
|
||||
public static final String TYPE_GAME_RANK = "gameRank";//游戏排行榜
|
||||
public static final String TYPE_GAME_SOUND = "gameSound";//游戏声音
|
||||
public static final String TYPE_GAME_END = "gameEnd";//游戏结束
|
||||
public static final String TYPE_GAME_PAUSE = "gamePause";//游戏暂停
|
||||
public static final String TYPE_GAME_BEGIN = "gameBegin";//游戏开始
|
||||
public static final String TYPE_GAME_NEXT = "gameNext";//游戏下一关
|
||||
|
||||
private static int gameCount = 0;//游戏次数
|
||||
private String NextGame = "";//上次游戏名称
|
||||
private String title = "";//标题
|
||||
public static final String GAME_EL = "俄罗斯方块";//俄罗斯方块
|
||||
public static final String GAME_XM = "消灭星星";//消灭星星
|
||||
public static final String GAME_SB = "神步伐";//神步伐
|
||||
public static final String GAME_XT = "线条冲刺";//线条冲刺
|
||||
public static final String GAME_FK = "疯狂赛车";//疯狂赛车
|
||||
|
||||
public WebViewBridgeConfig(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void postMessage(String json) {
|
||||
Logger.e(json);
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(json);
|
||||
String type = jsonObject.getString("type");
|
||||
JSONObject object = jsonObject.getJSONObject("data");
|
||||
switch (type) {
|
||||
case TYPE_QQ_SERVICE:
|
||||
serviceUser();
|
||||
break;
|
||||
case TYPE_FEEDBACK:
|
||||
// ActivityUtils.startActivity(FeedBackActivity.class);
|
||||
break;
|
||||
case TYPE_USER_ZONE:
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", object.getString("userId")).navigation();
|
||||
break;
|
||||
case TYPE_RECHARGE:
|
||||
// ARouter.getInstance().build(ARouters.ME_BALANCE).navigation();
|
||||
break;
|
||||
case TYPE_BACK:
|
||||
try {
|
||||
ActivityUtils.getTopActivity().onBackPressed();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//跳转QQ客服
|
||||
private void serviceUser() {
|
||||
// RemoteDataSource.getInstance().serviceUser(new BaseObserver<String>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(String uin) {
|
||||
// try {
|
||||
// String qqUrl = "mqqwpa://im/chat?chat_type=wpa&uin=" + uin + "&version=1";
|
||||
// ActivityUtils.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(qqUrl)));
|
||||
// } catch (Exception e) {
|
||||
// ToastUtils.showShort("请先安装QQ");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* H5小游戏语音互动调用
|
||||
*
|
||||
* @param json
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void common(String json) {
|
||||
// ThreadUtils.runOnUiThread(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// Logger.e(json);
|
||||
// try {
|
||||
// JSONObject jsonObject = new JSONObject(json);
|
||||
// String type = jsonObject.getString("type");
|
||||
// JSONObject object = jsonObject.getJSONObject("params");
|
||||
// switch (type) {
|
||||
// case JOIN_LIVE_ROOM:
|
||||
// quitLiveRoom();
|
||||
// RtcManager.getInstance().setGame(true);
|
||||
// RtcManager.getInstance().leaveChannel();
|
||||
// //游戏时关闭房间
|
||||
// ActivityUtils.finishActivity(RoomActivity.class);
|
||||
// BaseApplication.getInstance().isPlaying = false;
|
||||
// BaseApplication.getInstance().isShow = false;
|
||||
// UserBean userBean = BaseApplication.getInstance().getUser();
|
||||
// RtcManager.getInstance().loginRoomGame(object.getString("roomId"), userBean.getUser_id(), userBean.getNickname(), "");
|
||||
// break;
|
||||
// case LEAVE_LIVE_ROOM:
|
||||
// RtcManager.getInstance().leaveChannel(object.getString("roomId"));
|
||||
// RtcManager.getInstance().setAudioUrl(null);
|
||||
// break;
|
||||
// case ROOM_START_PUBLISH_STREAM:
|
||||
// RtcManager.getInstance().applyWheat(String.format("%s_%s", object.getString("roomId"), object.getString("userId")));
|
||||
// break;
|
||||
// case ROOM_STOP_PUBLISH_STREAM:
|
||||
// RtcManager.getInstance().downWheat();
|
||||
// break;
|
||||
// case ROOM_MUTE_LOCAL:
|
||||
// RtcManager.getInstance().muteLocalAudioStream(object.getBoolean("mute"));
|
||||
// break;
|
||||
// case ROOM_MUTE_MICROPHONE:
|
||||
// RtcManager.getInstance().muteSpeaker(object.getBoolean("mute"));
|
||||
// break;
|
||||
// case ROOM_SHOW_MESSAGE_DIALOG:
|
||||
// DialogUtils.showDialogFragment(ARouter.getInstance().build(ARouteConstants.ROOM_MSG_DIALOG).navigation());
|
||||
// break;
|
||||
// case ON_CLOSE_BTN_CLICK:
|
||||
// RtcManager.getInstance().leaveChannel();
|
||||
// ActivityUtils.finishActivity(H5Activity.class);
|
||||
// break;
|
||||
// case TYPE_QQ_SERVICE:
|
||||
// serviceUser();
|
||||
// break;
|
||||
// case TYPE_FEEDBACK:
|
||||
// ActivityUtils.startActivity(FeedBackActivity.class);
|
||||
// break;
|
||||
// case TYPE_USER_ZONE:
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", object.getString("userId")).navigation();
|
||||
// break;
|
||||
// case TYPE_RECHARGE:
|
||||
// ARouter.getInstance().build(ARouters.ME_BALANCE).navigation();
|
||||
// break;
|
||||
// case TYPE_BACK:
|
||||
// try {
|
||||
// ActivityUtils.getTopActivity().onBackPressed();
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// break;
|
||||
// //游戏排行榜
|
||||
// case TYPE_GAME_RANK:
|
||||
// switch (title) {
|
||||
// case GAME_EL:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050303);
|
||||
// break;
|
||||
// case GAME_SB:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050403);
|
||||
// break;
|
||||
// case GAME_XM:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050503);
|
||||
// break;
|
||||
// case GAME_XT:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050603);
|
||||
// break;
|
||||
// case GAME_FK:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050703);
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
// //游戏开始
|
||||
// case TYPE_GAME_BEGIN:
|
||||
// switch (title) {
|
||||
// case GAME_EL:
|
||||
// if (!TextUtils.isEmpty(NextGame) && GAME_EL.equals(NextGame)) {
|
||||
// gameCount++;
|
||||
// }
|
||||
// break;
|
||||
// case GAME_SB:
|
||||
// if (!TextUtils.isEmpty(NextGame) && GAME_SB.equals(NextGame)) {
|
||||
// gameCount++;
|
||||
// }
|
||||
// break;
|
||||
// case GAME_XM:
|
||||
// if (!TextUtils.isEmpty(NextGame) && GAME_XM.equals(NextGame)) {
|
||||
// gameCount++;
|
||||
// }
|
||||
// break;
|
||||
// case GAME_XT:
|
||||
// if (!TextUtils.isEmpty(NextGame) && GAME_XT.equals(NextGame)) {
|
||||
// gameCount++;
|
||||
// }
|
||||
// break;
|
||||
// case GAME_FK:
|
||||
// if (!TextUtils.isEmpty(NextGame) && GAME_FK.equals(NextGame)) {
|
||||
// gameCount++;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// if (gameCount == 0) {
|
||||
// gameCount = 1;
|
||||
// }
|
||||
// break;
|
||||
// //游戏结束
|
||||
// case TYPE_GAME_END:
|
||||
// switch (title) {
|
||||
// case GAME_EL:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050301, "game_count", String.valueOf(gameCount));
|
||||
// break;
|
||||
// case GAME_SB:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050401, "game_count", String.valueOf(gameCount));
|
||||
// break;
|
||||
// case GAME_XM:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050501, "game_count", String.valueOf(gameCount));
|
||||
// break;
|
||||
// case GAME_XT:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050601, "game_count", String.valueOf(gameCount));
|
||||
// break;
|
||||
// case GAME_FK:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050701, "game_count", String.valueOf(gameCount));
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
// //游戏下一关
|
||||
// case TYPE_GAME_NEXT:
|
||||
// switch (title) {
|
||||
// case GAME_XM:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050504);
|
||||
// break;
|
||||
// case GAME_XT:
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050604);
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
// //游戏暂停
|
||||
// case TYPE_GAME_PAUSE:
|
||||
// break;
|
||||
// //游戏声音
|
||||
// case TYPE_GAME_SOUND:
|
||||
// switch (title) {
|
||||
// case GAME_EL:
|
||||
// if (!object.getBoolean("sound")) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050302);
|
||||
// }
|
||||
// break;
|
||||
// case GAME_SB:
|
||||
// if (!object.getBoolean("sound")) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050402);
|
||||
// }
|
||||
// break;
|
||||
// case GAME_XM:
|
||||
// if (!object.getBoolean("sound")) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050502);
|
||||
// }
|
||||
// break;
|
||||
// case GAME_XT:
|
||||
// if (!object.getBoolean("sound")) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050602);
|
||||
// }
|
||||
// break;
|
||||
// case GAME_FK:
|
||||
// if (!object.getBoolean("sound")) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A050702);
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private void quitLiveRoom() {
|
||||
// if (!TextUtils.isEmpty(BaseApplication.getInstance().playId)) {
|
||||
// NewApi.getInstance().quit(BaseApplication.getInstance().playId, new com.qpyy.libcommon.api.BaseObserver<String>(false, false) {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(String s) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// 调用示例:
|
||||
// window.bridge.common('{"type":"joinStreamLiveRoom","params":{"roomId":"12445435","userId":"12323 ","mute":false}}');
|
||||
// 调用顺序:
|
||||
// 1、加入直播间 joinStreamLiveRoom
|
||||
// 2、开始推流 startPublishingStreamLiveRoom
|
||||
// 3、打开麦克风 muteMicrophoneLiveRoom
|
||||
|
||||
/*
|
||||
加入直播间 joinStreamLiveRoom
|
||||
params :
|
||||
{
|
||||
"roomId":"房间id",
|
||||
}
|
||||
*/
|
||||
public static final String JOIN_LIVE_ROOM = "joinStreamLiveRoom";
|
||||
|
||||
/*
|
||||
离开流房间 推拉流 leaveStreamLiveRoom
|
||||
params :
|
||||
{
|
||||
"roomId":"房间id",
|
||||
}
|
||||
*/
|
||||
public static final String LEAVE_LIVE_ROOM = "leaveStreamLiveRoom";
|
||||
|
||||
/*
|
||||
开始推流 startPublishingStreamLiveRoom
|
||||
params :
|
||||
{
|
||||
"roomId":"房间id",
|
||||
"userId":"用户ID"
|
||||
}
|
||||
*/
|
||||
public static final String ROOM_START_PUBLISH_STREAM = "startPublishingStreamLiveRoom";
|
||||
|
||||
/*
|
||||
停止推流 stopPublishingStreamLiveRoom
|
||||
params :
|
||||
{
|
||||
"roomId":"房间id",
|
||||
"userId":"用户ID"
|
||||
}
|
||||
*/
|
||||
public static final String ROOM_STOP_PUBLISH_STREAM = "stopPublishingStreamLiveRoom";
|
||||
|
||||
/*
|
||||
是否屏蔽远端所有声音 muteSpeakerLiveRoom
|
||||
params :
|
||||
{
|
||||
mute:true // true为关闭,false为打开
|
||||
}
|
||||
*/
|
||||
public static final String ROOM_MUTE_LOCAL = "muteSpeakerLiveRoom";
|
||||
|
||||
/*
|
||||
是否静音(关闭)麦克风 muteMicrophoneLiveRoom
|
||||
params :
|
||||
{
|
||||
mute:true // true为关闭,false为打开
|
||||
}
|
||||
*/
|
||||
public static final String ROOM_MUTE_MICROPHONE = "muteMicrophoneLiveRoom";
|
||||
|
||||
|
||||
/*
|
||||
点击消息按钮 onMessageBtnClick
|
||||
params :
|
||||
{
|
||||
}
|
||||
*/
|
||||
public static final String ROOM_SHOW_MESSAGE_DIALOG = "onMessageBtnClick";
|
||||
|
||||
|
||||
//关闭按钮
|
||||
public static final String ON_CLOSE_BTN_CLICK = "onCloseBtnClick";
|
||||
|
||||
}
|
||||
@@ -1,18 +1,35 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static com.blankj.utilcode.util.ActivityUtils.startActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.generated.callback.OnClickListener;
|
||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MeHeadView;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.MyGridView;
|
||||
import com.qxcm.moduleutil.widget.img.FullScreenUtil;
|
||||
|
||||
@@ -23,15 +40,21 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
public CirleListAdapter() {
|
||||
super(R.layout.item_cirle_list);
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onDianzanClick(CircleListBean item);
|
||||
|
||||
void onHeadImageClick(CircleListBean item);
|
||||
|
||||
void onZsClick(CircleListBean item);
|
||||
|
||||
void onDiandianClick(CircleListBean item);
|
||||
|
||||
void onPinglunClick(CircleListBean item);
|
||||
|
||||
void onRelaClick(CircleListBean item);
|
||||
}
|
||||
|
||||
private OnItemClickListener mListener;
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
@@ -43,18 +66,19 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
helper.addOnClickListener(com.qxcm.moduleutil.R.id.dianzan)
|
||||
.addOnClickListener(R.id.dy_lookmore_tv)
|
||||
.addOnClickListener(R.id.dy_head_image)
|
||||
.addOnClickListener(R.id.dy_oneimage_iv)
|
||||
.addOnClickListener(R.id.diandian)
|
||||
.addOnClickListener(R.id.pinglun)
|
||||
.addOnClickListener(R.id.rela)
|
||||
.addOnClickListener(com.qxcm.moduleutil.R.id.zs);
|
||||
|
||||
//先让单图,多图,音频的布局显示
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(VISIBLE);
|
||||
helper.getView(R.id.iv_jubao).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(AroutUtil.COMMUNITY_JUBAO).withString("uid", item.getUid() + "").navigation();
|
||||
// Intent intent = new Intent(mContext, UserHomepageActivity.class);
|
||||
// intent.putExtra("userId", SpUtil.getUserId()+"");
|
||||
// startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -79,20 +103,30 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
if (mListener != null) mListener.onPinglunClick(item);
|
||||
});
|
||||
|
||||
helper.getView(R.id.rela).setOnClickListener(v -> {
|
||||
if (mListener != null) mListener.onRelaClick(item);
|
||||
});
|
||||
// 为整个 item 设置点击事件
|
||||
helper.itemView.setOnClickListener(v -> {
|
||||
if (mListener != null) {
|
||||
mListener.onPinglunClick(item); // 复用 onHeadImageClick 作为跳转逻辑
|
||||
}
|
||||
});
|
||||
//昵称
|
||||
helper.setText(R.id.dy_name_text, item.getNickname());
|
||||
|
||||
//头像
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), (ImageView) helper.getView(R.id.dy_head_image));
|
||||
|
||||
// ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.dy_head_image));
|
||||
MeHeadView headView = helper.getView(R.id.dy_head_image);
|
||||
headView.setData(item.getAvatar(), "", item.getSex() + "");
|
||||
//动态内容以富文本展示
|
||||
String content = item.getContent();
|
||||
if (content == null || content.length() == 0) {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(GONE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(GONE);
|
||||
} else {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(VISIBLE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(VISIBLE);
|
||||
}
|
||||
helper.getView(R.id.dy_lookmore_tv).getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||
@Override
|
||||
@@ -101,42 +135,77 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
int lineCount = view.getLineCount();
|
||||
if (lineCount >= 7) {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(VISIBLE);
|
||||
helper.getView(R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
} else {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(GONE);
|
||||
helper.getView(R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
helper.setText(R.id.dy_content_tv, content);
|
||||
|
||||
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
view.setVisibility(View.GONE);
|
||||
view.setVisibility(GONE);
|
||||
} else {
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
view.setVisibility(View.VISIBLE);
|
||||
view.setVisibility(VISIBLE);
|
||||
}
|
||||
// 创建 SpannableString 来拼接 title 并设置点击事件
|
||||
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
|
||||
spannableStringBuilder.append(content).append(" "); // 添加原始内容
|
||||
if (item.getTitle() != null) {
|
||||
helper.setVisible(R.id.dy_more_tv, true);
|
||||
helper.setText(R.id.dy_more_tv, item.getTitle().replace("#", ""));
|
||||
}else {
|
||||
helper.setVisible(R.id.dy_more_tv, false);
|
||||
|
||||
for (int i = 0; i < item.getTitle().size(); i++) {
|
||||
HeatedBean heatedBean = item.getTitle().get(i);
|
||||
String title = heatedBean != null ? heatedBean.getTitle() : "";
|
||||
|
||||
// 添加 title 到 SpannableString
|
||||
spannableStringBuilder.append(title);
|
||||
|
||||
|
||||
// 创建点击事件和颜色
|
||||
ClickableSpan clickableSpan = new ClickableSpan() {
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
// 处理点击事件,比如跳转
|
||||
// Intent intent = new Intent(mContext, TargetActivity.class);
|
||||
// intent.putExtra("url", item.getUrl()); // 传递 URL 或其他参数
|
||||
// mContext.startActivity(intent);
|
||||
}
|
||||
//点赞
|
||||
helper.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
|
||||
@Override
|
||||
public void updateDrawState(TextPaint ds) {
|
||||
super.updateDrawState(ds);
|
||||
ds.setColor(ContextCompat.getColor(mContext, R.color.color_0DFFB9)); // 设置文字颜色
|
||||
ds.setUnderlineText(false); // 去掉下划线
|
||||
}
|
||||
};
|
||||
|
||||
// 设置点击效果
|
||||
spannableStringBuilder.setSpan(clickableSpan, spannableStringBuilder.length() - title.length(), spannableStringBuilder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
TextView textView = helper.getView(R.id.dy_content_tv);
|
||||
textView.setMovementMethod(LinkMovementMethod.getInstance()); // 允许点击
|
||||
textView.setHighlightColor(0); // 去掉点击时的背景色
|
||||
textView.setText(spannableStringBuilder);
|
||||
}
|
||||
|
||||
|
||||
if (item.getIs_like() == 1) {
|
||||
TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
helper.setImageResource(R.id.dianzan_image, R.mipmap.dongtai_hudong_yidianzan);
|
||||
helper.setText(R.id.dy_fabulous, String.valueOf(Integer.parseInt(item.getLike_num()) + 1));
|
||||
} else {
|
||||
TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
helper.setImageResource(R.id.dianzan_image, com.qxcm.moduleutil.R.mipmap.dongtai_hudong_dianzan);
|
||||
helper.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
}
|
||||
|
||||
if (item.getIs_room() != null && item.getIs_room().equals("0")) {
|
||||
helper.setVisible(R.id.gensui, false);
|
||||
} else if (item.getIs_room() == null) {
|
||||
helper.setVisible(R.id.gensui, false);
|
||||
} else {
|
||||
helper.setVisible(R.id.gensui, true);
|
||||
}
|
||||
@@ -154,14 +223,9 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (item.getImages()!=null) {
|
||||
|
||||
//显示图片
|
||||
if (item.getImages() != null && !item.getImages().isEmpty()) {
|
||||
String[] arrIv = item.getImages().split(",");
|
||||
// String[] arrIv = Arrays.asList(item.getImages().split(",")).toArray(new String[item.getImages().size()]);
|
||||
int length = arrIv.length;
|
||||
|
||||
|
||||
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||
MyGridView recyclerView = helper.getView(R.id.dy_image_recyc);
|
||||
recyclerView.setNumColumns(3);
|
||||
@@ -171,14 +235,25 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
for (int j = 0; j < arrIv.length; j++) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(arrIv[j]);
|
||||
}
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||
|
||||
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||
});
|
||||
}
|
||||
|
||||
if (item.getLike_list() == null){
|
||||
helper.getView(R.id.rela).setVisibility(GONE);
|
||||
helper.getView(R.id.view).setVisibility(VISIBLE);
|
||||
}else {
|
||||
helper.getView(R.id.rela).setVisibility(VISIBLE);
|
||||
helper.getView(R.id.view).setVisibility(GONE);
|
||||
RecyclerView recyclerView= helper.getView(R.id.recycle_view);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
LikeUserAdapter likeUserAdapter = new LikeUserAdapter();
|
||||
recyclerView.setAdapter(likeUserAdapter);
|
||||
likeUserAdapter.setNewData(item.getLike_list());
|
||||
helper.setText(R.id.pinglun_tv, item.getLike_num()+"人点赞");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +1,63 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.dialog.ReplyDialogFragment;
|
||||
import com.qxcm.moduleutil.utils.MeHeadView;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CommentAdapter extends RecyclerView.Adapter<CommentAdapter.CommentViewHolder> {
|
||||
public interface OnCommentInteractionListener {
|
||||
void onInputBoxShow(int id,String s,int position,String replyTo);
|
||||
|
||||
void onDetaleClick(int id,int position);
|
||||
// 新增长按回调
|
||||
void onCommentLongClick(CommentBean.CommentDetailsBean comment, CommentBean.CommentDetailsBean.Replies reply, int position);
|
||||
|
||||
}
|
||||
private OnCommentInteractionListener listener; // 新增监听器引用
|
||||
public void setOnCommentInteractionListener(OnCommentInteractionListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
private List<CommentBean.CommentDetailsBean> commentList;
|
||||
private static FragmentManager fragmentManager = null;
|
||||
|
||||
public CommentAdapter(List<CommentBean.CommentDetailsBean> commentList) {
|
||||
this.commentList = commentList;
|
||||
}
|
||||
public void updateData(List<CommentBean.CommentDetailsBean> newReplyList) {
|
||||
commentList.clear();
|
||||
commentList.addAll(newReplyList);
|
||||
notifyDataSetChanged();
|
||||
DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new CommentDiffCallback(this.commentList, newReplyList));
|
||||
this.commentList.clear();
|
||||
this.commentList.addAll(newReplyList);
|
||||
diffResult.dispatchUpdatesTo(this);
|
||||
}
|
||||
@NonNull
|
||||
@Override
|
||||
@@ -40,7 +69,7 @@ public class CommentAdapter extends RecyclerView.Adapter<CommentAdapter.CommentV
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull CommentViewHolder holder, int position) {
|
||||
CommentBean.CommentDetailsBean comment = commentList.get(position);
|
||||
holder.bind(comment);
|
||||
holder.bind(comment, listener, position);
|
||||
|
||||
}
|
||||
|
||||
@@ -54,24 +83,33 @@ public class CommentAdapter extends RecyclerView.Adapter<CommentAdapter.CommentV
|
||||
private TextView tvNickname;
|
||||
private TextView tvContent;
|
||||
private RecyclerView rvReplies;
|
||||
private TextView btnReply;
|
||||
private TextView btnReply,btnDetale;
|
||||
private TextView tvTime;
|
||||
private TextView btnShowAllReplies;
|
||||
|
||||
private TextView tv_send;
|
||||
private EditText et_input;
|
||||
|
||||
public CommentViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
ivAvatar = itemView.findViewById(R.id.iv_avatar);
|
||||
tvNickname = itemView.findViewById(R.id.tv_nickname);
|
||||
tvContent = itemView.findViewById(R.id.tv_content);
|
||||
// rvReplies = itemView.findViewById(R.id.rv_replies);
|
||||
rvReplies = itemView.findViewById(R.id.rv_replies);
|
||||
btnReply = itemView.findViewById(R.id.btn_reply);
|
||||
|
||||
btnDetale=itemView.findViewById(R.id.btn_detale);
|
||||
tvTime = itemView.findViewById(R.id.tv_time);
|
||||
btnShowAllReplies = itemView.findViewById(R.id.btn_show_all_replies);
|
||||
tv_send= itemView.findViewById(R.id.tv_send);
|
||||
et_input= itemView.findViewById(R.id.et_input);
|
||||
// 设置子评论的适配器
|
||||
// LinearLayoutManager layoutManager = new LinearLayoutManager(itemView.getContext());
|
||||
// rvReplies.setLayoutManager(layoutManager);
|
||||
// ReplyAdapter replyAdapter = new ReplyAdapter(new ArrayList<>());
|
||||
// rvReplies.setAdapter(replyAdapter);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(itemView.getContext());
|
||||
rvReplies.setLayoutManager(layoutManager);
|
||||
ReplyAdapter replyAdapter = new ReplyAdapter(new ArrayList<>());
|
||||
rvReplies.setAdapter(replyAdapter);
|
||||
}
|
||||
|
||||
public void bind(CommentBean.CommentDetailsBean comment) {
|
||||
public void bind(CommentBean.CommentDetailsBean comment, OnCommentInteractionListener listener, int position) {
|
||||
// 绑定主评论数据
|
||||
tvNickname.setText(comment.getNickname());
|
||||
tvContent.setText(comment.getContent());
|
||||
@@ -79,21 +117,108 @@ public class CommentAdapter extends RecyclerView.Adapter<CommentAdapter.CommentV
|
||||
// 加载用户头像(使用 Glide 或其他图片加载库)
|
||||
// Glide.with(itemView).load(comment.getAvatar()).into(ivAvatar);
|
||||
|
||||
// 绑定子评论数据
|
||||
// ReplyAdapter replyAdapter = (ReplyAdapter) rvReplies.getAdapter();
|
||||
// if (replyAdapter != null) {
|
||||
// replyAdapter.updateData(comment.getReplies());
|
||||
// }
|
||||
if (comment.getUser_id()==SpUtil.getUserId()){
|
||||
btnDetale.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
btnDetale.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
tvTime.setText(TimeUtils.millis2String(Long.parseLong(comment.getCreatetime()+"") * 1000));
|
||||
// 绑定子评论数据
|
||||
ReplyAdapter replyAdapter = (ReplyAdapter) rvReplies.getAdapter();
|
||||
if (replyAdapter != null) {
|
||||
if (comment.getReplies() != null&& comment.getReplies().size() > 0) {
|
||||
rvReplies.setVisibility(VISIBLE);
|
||||
replyAdapter.updateData(comment.getReplies());
|
||||
|
||||
// 控制“全部评论...”按钮的显示
|
||||
btnShowAllReplies.setVisibility(comment.getReplies().size() > 2 ? VISIBLE : GONE);
|
||||
|
||||
btnShowAllReplies.setOnClickListener(v -> {
|
||||
replyAdapter.setExpanded(true); // 展开所有评论
|
||||
btnShowAllReplies.setVisibility(GONE); // 隐藏按钮
|
||||
});
|
||||
|
||||
replyAdapter.setOnReplyClickListener((reply, position1) -> {
|
||||
if (listener != null) {
|
||||
// 构造回复内容(如 @用户名)
|
||||
String replyContent = "@" + reply.getNickname() + " ";
|
||||
listener.onInputBoxShow(reply.getPid(), replyContent, getAdapterPosition(),reply.getReply_to()+"");
|
||||
}
|
||||
});
|
||||
|
||||
replyAdapter.setOnReplyLongClickListener((reply, replyPosition) -> {
|
||||
if (listener != null) {
|
||||
// 转发到Activity
|
||||
listener.onCommentLongClick(comment,reply, replyPosition);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
rvReplies.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
// 点击回复按钮
|
||||
btnReply.setOnClickListener(v -> {
|
||||
// 弹出输入框让用户输入回复内容
|
||||
showReplyDialog(comment.getId());
|
||||
});
|
||||
|
||||
if (listener != null) {
|
||||
// 传递需要的参数
|
||||
listener.onInputBoxShow(comment.getId(), "", position,"");
|
||||
}
|
||||
|
||||
private void showReplyDialog(int commentId) {
|
||||
// 调用弹窗逻辑,传递 commentId 和 FragmentManager
|
||||
});
|
||||
btnDetale.setOnClickListener(v -> {
|
||||
if (listener != null) {
|
||||
listener.onDetaleClick(comment.getId(), position); // 点击删除按钮
|
||||
}
|
||||
});
|
||||
|
||||
if (comment.getUser_id()!= SpUtil.getUserId()){
|
||||
btnReply.setVisibility(GONE);
|
||||
}else {
|
||||
btnReply.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
// 添加长按监听
|
||||
itemView.setOnLongClickListener(v -> {
|
||||
if (listener != null) {
|
||||
listener.onCommentLongClick(comment, null,position);
|
||||
}
|
||||
return true; // 消费事件
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class CommentDiffCallback extends DiffUtil.Callback {
|
||||
|
||||
private final List<CommentBean.CommentDetailsBean> oldList;
|
||||
private final List<CommentBean.CommentDetailsBean> newList;
|
||||
|
||||
public CommentDiffCallback(List<CommentBean.CommentDetailsBean> oldList, List<CommentBean.CommentDetailsBean> newList) {
|
||||
this.oldList = oldList;
|
||||
this.newList = newList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOldListSize() {
|
||||
return oldList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNewListSize() {
|
||||
return newList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
|
||||
return oldList.get(oldItemPosition).getId() == newList.get(newItemPosition).getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
|
||||
return oldList.get(oldItemPosition).equals(newList.get(newItemPosition));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class LikeListAdapter extends BaseQuickAdapter<CircleListBean.LikeList, BaseViewHolder> {
|
||||
public LikeListAdapter() {
|
||||
super(R.layout.item_like_list);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, CircleListBean.LikeList item) {
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.like_avatar));
|
||||
helper.setText(R.id.tv_nickname, item.getNickname());
|
||||
String s=item.getSex().equals("1")?"男":"女";
|
||||
String age=item.getAge()+"岁";
|
||||
String constellation=item.getConstellation();
|
||||
String co=s+"/"+age+"/"+constellation;
|
||||
helper.setText(R.id.tv_content, co);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.qxcm.moduleutil.adapter;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class LikeUserAdapter extends BaseQuickAdapter<CircleListBean.LikeList, BaseViewHolder> {
|
||||
public LikeUserAdapter() {
|
||||
super(R.layout.item_like_user);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, CircleListBean.LikeList item) {
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.user_icon));
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,11 @@ import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MyFragmentPagerAdapter extends FragmentPagerAdapter {
|
||||
public class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
|
||||
private List<Fragment> fragmentList;
|
||||
@@ -18,7 +19,6 @@ public class MyFragmentPagerAdapter extends FragmentPagerAdapter {
|
||||
super(fm);
|
||||
this.fragmentList = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return fragmentList.get(i);
|
||||
|
||||
@@ -8,14 +8,34 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.TimeUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ReplyAdapter extends RecyclerView.Adapter<ReplyAdapter.ReplyViewHolder> {
|
||||
public interface OnReplyClickListener {
|
||||
void onReplyClick(CommentBean.CommentDetailsBean.Replies reply, int position);
|
||||
}
|
||||
// 添加回调接口
|
||||
public interface OnReplyLongClickListener {
|
||||
void onReplyLongClick(CommentBean.CommentDetailsBean.Replies reply, int position);
|
||||
}
|
||||
|
||||
private OnReplyLongClickListener longClickListener;
|
||||
|
||||
public void setOnReplyLongClickListener(OnReplyLongClickListener listener) {
|
||||
this.longClickListener = listener;
|
||||
}
|
||||
private OnReplyClickListener listener;
|
||||
|
||||
// 设置监听器的方法
|
||||
public void setOnReplyClickListener(OnReplyClickListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
private List<CommentBean.CommentDetailsBean.Replies> replyList;
|
||||
private boolean isExpanded = false; // 是否展开显示所有评论
|
||||
|
||||
public ReplyAdapter(List<CommentBean.CommentDetailsBean.Replies> replyList) {
|
||||
this.replyList = replyList;
|
||||
@@ -37,27 +57,60 @@ public class ReplyAdapter extends RecyclerView.Adapter<ReplyAdapter.ReplyViewHol
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ReplyViewHolder holder, int position) {
|
||||
CommentBean.CommentDetailsBean.Replies reply = replyList.get(position);
|
||||
holder.bind(reply);
|
||||
if (!isExpanded && position >= 2) {
|
||||
return; // 不绑定数据
|
||||
}
|
||||
holder.bind(reply,position, listener,longClickListener);
|
||||
}
|
||||
|
||||
public void setExpanded(boolean expanded) {
|
||||
isExpanded = expanded;
|
||||
notifyDataSetChanged(); // 刷新适配器
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return replyList.size();
|
||||
return isExpanded ? replyList.size() : Math.min(2, replyList.size());
|
||||
}
|
||||
|
||||
static class ReplyViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView tvNickname;
|
||||
private TextView tvContent;
|
||||
private TextView btnReply;
|
||||
private TextView tvTime;
|
||||
|
||||
public ReplyViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
// tvNickname = itemView.findViewById(R.id.tv_reply_nickname);
|
||||
// tvContent = itemView.findViewById(R.id.tv_reply_content);
|
||||
tvNickname = itemView.findViewById(R.id.tv_name);
|
||||
tvContent = itemView.findViewById(R.id.tv_reply);
|
||||
btnReply = itemView.findViewById(R.id.btn_reply);
|
||||
tvTime = itemView.findViewById(R.id.tv_time);
|
||||
}
|
||||
|
||||
public void bind(CommentBean.CommentDetailsBean.Replies reply) {
|
||||
tvNickname.setText(reply.getNickname());
|
||||
public void bind(CommentBean.CommentDetailsBean.Replies reply,int position, OnReplyClickListener listener,OnReplyLongClickListener longClickListener) {
|
||||
|
||||
tvNickname.setText(reply.getNickname()+":" +(reply.getReply_to_user()!=null?reply.getReply_to_user():""));
|
||||
tvContent.setText(reply.getContent());
|
||||
tvTime.setText(TimeUtils.millis2String(Long.parseLong(reply.getCreatetime()+"") * 1000));
|
||||
btnReply.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (listener != null) {
|
||||
listener.onReplyClick(reply, position);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 添加长按监听
|
||||
itemView.setOnLongClickListener(v -> {
|
||||
if (longClickListener != null) {
|
||||
longClickListener.onReplyLongClick(reply, position);
|
||||
return true; // 消费事件
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,16 +9,22 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.Signature;
|
||||
import android.media.MediaRouter;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import com.alibaba.android.arouter.facade.model.RouteMeta;
|
||||
import com.alibaba.android.arouter.facade.template.IRouteGroup;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.BuildConfig;
|
||||
import com.blankj.utilcode.util.AppUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ProcessUtils;
|
||||
@@ -49,6 +55,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -73,6 +80,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
public UserBean mUserBean;
|
||||
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
|
||||
private ScheduledExecutorService scheduledExecutorServiceRoom = null;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
@@ -82,6 +90,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
registerActivityLifecycleCallbacks();
|
||||
initWebView();
|
||||
if (ProcessUtils.isMainProcess()) {
|
||||
initARouter();
|
||||
if (SpUtil.isAgreePolicy()) {
|
||||
checkInEmulator();
|
||||
UtilConfig.checkInEmulator();
|
||||
@@ -90,6 +99,16 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
EnvironmentPrefs prefs = new EnvironmentPrefs(this);
|
||||
currentEnvironment = prefs.getSelectedEnvironment();
|
||||
}
|
||||
|
||||
private void initARouter() {
|
||||
if(BuildConfig.DEBUG) {
|
||||
ARouter.openDebug();
|
||||
ARouter.openLog();
|
||||
}
|
||||
ARouter.init(this);
|
||||
|
||||
}
|
||||
|
||||
private void initWebView() {
|
||||
//Android P 以及之后版本不支持同时从多个进程使用具有相同数据目录的WebView
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
@@ -99,6 +118,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getProcessName(Context context) {
|
||||
if (context == null) return null;
|
||||
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
@@ -109,6 +129,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context base) {
|
||||
MultiDex.install(this);
|
||||
@@ -155,6 +176,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
public String getToken() {
|
||||
return SpUtil.getToken();
|
||||
}
|
||||
|
||||
private void registerActivityLifecycleCallbacks() {
|
||||
registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
|
||||
@Override
|
||||
@@ -271,19 +293,21 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
public void setUser(UserBean userBean) {
|
||||
mUserBean = userBean;
|
||||
SpUtil.saveUserId(userBean.getUser_id());
|
||||
SpUtil.saveUserInfo(userBean);
|
||||
SpUtil.saveUserBean(userBean);
|
||||
SpUtil.putToken(userBean.getToken());
|
||||
}
|
||||
|
||||
public UserBean getUser() {
|
||||
if (mUserBean == null) {
|
||||
mUserBean = SpUtil.getUserInfo();
|
||||
mUserBean = SpUtil.getUserBean();
|
||||
}
|
||||
return mUserBean;
|
||||
}
|
||||
|
||||
public void setUserBean(UserBean bean) {
|
||||
mUserBean = bean;
|
||||
}
|
||||
|
||||
public void clearLoginInfo() throws ClassNotFoundException {
|
||||
// mUid = null;
|
||||
// mToken = null;
|
||||
@@ -292,7 +316,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
// );
|
||||
mUserBean = null;
|
||||
SpUtil.saveUserId(-1);
|
||||
SpUtil.saveUserInfo(new UserBean());
|
||||
SpUtil.saveUserBean(new UserBean());
|
||||
SpUtil.putToken("");
|
||||
Intent intent = new Intent("com.example.action.LAUNCH_PAGE");
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -10,7 +13,8 @@ import lombok.Data;
|
||||
*@description: 相册列表
|
||||
*/
|
||||
@Data
|
||||
public class AlbumBean {
|
||||
public class AlbumBean implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String id;//相册id
|
||||
|
||||
private String name; //相册名称
|
||||
@@ -20,13 +24,26 @@ public class AlbumBean {
|
||||
private String pwd; //相册密码
|
||||
|
||||
private String read_num; //相册阅读数
|
||||
private String is_pwd;
|
||||
private String is_like;//是否点赞
|
||||
private String like_num;//点赞数
|
||||
private String count;//图片数量
|
||||
private String user_id;
|
||||
|
||||
private List<ImageList> image_list;
|
||||
@Data
|
||||
public class ImageList{
|
||||
public static class ImageList implements MultiItemEntity , Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String id; //图片id
|
||||
private String image; //图片地址
|
||||
private String content; //图片描述
|
||||
private String createtime; //图片创建时间
|
||||
private boolean isSelected; // 用于标记是否被选中
|
||||
private int itemViewType = 1;
|
||||
|
||||
@Override
|
||||
public int getItemType() {
|
||||
return itemViewType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,18 @@ import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
* @data 2025/6/3
|
||||
* @description: 这是广场中的列表数据
|
||||
*/
|
||||
@Data
|
||||
public class CircleListBean {
|
||||
private int id;//语圈ID
|
||||
private int user_id;//用户ID
|
||||
private String nickname;//用户昵称
|
||||
private String avatar;//用户头像
|
||||
private int is_like;//是否点赞(0没有,1点赞)
|
||||
private int is_like;//我是否点赞(0没有,1点赞)
|
||||
private int sex;//性别 1男2女
|
||||
private String content;//内容
|
||||
private String like_num;//点赞数
|
||||
@@ -22,6 +27,23 @@ public class CircleListBean {
|
||||
private String ip;//活跃地址
|
||||
private String images;////图片 JSON字符串 封面获取第一张
|
||||
private String createtime;//时间
|
||||
private String title;//话题
|
||||
private String topic_id;
|
||||
private String share_url;
|
||||
private List<HeatedBean> title;//话题列表
|
||||
|
||||
private String read_num;//阅读数
|
||||
private List<LikeList> like_list;
|
||||
|
||||
|
||||
@Data
|
||||
public class LikeList {
|
||||
private String user_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private int age;//年龄
|
||||
private String sex;
|
||||
private String constellation;//星座
|
||||
private String birthday;//生日
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,25 +15,29 @@ public class CommentBean {
|
||||
private List<CommentDetailsBean> list;
|
||||
@Data
|
||||
public static class CommentDetailsBean {
|
||||
private int id;
|
||||
private int zone_id;
|
||||
private String content;
|
||||
private int id;//评论ID
|
||||
private int zone_id;//动态ID
|
||||
private String content;//评论内容
|
||||
private int createtime;
|
||||
private int user_id;
|
||||
private int user_id;//评论者ID
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private int is_author;
|
||||
private int is_author;//评论者是否作者 0不是,1是
|
||||
private List<Replies> replies;
|
||||
|
||||
@Data
|
||||
public static class Replies {
|
||||
private int zone_id;
|
||||
private int id;//评论ID
|
||||
private int zone_id;//动态ID
|
||||
private String content;
|
||||
private int createtime;
|
||||
private int user_id;
|
||||
private int user_id;//评论者ID
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private int pid;
|
||||
private int pid;//上级评论的ID
|
||||
private int is_author;//评论者是否作者 0不是,1是
|
||||
private int reply_to;//回复给谁的ID
|
||||
private String reply_to_user;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
@@ -7,13 +10,44 @@ import lombok.Data;
|
||||
*@description: 话题实体
|
||||
*/
|
||||
@Data
|
||||
public class HeatedBean {
|
||||
public class HeatedBean implements Parcelable {
|
||||
private String title;//话题
|
||||
private String topic_id;//话题id
|
||||
private String count;//引用数量
|
||||
private String pic; //图片
|
||||
private String content;//内容
|
||||
private String id;//话题id
|
||||
protected HeatedBean(Parcel in) {
|
||||
title = in.readString();
|
||||
topic_id = in.readString();
|
||||
count = in.readString();
|
||||
pic = in.readString();
|
||||
content = in.readString();
|
||||
}
|
||||
|
||||
public static final Creator<HeatedBean> CREATOR = new Creator<HeatedBean>() {
|
||||
@Override
|
||||
public HeatedBean createFromParcel(Parcel in) {
|
||||
return new HeatedBean(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeatedBean[] newArray(int size) {
|
||||
return new HeatedBean[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(title);
|
||||
dest.writeString(topic_id);
|
||||
dest.writeString(count);
|
||||
dest.writeString(pic);
|
||||
dest.writeString(content);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@@ -7,7 +9,7 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserBean implements Serializable {
|
||||
|
||||
@SerializedName(value = "id", alternate = "user_id")
|
||||
private int user_id;
|
||||
private int user_code;
|
||||
private String avatar;
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/3
|
||||
*@description: 个人信息,点击我的获取
|
||||
*/
|
||||
@Data
|
||||
public class UserInfo {
|
||||
private int id; //用户id
|
||||
private String user_code;//用户id码
|
||||
private String avatar;//头像
|
||||
private String nickname;//昵称
|
||||
private int sex;//性别 1男 2女
|
||||
private List<String> icon;//等级图标数组
|
||||
private int follow_num;//关注数
|
||||
private int fans_num;//粉丝数
|
||||
private int look_me_num; //被查看次数,需要魅力等级20以上才能查看
|
||||
private int charm_level; //魅力等级
|
||||
private int is_use_code; //是否是靓号 0否 1是
|
||||
private String tencent_im;
|
||||
|
||||
private String birthday;//生日
|
||||
private String profile;//简介
|
||||
private String home_bgimages;//背景图片
|
||||
private String is_follow;//是否关注
|
||||
private List<UserTagBean> tag_list;
|
||||
private List<GiftWall> gift_wall;
|
||||
private int age;//年龄
|
||||
private String is_room;
|
||||
|
||||
// @Data
|
||||
// public static class TagList{
|
||||
// private String id;
|
||||
// private String tag_name;
|
||||
// }
|
||||
@Data
|
||||
public static class GiftWall{
|
||||
private String gift_name;
|
||||
private String total;
|
||||
|
||||
private List<SendUserInfo> send_user_info;
|
||||
@Data
|
||||
public static class SendUserInfo{
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/4
|
||||
*@description: 用户标签实体
|
||||
*/
|
||||
@Data
|
||||
public class UserTagBean {
|
||||
private String id;
|
||||
private String tag_name;
|
||||
private String createtime;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.qxcm.moduleutil.dialog;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.adapter.CommentAdapter;
|
||||
|
||||
public class ReplyDialogFragment extends DialogFragment {
|
||||
private static final String TAG = "ReplyDialogFragment";
|
||||
private int commentId;
|
||||
private int position;
|
||||
private OnCommentInteractionListener listener;
|
||||
|
||||
public interface OnCommentInteractionListener {
|
||||
void onInputBoxShow(int id, String content, int position);
|
||||
}
|
||||
|
||||
public static ReplyDialogFragment newInstance(int commentId, int position, OnCommentInteractionListener listener) {
|
||||
ReplyDialogFragment fragment = new ReplyDialogFragment();
|
||||
fragment.commentId = commentId;
|
||||
fragment.position = position;
|
||||
fragment.listener = listener;
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.dialog_reply, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
EditText etInput = view.findViewById(R.id.et_input);
|
||||
TextView tvSend = view.findViewById(R.id.tv_send);
|
||||
|
||||
etInput.requestFocus();
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
|
||||
tvSend.setOnClickListener(v -> {
|
||||
String content = etInput.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(content) && listener != null) {
|
||||
listener.onInputBoxShow(commentId, content, position);
|
||||
dismiss();
|
||||
} else {
|
||||
ToastUtils.showShort("请输入内容");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
Window window = getDialog().getWindow();
|
||||
if (window != null) {
|
||||
// 设置宽度为 match_parent
|
||||
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
// 设置位置在底部(可选)
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
|
||||
// 去除默认背景遮罩
|
||||
window.setBackgroundDrawableResource(android.R.color.transparent);
|
||||
window.getDecorView().setBackgroundColor(0x00000000); // 完全透明
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
// 自动弹出软键盘
|
||||
getDialog().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ import com.qxcm.moduleutil.bean.RealNameBean;
|
||||
import com.qxcm.moduleutil.bean.RewardUserBean;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserTagBean;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
|
||||
import java.util.List;
|
||||
@@ -53,6 +55,10 @@ public interface ApiServer {
|
||||
@POST(Constants.SWITCH_ACCOUNTS)
|
||||
Observable<BaseModel<List<UserBean>>> switchAccounts(@Field("user_login") String user_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.FORGOT_PASSWORD)
|
||||
Call<BaseModel<String>> forgotPassword(@Field("new_password") String new_password, @Field("mobile") String mobile, @Field("sms_code") String sms_code);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.USER_UPDATE)
|
||||
Observable<BaseModel<UserBean>> userUpdate(@FieldMap Map<String, String> map);
|
||||
@@ -92,10 +98,13 @@ public interface ApiServer {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_ALBUM_LIST)
|
||||
Observable<BaseModel<List<AlbumBean>>> getAlbumList(@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
Observable<BaseModel<List<AlbumBean>>> getAlbumList(@Field("page") String page, @Field("page_limit") String page_limit, @Field("user_id") String user_id);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CREATE_ALBUM)
|
||||
Call<BaseModel<String> > createAlbum(@Field("name") String name, @Field("image") String image);
|
||||
Call<BaseModel<String> > createAlbum(@Field("name") String name, @Field("pwd")String pwd, @Field("image") String image);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.EDIT_ALBUM)
|
||||
Call<BaseModel<String> > editAlbum(@Field("album_id") String album_id,@Field("name") String name, @Field("pwd")String pwd, @Field("image") String image);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_REWARD_LIST)
|
||||
@@ -118,11 +127,30 @@ public interface ApiServer {
|
||||
|
||||
@GET(Constants.GET_CIRCLE_LIST)
|
||||
Observable<BaseModel<List<CircleListBean>>> getCircleList(@Query("page") String page, @Query("page_limit") String page_limit);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_USER_HOME_ZONE)
|
||||
Observable<BaseModel<List<CircleListBean>>> getCircleUserList(@Field("user_id") String user_id,@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.LIKE_ZONE)
|
||||
Call<BaseModel<String>> likeZone(@Field("id") String zone_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.TOPIC_ID)
|
||||
Observable<BaseModel<List<CircleListBean>>> topicId(@Field("topic_id") String topic_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ZONE_DETAIL)
|
||||
Observable<BaseModel<CircleListBean>> zoneDetail(@Field("id") String topic_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_USER_HOME)
|
||||
Observable<BaseModel<UserInfo>> getUserHome(@Field("user_id") String user_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_COMMENT)
|
||||
Call<BaseModel<String>> deleteComment(@Field("id") String zone_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_COMMENT_LIST)
|
||||
Observable<BaseModel<CommentBean>> getCommentList(@Field("id") String id, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
@@ -131,218 +159,61 @@ public interface ApiServer {
|
||||
@POST(Constants.COMMENT_ZONE)
|
||||
Call<BaseModel<String>> commentZone(@Field("id") String id, @Field("content") String content, @Field("pid") String pid, @Field("reply_to") String reply_to);
|
||||
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.ADDBANK)
|
||||
// Observable<BaseModel<String>> addBank(@Field("token") String token, @Field("bank_num") String bankNum, @Field("cardholder") String cardholder, @Field("bank_type") int bankType,
|
||||
// @Field("bank_name") String bankName, @Field("mobile") String mobile, @Field("bank_zhi") String bankZhi, @Field("card_number") String cardNumber,
|
||||
// @Field("code") String code
|
||||
// );
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.SEND_CODE)
|
||||
// Observable<BaseModel<String>> sendCode(@Field("token") String token, @Field("mobile") String mobile, @Field("type") int type);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(URLConstants.CHECK_SMS_CODE)
|
||||
// Observable<BaseModel<String>> checkSmsCode(@Field("mobile") String mobile, @Field("code") String code);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.USER_BANK)
|
||||
// Observable<BaseModel<UserBankModel>> getUserBank(@Field("token") String token);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.RECHARGE)
|
||||
// Observable<BaseModel<String>> userRecharge(@Field("token") String token, @Field("money") String money, @Field("type") int type);
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.THREE_PARTY_LOGIN)
|
||||
// Observable<BaseModel<BeanPayData>> threePay(@Field("user_id") String userId, @Field("type") int type, @Field("id") String id);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.ALIPAYMENT)
|
||||
// Observable<BaseModel<String>> aliPay(@Field("token") String token, @Field("user_id") String userId, @Field("type") int type, @Field("id") String id);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.WXPAYMENT)
|
||||
// Observable<BaseModel<WxPayModel>> wxPay(@Field("token") String token, @Field("user_id") String userId, @Field("type") int type, @Field("id") String id);
|
||||
//
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.EDITBANK)
|
||||
// Observable<BaseModel<String>> editBank(@Field("token") String token, @Field("cardholder") String cardholder, @Field("bank_name") String bank_name,
|
||||
// @Field("mobile") String mobile, @Field("card_number") String card_number, @Field("id") String id,
|
||||
// @Field("bank_num") String bank_num, @Field("bank_zhi") String bank_zhi, @Field("code") String code);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.USERWITHDRAW)
|
||||
// Observable<BaseModel<String>> userWithdraw(@Field("token") String token, @Field("bank_id") String bank_id, @Field("number") String number, @Field("password") String password);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.LOGIN)
|
||||
// Observable<BaseModel<UserBean>> login(@Field("mobile") String mobile, @Field("password") String password, @Field("code") String code, @Field("type") int type);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.LOGIN)
|
||||
// Observable<BaseModel<UserBean>> oauthLogin(@Field("netease_token") String netease_token, @Field("access_token") String access_token, @Field("type") int type);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.SETUSERSEX)
|
||||
// Observable<BaseModel<String>> setUserSex(@Field("user_id") String user_id, @Field("sex") int sex);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.THIRDPARTYLOGIN)
|
||||
// Observable<BaseModel<UserBean>> thirdPartyLogin(@Field("openid") String openid, @Field("three_party") int three_party, @Field("nickname") String nickname,@Field("openid_old") String oldOpenId, @Field("head_pic") String head_pic);
|
||||
//
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.EARNINGS)
|
||||
// Observable<BaseModel<EarningsModel>> getEarnings(@Field("token") String token);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.CONVERTEARNINGS)
|
||||
// Observable<BaseModel<String>> convertEarnings(@Field("token") String token, @Field("number") String number, @Field("password") String password);
|
||||
//
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.CASHLOG)
|
||||
// Observable<BaseModel<List<EarningsModel.EarningInfo>>> getCashLog(@Field("token") String token, @Field("p") int p, @Field("change_type") int change_type);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.BALANCE)
|
||||
// Observable<BaseModel<UserMoneyBean>> getBalance(@Field("token") String token, @Field("type") int type);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.FOLLOW)
|
||||
// Observable<BaseModel<String>> follow(@Field("token") String token, @Field("user_id") String userId, @Field("type") int type);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.FRIENDLIST)
|
||||
// Observable<BaseModel<List<FriendModel>>> friendList(@Field("p") int p);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.FOLLOWLIST)
|
||||
// Observable<BaseModel<List<FriendModel>>> followList(@Field("p") int p);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.FANSLIST)
|
||||
// Observable<BaseModel<List<FriendModel>>> fansList(@Field("p") int p);
|
||||
//
|
||||
// @POST(Constant.URL.MYINFO)
|
||||
// Observable<BaseModel<UserInfoModel>> userInfo();
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.USERINFO)
|
||||
// Observable<BaseModel<UserInfoDataModel>> userInfoData(@Field("user_id") String userId, @Field("emchat_username") String emchatUsername, @Field("visit") int visit);
|
||||
//
|
||||
// @POST(Constant.URL.VIPINFO)
|
||||
// Observable<BaseModel<VipInfo>> vipinfo();
|
||||
//
|
||||
// @POST(Constant.URL.SERVICEUSER)
|
||||
// Observable<BaseModel<String>> serviceUser();
|
||||
//
|
||||
// @POST(Constant.URL.ARTICLE_CATEGORIES)
|
||||
// Observable<BaseModel<List<HelpTitleModel>>> articleCategories();
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.ARTICLE_LIST)
|
||||
// Observable<BaseModel<List<HelpModel>>> articleList(@Field("article_cat_id") String articleCatId);
|
||||
//
|
||||
// @POST(Constant.URL.USER_NOBILITYINFO)
|
||||
// Observable<BaseModel<NobilityInfo>> userNobilityInfo();
|
||||
//
|
||||
// @POST(Constant.URL.NOBILITY)
|
||||
// Observable<BaseModel<List<NobilityModel>>> nobility();
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.BUYNOBILITY)
|
||||
// Observable<BaseModel<String>> buyNobility(@Field("nobility_id") String nobilityId);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.RENEWNOBILITY)
|
||||
// Observable<BaseModel<String>> renewNobility(@Field("day") String day);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.UPDATE_USERINFO)
|
||||
// Observable<BaseModel<String>> updateUserInfo(@Field("signature") String signature, @Field("birthday") String birthday, @Field("constellation") String constellation, @Field("profession") String profession,
|
||||
// @Field("city_id") String city_id, @Field("user_photo") String user_photo, @Field("sex") String sex, @Field("head_picture") String head_picture,
|
||||
// @Field("nickname") String nickname, @Field("province_id") String province_id, @Field("user_no") String userNo, @Field("county_id") String county_id);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.INDEX_LABEL)
|
||||
// Observable<BaseModel<List<LabelModel>>> indexLabel(@Field("category_id") String categoryId, @Field("p") int p);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.ADDLABEL)
|
||||
// Observable<BaseModel<String>> addLabel(@Field("ids") String ids);
|
||||
//
|
||||
// @POST(Constant.URL.CASHTYPE)
|
||||
// Observable<BaseModel<List<CashTypeModel>>> cashType();
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.COMEUSER)
|
||||
// Observable<BaseModel<List<LatelyVisitInfo>>> comeUser(@Field("token") String token, @Field("p") int p);
|
||||
//
|
||||
// @GET(Constant.URL.APPUPDATE)
|
||||
// Observable<BaseModel<AppUpdateModel>> appUpdate();
|
||||
//
|
||||
// @GET(Constant.URL.CHECK_UPDATE)
|
||||
// Observable<BaseModel<AppUpdateModel>> checkUpdate();
|
||||
//
|
||||
// @POST(Constant.URL.USER_FILES)
|
||||
// Observable<BaseModel<UserBean>> userFiles();
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.BIND_MOBILE)
|
||||
// Observable<BaseModel<String>> bindMobile(@Field("mobile") String mobile, @Field("code") String code);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.RESET_PASSWORD)
|
||||
// Observable<BaseModel<String>> resetPassword(@Field("mobile") String mobile, @Field("code") String code, @Field("password") String password);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.MESSAGE_SETTING)
|
||||
// Observable<BaseModel<String>> messageSetting(@Field("broadcast") int broadcast, @Field("fans") int fans, @Field("news_voice") int news_voice, @Field("news_vibrate") int news_vibrate, @Field("only_friend") int only_friend );
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.USER_BLACK_LIST)
|
||||
// Observable<BaseModel<List<BlacListSectionBean>>> userBlackList(@Field("p") int page, @Field("keyword") String keyword);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.ADD_BLACK_USER)
|
||||
// Observable<BaseModel<String>> removeBlackUser(@Field("black_id") String blackId, @Field("type") int type);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.QUIT_ROOM_WITH_USER_ID)
|
||||
// Observable<BaseModel<String>> quitRoomWithUserId(@Field("room_id") String roomId, @Field("user_id") String userId);
|
||||
//
|
||||
// @POST(Constant.URL.SIGN_SWITCH)
|
||||
// Observable<BaseModel<SignSwitchModel>> signSwitch();
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.SET_SECOND_PASSWORD)
|
||||
// Observable<BaseModel<String>> setSecondPassword(@Field("mobile") String mobile, @Field("password") String password, @Field("code") String code);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(URLConstants.NAME_AUTH)
|
||||
// Observable<BaseModel<String>> nameAuth(@Field("userId") String userId, @Field("fullName") String fullName, @Field("idNumber") String idNumber, @Field("idCard") String idCard, @Field("front") String front, @Field("back") String back);
|
||||
//
|
||||
// @POST(Constant.URL.USER_PHOTO)
|
||||
// Observable<BaseModel<List<MyPhotoItem>>> userPhotos();
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.DELETE_USER_PHOTO)
|
||||
// Observable<BaseModel<String>> deleteUserPhoto(@Field("id") String ids);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.ADD_USER_PHOTO)
|
||||
// Observable<BaseModel<String>> addUserPhoto(@Field("photo") String photo);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.LOGOUT_REASON)
|
||||
// Observable<BaseModel<String>> logoutReason(@Field("token") String token, @Field("mobile") String mobile,
|
||||
// @Field("reason") String reason,@Field("code") String code);
|
||||
//
|
||||
// @FormUrlEncoded
|
||||
// @POST(Constant.URL.LOGOUT_STATUS)
|
||||
// Observable<BaseModel<LogoutReasonModel>> getlogoutStatus(@Field("token") String token, @Field("mobile") String mobile);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CLEAR_LOGIN_INFO)
|
||||
Call<BaseModel<String>> clearLoginInfo(@Field("token") String token);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CANCEL)
|
||||
Call<BaseModel<String>> cancel(@Field("token") String token);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_ZONE)
|
||||
Call<BaseModel<String>> deleteZone(@Field("id") String id);
|
||||
|
||||
@GET(Constants.GET_MY_INFO)
|
||||
Observable<BaseModel<UserInfo>> getMyInfo();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ED_USER_INFO)
|
||||
Call<BaseModel<String>> editUserInfo(@Field("nickname") String nickname, @Field("birthday") String birthday, @Field("sex") String sex, @Field("avatar") String avatar, @Field("images") String images, @Field("profile") String profile, @Field("tag_id") String tag_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.ED_USER_BG)
|
||||
Call<BaseModel<String>> editUserBg(@Field("images") String images);
|
||||
@GET(Constants.GET_USER_TAG_LIST)
|
||||
Observable<BaseModel<List<UserTagBean>>> getUserTagList();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_LIKE_LIST)
|
||||
Observable<BaseModel<List<CircleListBean.LikeList>>> getLikeList(@Field("id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_ALBUM_DETAIL)
|
||||
Observable<BaseModel<AlbumBean>> getAlbumDetail(@Field("album_id") String albumId, @Field("pwd") String pwd, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_GZ)
|
||||
Call<BaseModel<String>> userGuanz(@Field("user_id") String userId,@Field("type")String type);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.UP_ALBUM)
|
||||
Call<BaseModel<String>> upAddAlbum(@Field("album_id") String album_id, @Field("images") String images, @Field("content") String content);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.MOVE_ALBUM)
|
||||
Call<BaseModel<String>> moveAlbum(@Field("id") String id,@Field("new_album_id")String new_album_id);
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_ALBUM_IMAGE)
|
||||
Call<BaseModel<String>> deleteAlbumImage(@Field("id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_ALBUM)
|
||||
Call<BaseModel<String>> deleteAlbum(@Field("album_id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.LIKE_ALBUM)
|
||||
Call<BaseModel<String>> likeAlbum(@Field("album_id") String id);
|
||||
|
||||
}
|
||||
|
||||
@@ -51,8 +51,13 @@ public abstract class BaseObserver<T> implements Observer<T> {
|
||||
ToastUtils.show("解析失败");
|
||||
} else if (e instanceof APIException) {
|
||||
APIException apiException = (APIException) e;
|
||||
if (apiException.getCode() == -1) {
|
||||
if (apiException.getCode() == 301) {
|
||||
EventBus.getDefault().post(new LogOutEvent());
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
if (showErrMsg && !TextUtils.isEmpty(apiException.getMessage())) {
|
||||
ToastUtils.show(apiException.getMessage());
|
||||
@@ -64,7 +69,8 @@ public abstract class BaseObserver<T> implements Observer<T> {
|
||||
}
|
||||
} else if (e instanceof JsonSyntaxException) {
|
||||
ToastUtils.show("网络请求错误……");
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ToastUtils.show(e.getMessage());
|
||||
// CrashReport.postCatchedException(e); //bugly收集错误信息
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ import com.qxcm.moduleutil.bean.RealNameBean;
|
||||
import com.qxcm.moduleutil.bean.RewardUserBean;
|
||||
import com.qxcm.moduleutil.bean.RoonGiftModel;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.UserTagBean;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.utils.SystemUtils;
|
||||
import com.qxcm.moduleutil.utils.logger.DataLogger;
|
||||
import com.qxcm.moduleutil.utils.logger.DataLoggingInterceptor;
|
||||
@@ -190,6 +193,8 @@ public class RetrofitClient {
|
||||
sApiServer.switchAccounts(loginId).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void userUpdate(Map<String, String> map, BaseObserver<UserBean> observer) {
|
||||
sApiServer.userUpdate(map).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
@@ -221,39 +226,11 @@ public class RetrofitClient {
|
||||
sApiServer.getOfficialNotice(page,page_limit,type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void getAlbumList(String page,String page_limit,BaseObserver<List<AlbumBean>> observer){
|
||||
sApiServer.getAlbumList(page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
public void getAlbumList(String page,String page_limit,String userId,BaseObserver<List<AlbumBean>> observer){
|
||||
sApiServer.getAlbumList(page,page_limit,userId).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void createAlbum(String name,String image,BaseObserver<String> observer) {
|
||||
sApiServer.createAlbum(name,image).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code()==200){
|
||||
BaseModel<String> string=response.body();
|
||||
if (string!=null){
|
||||
int code=string.getCode();
|
||||
if (code==1){
|
||||
observer.onNext(string.getMsg());
|
||||
}else if (code==301){
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(string.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getRewardList(String id, int page, int page_limit,BaseObserver<List<RewardUserBean> > observer){
|
||||
sApiServer.getRewardList(id,page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
@@ -272,36 +249,6 @@ public class RetrofitClient {
|
||||
sApiServer.topicList(page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void publishZone(String images, String content, String topic_id, String room_id,String ip,BaseObserver<String> observer){
|
||||
|
||||
sApiServer.publishZone(images,content,topic_id,room_id,ip).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code()==200){
|
||||
BaseModel<String> string=response.body();
|
||||
if (string!=null){
|
||||
int code=string.getCode();
|
||||
if (code==1){
|
||||
observer.onNext(string.getMsg());
|
||||
}else if (code==301){
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(string.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getCategories(BaseObserver<List<HeatedBean>> observer){//动态顶部热门话题
|
||||
sApiServer.getCategories().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
@@ -311,44 +258,320 @@ public class RetrofitClient {
|
||||
sApiServer.getCircleList(page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void likeZone(String zone_id,BaseObserver<String> observer){
|
||||
sApiServer.likeZone(zone_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code()==200){
|
||||
BaseModel<String> string=response.body();
|
||||
if (string!=null){
|
||||
int code=string.getCode();
|
||||
if (code==1){
|
||||
observer.onNext(string.getMsg());
|
||||
}else if (code==301){
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
public void getCircleUserList(String user_id,String page,String page_limit,BaseObserver<List<CircleListBean>> observer){//用户主页动态列表
|
||||
sApiServer.getCircleUserList(user_id,page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(string.getMsg());
|
||||
public void topicId(String topic_id,BaseObserver<List<CircleListBean>> observer){//动态列表
|
||||
sApiServer.topicId(topic_id).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
public void zoneDetail(String topic_id,BaseObserver<CircleListBean> observer){//动态列表
|
||||
sApiServer.zoneDetail(topic_id).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
public void getUserHome(String user_id,BaseObserver<UserInfo> observer){
|
||||
sApiServer.getUserHome(user_id).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void getCommentList(String id, String page, String page_limit, BaseObserver<CommentBean> observer){
|
||||
sApiServer.getCommentList(id,page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void getMyInfo(BaseObserver<UserInfo> observer){//点击我的获取数据
|
||||
sApiServer.getMyInfo().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void getUserTagList(BaseObserver<List<UserTagBean>> observer){
|
||||
sApiServer.getUserTagList().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void getLikeList(String id,BaseObserver<List<CircleListBean.LikeList>> observer){
|
||||
sApiServer.getLikeList(id).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void getAlbumDetail(String albumId, String pwd,String page,String page_limit,BaseObserver<AlbumBean> observer){
|
||||
sApiServer.getAlbumDetail(albumId,pwd,page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void publishZone(String images, String content, String topic_id, String room_id,String ip,BaseObserver<String> observer){
|
||||
|
||||
sApiServer.publishZone(images,content,topic_id,room_id,ip).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void likeZone(String zone_id,BaseObserver<String> observer){
|
||||
sApiServer.likeZone(zone_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteComment(String id,BaseObserver<String> observer){
|
||||
sApiServer.deleteComment(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void deleteZone(String id,BaseObserver<String> observer){
|
||||
sApiServer.deleteZone(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void commentZone(String id, String content, String pid, String reply_to,BaseObserver<String> observer){
|
||||
sApiServer.commentZone(id,content,pid,reply_to).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void clearLoginInfo(BaseObserver<String> observer){
|
||||
sApiServer.clearLoginInfo(SpUtil.getToken()).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void cancel(BaseObserver<String> observer){
|
||||
sApiServer.cancel(SpUtil.getToken()).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getPostData(String new_password, String mobile, String code, String userId,BaseObserver<String> observer){
|
||||
sApiServer.getPostData(new_password,mobile,code,userId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
if (t.toString().contains("登录失效")){
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void forgotPassword(String new_password,String mobile, String sms_code, BaseObserver<String> observer){
|
||||
sApiServer.forgotPassword(new_password,mobile,sms_code).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
public void createAlbum(String name,String pwd,String image,BaseObserver<String> observer) {
|
||||
sApiServer.createAlbum(name,pwd,image).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void editAlbum(String album_id,String name,String pwd,String image,BaseObserver<String> observer){
|
||||
sApiServer.editAlbum(album_id,name,pwd,image).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void editUserInfo(int type,String nickname, String birthday, String sex, String avatar, String images, String profile, String tag_id,BaseObserver<String> observer){
|
||||
if (type == 1) {
|
||||
sApiServer.editUserInfo(nickname, birthday, sex, avatar, images, profile, tag_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
} else{
|
||||
sApiServer.editUserBg(images).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void userGuanz(String user_id,String type,BaseObserver<String> observer){
|
||||
sApiServer.userGuanz(user_id,type).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void upAddAlbum(String album_id,String images,String content,BaseObserver<String> observer){
|
||||
sApiServer.upAddAlbum(album_id,images,content).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void moveAlbum(String id,String new_album_id,BaseObserver<String> observer){
|
||||
sApiServer.moveAlbum(id,new_album_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteAlbum(String id,int type,BaseObserver<String> observer){
|
||||
if (type == 1) {
|
||||
sApiServer.deleteAlbumImage(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response, observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}else {
|
||||
sApiServer.deleteAlbum(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response, observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void likeAlbum(String albumId,BaseObserver<String> observer){
|
||||
sApiServer.likeAlbum(albumId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response,observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onNextRetu(Response<BaseModel<String>> response,BaseObserver<String> observer){
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> string = response.body();
|
||||
if (string != null) {
|
||||
@@ -365,16 +588,7 @@ public class RetrofitClient {
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
ToastUtils.showShort("评论失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,17 +4,18 @@ import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CommentContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void getCommentList(CommentBean commentBean);
|
||||
|
||||
void commentZone();
|
||||
void getCommentList(List<CircleListBean.LikeList> likeLists);
|
||||
|
||||
}
|
||||
public interface IIndexPre extends IPresenter {
|
||||
void getCommentList(String id,String page,String page_limit);
|
||||
void commentZone(String id,String content,String pid,String reply_to);
|
||||
void getCommentList(String id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,12 @@ package com.qxcm.moduleutil.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class CommentPresenter extends BasePresenter<CommentContacts.View> implements CommentContacts.IIndexPre{
|
||||
@@ -12,34 +15,18 @@ public class CommentPresenter extends BasePresenter<CommentContacts.View> implem
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(String id, String page, String page_limit) {
|
||||
api.getCommentList(id, page, page_limit, new BaseObserver<CommentBean>() {
|
||||
|
||||
@Override
|
||||
public void getCommentList(String id) {
|
||||
api.getLikeList(id, new BaseObserver<List<CircleListBean.LikeList>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(CommentBean commentBean) {
|
||||
MvpRef.get().getCommentList(commentBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone(String id, String content, String pid, String reply_to) {
|
||||
api.commentZone(id, content, pid, reply_to, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().commentZone();
|
||||
public void onNext(List<CircleListBean.LikeList> likeLists) {
|
||||
MvpRef.get().getCommentList(likeLists);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.utils;
|
||||
|
||||
public class ARouteConstants {
|
||||
public static final String DYNAMIC_DETAIL = "/moduleCircle/DynamicDetailActivity";
|
||||
public static final String CIRCLE_LIST = "/moduleCircle/DynamicListActivity";
|
||||
|
||||
public static final String USER_HOME_PAGE = "/modulevocal/UserHomepageActivity";
|
||||
|
||||
public static final String USER_ALBUM_DETAIL = "/modulevocal/AlbumDetailActivity";
|
||||
public static final String CREATE_ALBUM = "/modulevocal/CreateAlbumActivity";
|
||||
|
||||
|
||||
public static final String FRAGMENT_CIRCLE = "CirleListFragment";
|
||||
public static final String FRAGMENT_GIFT_WALL = "UserGiftWallFragment";
|
||||
public static final String FRAGMENT_ALBUM = "MyAlbumFragment";
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public class SPConstants {
|
||||
public static final String TOKEN = "token";
|
||||
public static final String SEARCH_HISTORY = "SearchHistory";
|
||||
public static final String USER_ID = "UserId";
|
||||
public static final String USER_INFO = "userInfo";
|
||||
public static final String USER_BEAN = "userBean";
|
||||
public static final String EMQTT_CLIENT_ID = "emqttClientId";
|
||||
public static final String FIRST_ENTER_ROOM = "firstEnterRoom";
|
||||
public static final String PLAY_MODE = "PLAY_MODE"; //播放模式 0 顺序循序播放 1随机播放 2单曲循环
|
||||
@@ -28,4 +28,6 @@ public class SPConstants {
|
||||
public static final String CABIN="cabin";//小黑屋
|
||||
|
||||
public static final String REAL_NAME = "realName";//是否实名认证
|
||||
|
||||
public static final String USER_INFO = "userInfo";
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.blankj.utilcode.util.SPUtils;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -241,10 +242,14 @@ public class SpUtil {
|
||||
public static String getMyRoomId() {
|
||||
return SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString("MyRoomId");
|
||||
}
|
||||
public static void saveUserInfo(UserBean userBean) {
|
||||
String s = JSON.toJSONString(userBean);
|
||||
public static void saveUserInfo(UserInfo userInfo) {
|
||||
String s = JSON.toJSONString(userInfo);
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.USER_INFO, s, true);
|
||||
}
|
||||
public static void saveUserBean(UserBean userBean) {
|
||||
String s = JSON.toJSONString(userBean);
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.USER_BEAN, s, true);
|
||||
}
|
||||
public static void saveMyRoomId(String roomId) {
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put("MyRoomId", roomId, true);
|
||||
}
|
||||
@@ -262,36 +267,6 @@ public class SpUtil {
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.TOKEN, token, true);
|
||||
}
|
||||
|
||||
// public static void saveCabin(CabinEvent cabinEvent) {
|
||||
// String s = JSON.toJSONString(cabinEvent);
|
||||
// SPUtils.getInstance(SPConstants.CABIN).put("cabin", s, true);
|
||||
// }
|
||||
//
|
||||
// public static CabinEvent getCabin() {
|
||||
// String s = SPUtils.getInstance(SPConstants.CABIN).getString("cabin");
|
||||
// if (TextUtils.isEmpty(s)) {
|
||||
// return null;
|
||||
// }
|
||||
// CabinEvent cabinEvent = JSON.parseObject(s, CabinEvent.class);
|
||||
// return cabinEvent;
|
||||
// }
|
||||
//
|
||||
// public static void saveUserInfo(UserBean userBean) {
|
||||
// String s = JSON.toJSONString(userBean);
|
||||
// SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.USER_INFO, s, true);
|
||||
// }
|
||||
//
|
||||
// public static UserBean getUserInfo() {
|
||||
// String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.USER_INFO);
|
||||
// if (TextUtils.isEmpty(s)) {
|
||||
// return new UserBean();
|
||||
// }
|
||||
// UserBean userBean = JSON.parseObject(s, UserBean.class);
|
||||
// if (userBean == null) {
|
||||
// return new UserBean();
|
||||
// }
|
||||
// return userBean;
|
||||
// }
|
||||
|
||||
public static void saveTzbl(String roomId, float bl) {
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(getUserId() + "-" + roomId + "_Tzbl", bl, true);
|
||||
@@ -461,8 +436,8 @@ public class SpUtil {
|
||||
public static boolean getRealName(){
|
||||
return SPUtils.getInstance(SPConstants.REAL_NAME).getBoolean("realName", false);
|
||||
}
|
||||
public static UserBean getUserInfo() {
|
||||
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.USER_INFO);
|
||||
public static UserBean getUserBean() {
|
||||
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.USER_BEAN);
|
||||
if (TextUtils.isEmpty(s)) {
|
||||
return new UserBean();
|
||||
}
|
||||
@@ -472,6 +447,17 @@ public class SpUtil {
|
||||
}
|
||||
return userBean;
|
||||
}
|
||||
public static UserInfo getUserInfo() {
|
||||
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.USER_INFO);
|
||||
if (TextUtils.isEmpty(s)) {
|
||||
return new UserInfo();
|
||||
}
|
||||
UserInfo userInfo = JSON.parseObject(s, UserInfo.class);
|
||||
if (userInfo == null) {
|
||||
return new UserInfo();
|
||||
}
|
||||
return userInfo;
|
||||
}
|
||||
/**
|
||||
* 是否同意协议
|
||||
*
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
package com.qxcm.moduleutil.utils.wx;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXImageObject;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXMiniProgramObject;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXTextObject;
|
||||
import com.tencent.mm.opensdk.modelmsg.WXWebpageObject;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
// todo 微信分享工具类
|
||||
public class WeChatShareUtils {
|
||||
// private static final int TIMELINE_SUPPORTED_VERSION = 0x21020001; // 微信4.2以上支持
|
||||
private static final int TIMELINE_SUPPORTED_VERSION = 0x27000D00; // 判断微信版本是否为7.0.13及以上
|
||||
private static final String id = "xxxxxx"; //小程序原始id
|
||||
private static final String pageUrl = "xxxxxx"; //兼容低版本的网页链接
|
||||
|
||||
|
||||
//IWXAPI是第三方app和微信通信的openapi接口
|
||||
private IWXAPI api;
|
||||
private Context context;
|
||||
public static WeChatShareUtils weChatShareUtils;
|
||||
|
||||
public static WeChatShareUtils getInstance(Context context){
|
||||
if(weChatShareUtils ==null){
|
||||
weChatShareUtils = new WeChatShareUtils();
|
||||
}
|
||||
if(weChatShareUtils.api !=null){
|
||||
weChatShareUtils.api.unregisterApp();;
|
||||
}
|
||||
weChatShareUtils.context = context;
|
||||
weChatShareUtils.regToWx();
|
||||
return weChatShareUtils;
|
||||
}
|
||||
|
||||
// todo 注册应用id到微信
|
||||
private void regToWx(){
|
||||
//通过WXAPIFactory工厂,获取IWXAPI的实例
|
||||
api = WXAPIFactory.createWXAPI(context, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(),true);
|
||||
//将应用的appId注册到微信
|
||||
api.registerApp(CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||
}
|
||||
|
||||
/**
|
||||
*todo 分享文字到朋友圈或者好友
|
||||
* @param text 文本内容
|
||||
* @param scene 分享方式:好友还是朋友圈
|
||||
* @return
|
||||
*/
|
||||
public boolean shareText(String text,int scene){
|
||||
//初始化一个WXTextObject对象,填写分享的文本对象
|
||||
WXTextObject textObject = new WXTextObject();
|
||||
textObject.text = text;
|
||||
return share(textObject,text,scene);
|
||||
}
|
||||
|
||||
/**
|
||||
* todo 分享图片到朋友圈或者好友
|
||||
* @param bmp 图片的Bitmap对象
|
||||
* @param scene 分享方式:好友 WXSceneSession 还是朋友圈 WXSceneTimeline,收藏 WXSceneFavorite
|
||||
* @return
|
||||
*/
|
||||
public boolean sharePic(Bitmap bmp, int scene){
|
||||
//初始化一个WXImageObject对象
|
||||
WXImageObject imageObject = new WXImageObject();
|
||||
//设置缩略图
|
||||
Bitmap thump = Bitmap.createScaledBitmap(bmp,300,300,true);
|
||||
bmp.recycle();
|
||||
return share(imageObject,thump,scene);
|
||||
}
|
||||
|
||||
/**
|
||||
* todo 分享网页到朋友圈或者好友,视频和音乐的分享和网页大同小异,只是创建的对象不同。
|
||||
* @param url 网页的url
|
||||
* @param title 显示分享网页的标题
|
||||
* @param thumb 图片的缩略图
|
||||
* @param description 对网页的描述
|
||||
* @param scene 分享方式:好友还是朋友圈
|
||||
* @return
|
||||
*/
|
||||
public boolean shareUrl(String url, String title, Bitmap thumb, String description, int scene) {
|
||||
//初试话一个WXWebpageObject对象,填写url
|
||||
WXWebpageObject webPage = new WXWebpageObject();
|
||||
webPage.webpageUrl = url;
|
||||
//设置缩略图
|
||||
Bitmap tmb = Bitmap.createScaledBitmap(thumb,150,150,true);
|
||||
thumb.recycle();
|
||||
return share(webPage, title, tmb, description, scene);
|
||||
}
|
||||
|
||||
/**
|
||||
* todo 分享小程序类型
|
||||
* @param url
|
||||
* @param title
|
||||
* @param thumb
|
||||
* @param description
|
||||
* @param scene 只支持分享给微信好友
|
||||
* @return
|
||||
*/
|
||||
public boolean shareMiniProgram(String url, String title, Bitmap thumb, String description, int scene) {
|
||||
//初试话一个WXMiniProgramObject对象,填写url
|
||||
WXMiniProgramObject wxMiniProgramObject = new WXMiniProgramObject();
|
||||
wxMiniProgramObject.webpageUrl = pageUrl; //兼容低版本的网页链接
|
||||
wxMiniProgramObject.miniprogramType = WXMiniProgramObject.MINIPROGRAM_TYPE_TEST; //小程序类型,测试版
|
||||
wxMiniProgramObject.userName = id; //小程序原始id
|
||||
wxMiniProgramObject.path = url; //小程序的path
|
||||
|
||||
//设置缩略图
|
||||
Bitmap tmb = Bitmap.createScaledBitmap(thumb,300,300,true);
|
||||
thumb.recycle();
|
||||
return share(wxMiniProgramObject, title, tmb, description, scene);
|
||||
}
|
||||
|
||||
|
||||
private boolean share(WXMediaMessage.IMediaObject mediaObject, Bitmap thumb, int scene) {
|
||||
return share(mediaObject, null, thumb, null, scene);
|
||||
}
|
||||
|
||||
private boolean share(WXMediaMessage.IMediaObject mediaObject, String description, int scene) {
|
||||
return share(mediaObject, null, null, description, scene);
|
||||
}
|
||||
|
||||
private boolean share(WXMediaMessage.IMediaObject mediaObject,String title,Bitmap thumb,String description, int scene){
|
||||
WXMediaMessage msg = new WXMediaMessage(mediaObject);
|
||||
if(title !=null){
|
||||
msg.title = title;
|
||||
}
|
||||
if(description !=null){
|
||||
msg.description = description;
|
||||
}
|
||||
if(thumb !=null){
|
||||
msg.thumbData = bmpToByteArray(thumb, true);
|
||||
}
|
||||
//构造一个Req
|
||||
SendMessageToWX.Req req = new SendMessageToWX.Req();
|
||||
req.transaction = String.valueOf(System.currentTimeMillis());
|
||||
req.message = msg;
|
||||
req.scene = scene;
|
||||
return api.sendReq(req);
|
||||
}
|
||||
|
||||
//判断是否支持转发到朋友圈
|
||||
//微信4.2以上支持,如果需要检查微信版本支持API的情况, 可调用IWXAPI的getWXAppSupportAPI方法,0x21020001及以上支持发送朋友圈
|
||||
//微信版本:当且仅当通过 IWXAPI.getWXAppSupportAPI() 接口获取到的值 >= 0x27000D00(7.0.13以上),才能支持FileProvider的方式进行分享。
|
||||
public boolean isSupportWX(){
|
||||
int wxSdkVersion = api.getWXAppSupportAPI();
|
||||
return wxSdkVersion >= TIMELINE_SUPPORTED_VERSION;
|
||||
}
|
||||
|
||||
// todo Bitmap转换为 byte数组
|
||||
private byte[] bmpToByteArray(final Bitmap bmp,final boolean needRecycle){
|
||||
int i;
|
||||
int j;
|
||||
if (bmp.getHeight() > bmp.getWidth()) {
|
||||
i = bmp.getWidth();
|
||||
j = bmp.getWidth();
|
||||
} else {
|
||||
i = bmp.getHeight();
|
||||
j = bmp.getHeight();
|
||||
}
|
||||
|
||||
Bitmap localBitmap = Bitmap.createBitmap(i, j, Bitmap.Config.RGB_565);
|
||||
Canvas localCanvas = new Canvas(localBitmap);
|
||||
|
||||
while ( true) {
|
||||
localCanvas.drawBitmap(bmp, new Rect(0, 0, i, j), new Rect(0, 0,i, j), null);
|
||||
if (needRecycle)
|
||||
bmp.recycle();
|
||||
ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream();
|
||||
localBitmap.compress(Bitmap.CompressFormat.JPEG, 100,
|
||||
localByteArrayOutputStream);
|
||||
localBitmap.recycle();
|
||||
byte[] arrayOfByte = localByteArrayOutputStream.toByteArray();
|
||||
try {
|
||||
localByteArrayOutputStream.close();
|
||||
return arrayOfByte;
|
||||
} catch (Exception e) {
|
||||
// F.out(e);
|
||||
}
|
||||
i = bmp.getHeight();
|
||||
j = bmp.getHeight();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -367,6 +367,7 @@ public class Constants {
|
||||
public static final String GET_OFFICIAL_NOTICE = "/api/UserMessage/get_user_message_list";//获取消息信息
|
||||
public static final String GET_ALBUM_LIST = "/api/User/get_album_list";//相册列表
|
||||
public static final String CREATE_ALBUM = "/api/User/create_album";//创建相册
|
||||
public static final String EDIT_ALBUM = "/api/User/edit_album";//编辑相册
|
||||
public static final String GET_REWARD_LIST = "/api/UserZone/reward_list";//动态打赏列表
|
||||
public static final String GET_GIFT_LABEL = "/api/Gift/get_gift_label";//礼物标签
|
||||
public static final String GIFT_LIST = "/api/Gift/get_gift_list";//礼物标签
|
||||
@@ -377,5 +378,28 @@ public class Constants {
|
||||
public static final String LIKE_ZONE = "/api/UserZone/like_zone";//语圈列表
|
||||
public static final String GET_COMMENT_LIST = "/api/UserZone/get_comment_list";//评论列表
|
||||
public static final String COMMENT_ZONE = "/api/UserZone/comment_zone";//评论列表
|
||||
public static final String TOPIC_ID = "/api/UserZone/get_zone_topic_list";//热门话题列表
|
||||
public static final String ZONE_DETAIL = "/api/UserZone/zone_detail";//语圈详情
|
||||
public static final String DELETE_COMMENT = "/api/UserZone/delete_zone_comment";//删除子评论
|
||||
public static final String DELETE_ZONE = "/api/UserZone/delete_zone";//删除动态
|
||||
public static final String FORGOT_PASSWORD = "/api/Login/forgot_password";//忘记密码
|
||||
public static final String CLEAR_LOGIN_INFO = "/api/Login/logout";//忘记密码
|
||||
public static final String CANCEL = "/api/Login/cancel";//注销账号
|
||||
public static final String GET_MY_INFO = "/api/User/get_user_info";//点击我的获取个人数据
|
||||
public static final String GET_USER_HOME = "/api/User/get_user_home";//点击获取个人数据
|
||||
|
||||
public static final String ED_USER_INFO = "/api/User/edit_user_info";//编辑信息
|
||||
public static final String ED_USER_BG = "/api/User/edit_user_bg";//编辑背景图片
|
||||
public static final String GET_USER_TAG_LIST = "/api/User/get_user_tag_list";//获取用户标签
|
||||
public static final String GET_USER_HOME_ZONE = "/api/User/user_home_zone";//获取用户动态
|
||||
public static final String GET_LIKE_LIST = "/api/UserZone/like_list";//获取点赞列表
|
||||
public static final String POST_GZ = "/api/User/follow";//关注、回关、取关
|
||||
public static final String GET_ALBUM_DETAIL = "/api/User/get_album_detail";//相册详情
|
||||
public static final String UP_ALBUM = "/api/User/add_album_content";//添加相册图片
|
||||
public static final String MOVE_ALBUM = "/api/User/move_album_images";//移动相册图片
|
||||
public static final String DELETE_ALBUM_IMAGE = "/api/User/delete_album_images";//删除图片
|
||||
public static final String DELETE_ALBUM = "/api/User/delete_album";//删除相册
|
||||
public static final String LIKE_ALBUM = "/api/User/like_album";//相册点赞
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
@@ -12,7 +13,9 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.adapter.CommentAdapter;
|
||||
import com.qxcm.moduleutil.adapter.LikeListAdapter;
|
||||
import com.qxcm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.databinding.FragmentCommentDialogBinding;
|
||||
import com.qxcm.moduleutil.presenter.CommentContacts;
|
||||
@@ -21,15 +24,17 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/5/30
|
||||
*@description: 评论弹框
|
||||
*@description: 点赞列表弹窗
|
||||
*/
|
||||
public class CommentDialogFragment extends BaseMvpDialogFragment<CommentPresenter, FragmentCommentDialogBinding> implements CommentContacts.View {
|
||||
public class CommentDialogFragment extends BaseMvpDialogFragment<CommentPresenter, FragmentCommentDialogBinding> implements
|
||||
CommentContacts.View {
|
||||
private int page;
|
||||
private CommentAdapter commentAdapter;
|
||||
private LikeListAdapter likeListAdapter;
|
||||
@Override
|
||||
protected CommentPresenter bindPresenter() {
|
||||
return new CommentPresenter(this, getActivity());
|
||||
@@ -43,9 +48,22 @@ public class CommentDialogFragment extends BaseMvpDialogFragment<CommentPresente
|
||||
}
|
||||
@Override
|
||||
protected void initData() {
|
||||
MvpPre.getCommentList(getArguments().getString("id"), "1", "10");
|
||||
MvpPre.getCommentList(getArguments().getString("id"));
|
||||
}
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
Window window = getDialog().getWindow();
|
||||
if (window != null) {
|
||||
// 设置固定高度为 500dp
|
||||
int heightInDp = 450;
|
||||
int heightInPx = (int) (heightInDp * getResources().getDisplayMetrics().density);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, heightInPx);
|
||||
|
||||
// 可选:设置动画样式(从底部弹出)
|
||||
window.setWindowAnimations(R.style.CommonShowDialogBottom);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
@@ -53,33 +71,24 @@ public class CommentDialogFragment extends BaseMvpDialogFragment<CommentPresente
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getCommentList(getArguments().getString("id"), page+"", "10");
|
||||
MvpPre.getCommentList(getArguments().getString("id"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getCommentList(getArguments().getString("id"), page+"", "10");
|
||||
MvpPre.getCommentList(getArguments().getString("id"));
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.tvSend.setOnClickListener(this::onClick);
|
||||
|
||||
mBinding.rvComment.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
commentAdapter = new CommentAdapter(new ArrayList<>());
|
||||
mBinding.rvComment.setAdapter(commentAdapter);
|
||||
likeListAdapter = new LikeListAdapter();
|
||||
mBinding.rvComment.setAdapter(likeListAdapter);
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId()==R.id.tv_send){
|
||||
if (mBinding.etInput.getText().toString().isEmpty()){
|
||||
ToastUtils.showShort("请输入评论内容");
|
||||
return;
|
||||
}
|
||||
MvpPre.commentZone(getArguments().getString("id"), mBinding.etInput.getText().toString(), "0", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
@@ -91,17 +100,13 @@ public class CommentDialogFragment extends BaseMvpDialogFragment<CommentPresente
|
||||
return R.layout.fragment_comment_dialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
if (commentBean!=null){
|
||||
mBinding.tvNum.setText("全部评论("+commentBean.getTotal()+")");
|
||||
commentAdapter.updateData(commentBean.getList()); // 假设 CommentBean 包含评论列表
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void commentZone() {
|
||||
ToastUtils.showShort("评论成功");
|
||||
MvpPre.getCommentList(getArguments().getString("id"), "1", "10");
|
||||
public void getCommentList(List<CircleListBean.LikeList> likeLists) {
|
||||
mBinding.tvNum.setText("已有"+likeLists.size()+"人点赞");
|
||||
likeListAdapter.setNewData(likeLists);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.qxcm.moduleutil.widget.dialog;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static com.qxcm.moduleutil.utils.wx.WeChatShareUtils.weChatShareUtils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -10,22 +15,46 @@ import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.blankj.utilcode.util.ImageUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.databinding.RoomDialogShareBinding;
|
||||
import com.qxcm.moduleutil.utils.BaseBottomSheetDialog;
|
||||
import com.qxcm.moduleutil.utils.wx.WeChatShareUtils;
|
||||
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX;
|
||||
|
||||
|
||||
/**
|
||||
* 房间分享弹窗
|
||||
*/
|
||||
public class ShareDialog extends BaseBottomSheetDialog<RoomDialogShareBinding> {
|
||||
public WeChatShareUtils weChatShareUtils;
|
||||
private Context mContext;
|
||||
private String mcontent;
|
||||
private String murl;
|
||||
private String ids;
|
||||
private int types;
|
||||
|
||||
public interface OnShareDataListener {
|
||||
void onShareDataLoaded(String id);
|
||||
}
|
||||
|
||||
private OnShareDataListener listener;
|
||||
|
||||
public void setOnShareDataListener(OnShareDataListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
private static final String TAG = "ShareDialog";
|
||||
|
||||
public ShareDialog(@NonNull Context context) {
|
||||
public ShareDialog(Context context, String content, String url, String id, int type) {
|
||||
super(context);
|
||||
this.mcontent = content;
|
||||
this.murl = url;
|
||||
this.mContext = getContext();
|
||||
this.ids = id;
|
||||
this.types = type;
|
||||
Log.i(TAG, "(Start)启动了===========================ShareDialog");
|
||||
}
|
||||
|
||||
@@ -43,28 +72,104 @@ public class ShareDialog extends BaseBottomSheetDialog<RoomDialogShareBinding> {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
mBinding.tvQq.setOnClickListener(this::onClick);
|
||||
mBinding.tvWeixin.setOnClickListener(this::onClick);
|
||||
mBinding.tvWx.setOnClickListener(this::onClick);
|
||||
mBinding.tvWxq.setOnClickListener(this::onClick);
|
||||
mBinding.tvQqq.setOnClickListener(this::onClick);
|
||||
mBinding.tvClean.setOnClickListener(this::onClick);
|
||||
mBinding.tvCopy.setOnClickListener(this::onClick);
|
||||
mBinding.tvJub.setOnClickListener(this::onClick);
|
||||
mBinding.shanc.setOnClickListener(this::onClick);
|
||||
|
||||
if (types == 1) {//1是分享动态
|
||||
|
||||
} else if (types == 2) {//分享相册
|
||||
mBinding.tvQq.setVisibility(GONE);
|
||||
mBinding.tvQqq.setVisibility(GONE);
|
||||
mBinding.rl.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
weChatShareUtils = WeChatShareUtils.getInstance(getContext());
|
||||
}
|
||||
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
String appName = CommonAppContext.getInstance().getResources().getString(R.string.app_name);
|
||||
// String appName = CommonAppContext.getInstance().getResources().getString(R.string.app_name);
|
||||
|
||||
|
||||
if (R.id.tv_qq == id) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.D0108, "share_way", "QQ分享");
|
||||
// ShareUtil.shareWeb((Activity) view.getContext(), URLConstants.SHARE, String.format("我在%s玩呢,大家都在玩,快来展示您的精彩", appName)
|
||||
// , appName, "", R.mipmap.ic_launcher_new, SHARE_MEDIA.QQ);
|
||||
} else if (R.id.tv_weixin == id) {
|
||||
} else if (R.id.tv_wx == id) {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.D0108, "share_way", "微信分享");
|
||||
// ShareUtil.shareWeb((Activity) view.getContext(), URLConstants.SHARE, String.format("我在%s玩呢,大家都在玩,快来展示您的精彩", appName)
|
||||
// , appName, "", R.mipmap.ic_launcher_new, SHARE_MEDIA.WEIXIN);
|
||||
fun_handleShare(SendMessageToWX.Req.WXSceneSession);
|
||||
} else if (R.id.tv_wxq == id) {
|
||||
fun_handleShare1(SendMessageToWX.Req.WXSceneTimeline);
|
||||
} else if (R.id.tv_qqq == id) {
|
||||
|
||||
} else if (R.id.shanc == id) {
|
||||
if (listener != null) {
|
||||
listener.onShareDataLoaded(ids);
|
||||
}
|
||||
} else if (R.id.tv_jub == id) {
|
||||
|
||||
} else if (R.id.tv_copy == id) {
|
||||
|
||||
}
|
||||
|
||||
dismiss();
|
||||
}
|
||||
|
||||
// todo fun_handleShare 分享小程序类型 (只支持分享给微信好友)
|
||||
private void fun_handleShare(int scene) {
|
||||
if (weChatShareUtils.isSupportWX()) {
|
||||
String appName = mContext.getPackageManager().getApplicationLabel(mContext.getApplicationInfo()).toString();
|
||||
if (types == 2){
|
||||
com.qxcm.moduleutil.utils.ImageUtils.loadBitmap(murl, new com.qxcm.moduleutil.utils.ImageUtils.onLoadBitmap() {
|
||||
@Override
|
||||
public void onReady(Bitmap resource) {
|
||||
weChatShareUtils.sharePic(resource, scene);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
String shortContent = mcontent.length() > 20 ? mcontent.substring(0, 20) : mcontent;
|
||||
String desc = shortContent;
|
||||
String title = appName;
|
||||
String url = murl;
|
||||
Bitmap bitmap = ImageUtils.drawable2Bitmap(mContext.getResources().getDrawable(R.mipmap.ic_launcher));
|
||||
weChatShareUtils.shareUrl(url, title, bitmap, desc, scene);
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("手机上微信版本不支持分享功能");
|
||||
}
|
||||
}
|
||||
|
||||
private void fun_handleShare1(int scene) {
|
||||
if (weChatShareUtils.isSupportWX()) {
|
||||
String appName = mContext.getPackageManager().getApplicationLabel(mContext.getApplicationInfo()).toString();
|
||||
if (types == 2) {
|
||||
com.qxcm.moduleutil.utils.ImageUtils.loadBitmap(murl, new com.qxcm.moduleutil.utils.ImageUtils.onLoadBitmap() {
|
||||
@Override
|
||||
public void onReady(Bitmap resource) {
|
||||
weChatShareUtils.sharePic(resource, scene);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
String shortContent = mcontent.length() > 20 ? mcontent.substring(0, 20) : mcontent;
|
||||
String desc = shortContent;
|
||||
String title = appName;
|
||||
String url = murl;
|
||||
// Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(),R.mipmap.ic_launcher);
|
||||
Bitmap bitmap = ImageUtils.drawable2Bitmap(mContext.getResources().getDrawable(R.mipmap.ic_launcher));
|
||||
weChatShareUtils.shareUrl(url, title, bitmap, desc, scene);
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("手机上微信版本不支持分享功能");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
7
moduleUtil/src/main/res/anim/slide_in_bottom.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:fromYDelta="100%"
|
||||
android:toYDelta="0%"
|
||||
android:duration="300"/>
|
||||
</set>
|
||||
7
moduleUtil/src/main/res/anim/slide_out_bottom.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:fromYDelta="0%"
|
||||
android:toYDelta="100%"
|
||||
android:duration="300"/>
|
||||
</set>
|
||||
6
moduleUtil/src/main/res/drawable/bg_bottom_sheet.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"/>
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<color android:color="@color/color_FF5F5F5F"/>
|
||||
</item>
|
||||
<item>
|
||||
<color android:color="@android:color/transparent"/>
|
||||
</item>
|
||||
</selector>
|
||||
5
moduleUtil/src/main/res/drawable/bg_r12_f9f9f9.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_12" />
|
||||
<solid android:color="#F9F9F9" />
|
||||
</shape>
|
||||
5
moduleUtil/src/main/res/drawable/bg_r48_bbffeb.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_48" />
|
||||
<solid android:color="@color/color_BBFFEB" />
|
||||
</shape>
|
||||
10
moduleUtil/src/main/res/drawable/bg_r53_33333.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/color_FF333333" />
|
||||
<corners
|
||||
android:bottomLeftRadius="53dp"
|
||||
android:bottomRightRadius="53dp"
|
||||
android:topLeftRadius="53dp"
|
||||
android:topRightRadius="53dp" />
|
||||
</shape>
|
||||
10
moduleUtil/src/main/res/drawable/bg_r53_f3f3f3.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#fff3f3f3" />
|
||||
<corners
|
||||
android:bottomLeftRadius="53dp"
|
||||
android:bottomRightRadius="53dp"
|
||||
android:topLeftRadius="53dp"
|
||||
android:topRightRadius="53dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/icon_pay_select" />
|
||||
|
||||
<!-- 默认状态(未选中) -->
|
||||
<item android:drawable="@drawable/icon_pay_unselect" />
|
||||
</selector>
|
||||
29
moduleUtil/src/main/res/layout/activity_web_view.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.WebViewActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<WebView
|
||||
android:id="@+id/web_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
56
moduleUtil/src/main/res/layout/bottom_sheet_recyclerview.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r16_tb_ffffff"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/bg_r80_hui"
|
||||
android:text="取消"
|
||||
android:textColor="#000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:text="选择相册"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@drawable/cs"
|
||||
android:text="确认"
|
||||
android:textColor="@color/color_FF333333" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/ll_options_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_bottom_sheet">
|
||||
</LinearLayout>
|
||||
82
moduleUtil/src/main/res/layout/dialog_input_password.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:text="温馨提示"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:text="确认开启相册私密吗?"/>
|
||||
|
||||
<com.qxcm.moduleutil.widget.ClearEditText
|
||||
android:id="@+id/ed_album_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="@drawable/bg_r100_hui"
|
||||
android:gravity="center|left"
|
||||
android:hint="请输入私密密码"
|
||||
android:maxLength="10"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="#333333"
|
||||
android:textColorHint="#9B9B9B"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_message" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="@dimen/dp_110"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:background="@drawable/bg_r53_f3f3f3"
|
||||
android:text="取消"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ed_album_password"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="@dimen/dp_110"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:background="@drawable/cs"
|
||||
android:text="确认"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ed_album_password"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
37
moduleUtil/src/main/res/layout/dialog_reply.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<EditText
|
||||
android:id="@+id/et_input"
|
||||
android:layout_width="@dimen/dp_242"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r80_hui"
|
||||
android:gravity="center|left"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:hint="就差你一个神评论~"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textShortMessage|textAutoCorrect"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="@dimen/dp_79"
|
||||
android:layout_height="@dimen/dp_31"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="发送"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
@@ -31,7 +31,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srlEnableLoadMore="false"
|
||||
app:srlEnableRefresh="false"
|
||||
>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_comment"
|
||||
@@ -45,49 +48,6 @@
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:background="#ccc" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_83"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_input"
|
||||
android:layout_width="@dimen/dp_242"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r80_hui"
|
||||
android:gravity="center|left"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:hint="就差你一个神评论~"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="@dimen/dp_79"
|
||||
android:layout_height="@dimen/dp_31"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="发送"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
7
moduleUtil/src/main/res/layout/index_image_banner.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.makeramen.roundedimageview.RoundedImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:riv_corner_radius="@dimen/dp_14" />
|
||||
@@ -1,10 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@@ -12,25 +15,27 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="15sp"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingRight="15sp">
|
||||
android:paddingRight="15sp"
|
||||
android:paddingBottom="@dimen/dp_10">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.qxcm.moduleutil.widget.CircularImage
|
||||
<com.qxcm.moduleutil.utils.MeHeadView
|
||||
android:id="@+id/dy_head_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="0.5" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1.5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@@ -43,10 +48,10 @@
|
||||
android:id="@+id/dy_name_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#212121"
|
||||
android:textStyle="bold"
|
||||
android:text="萌新驾到"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="#212121"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -61,23 +66,25 @@
|
||||
android:id="@+id/dy_time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="发布于12:52"
|
||||
android:layout_gravity="center"
|
||||
android:text="发布于12:52"
|
||||
android:textColor="#999999"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="left|center"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_weight="1.5"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="0.5" />
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/delete"-->
|
||||
@@ -108,6 +115,31 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="7"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_lookmore_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:text="查看更多"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/aaa"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -125,51 +157,25 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/dy_oneimage_iv"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius="5dp" />
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/dy_oneimage_iv"-->
|
||||
<!-- android:layout_width="200dp"-->
|
||||
<!-- android:layout_height="200dp"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:riv_corner_radius="5dp" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="7"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_lookmore_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:text="查看更多"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
@@ -198,61 +204,49 @@
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/dy_more_image"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_weight="1.7"-->
|
||||
<!-- android:paddingHorizontal="5dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_gravity="right"-->
|
||||
<!-- android:src="@mipmap/mx"-->
|
||||
<!-- android:visibility="visible" />-->
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rela"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.9"
|
||||
android:layout_gravity="right"
|
||||
android:background="@drawable/bg_r43_9999"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:layout_marginEnd="10dp">
|
||||
android:layout_weight="3"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:gravity="center|left">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_more_image"
|
||||
android:layout_width="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/hua"
|
||||
android:visibility="visible" />
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_alignParentStart="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_more_tv"
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:id="@+id/pinglun_tv"
|
||||
android:layout_width="@dimen/dp_96"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="萌新驾到"
|
||||
android:layout_toEndOf="@+id/recycle_view"
|
||||
android:text="等1.2万人点赞"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="visible"
|
||||
/>
|
||||
android:textSize="12sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="1dp"/>
|
||||
android:id="@+id/view"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pinglun"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left|center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
@@ -276,10 +270,10 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/dianzan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left|center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
@@ -301,10 +295,10 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/zs"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left|center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
@@ -335,5 +329,5 @@
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_17"
|
||||
@@ -55,17 +56,81 @@
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:background="@mipmap/huif"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:background="@mipmap/huif"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_detale"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:background="@mipmap/delte"
|
||||
app:layout_constraintStart_toEndOf="@+id/btn_reply"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_content" />
|
||||
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/cl_input"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:fitsSystemWindows="true"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@+id/tv_time"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/btn_reply"-->
|
||||
<!-- tools:visibility="visible"-->
|
||||
<!-- android:visibility="gone">-->
|
||||
|
||||
<!-- <EditText-->
|
||||
<!-- android:id="@+id/et_input"-->
|
||||
<!-- android:layout_width="@dimen/dp_242"-->
|
||||
<!-- android:layout_height="@dimen/dp_34"-->
|
||||
<!-- android:background="@drawable/bg_r80_hui"-->
|
||||
<!-- android:paddingStart="@dimen/dp_10"-->
|
||||
<!-- android:gravity="center|left"-->
|
||||
<!-- android:hint="就差你一个神评论~"-->
|
||||
<!-- android:textSize="@dimen/sp_14"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_send"-->
|
||||
<!-- android:layout_width="@dimen/dp_79"-->
|
||||
<!-- android:layout_height="@dimen/dp_31"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_12"-->
|
||||
<!-- android:background="@drawable/cs"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="发送"-->
|
||||
<!-- android:textColor="@color/color_FF333333"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- 子评论列表 -->
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:id="@+id/rv_replies"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content" />-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_replies"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:padding="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r12_f9f9f9"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_time" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_show_all_replies"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_replies"
|
||||
app:layout_constraintStart_toStartOf="@+id/rv_replies"
|
||||
android:text="全部评论..."
|
||||
android:visibility="gone" /> <!-- 默认隐藏 -->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
45
moduleUtil/src/main/res/layout/item_like_list.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12">
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/like_avatar"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true"
|
||||
android:src="@mipmap/default_avatar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="用户名"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/like_avatar"
|
||||
app:layout_constraintTop_toTopOf="@+id/like_avatar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
tools:text="2020-01-01 00:00:00"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_nickname"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_nickname"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
18
moduleUtil/src/main/res/layout/item_like_user.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="@dimen/dp_13"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:riv_oval="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,8 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="回复" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reply"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_name"
|
||||
tools:text="回复" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_7"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:text="2天"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_reply" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_reply"
|
||||
android:layout_width="@dimen/dp_38"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_time"
|
||||
android:background="@mipmap/huif"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_time"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -7,7 +7,7 @@
|
||||
android:id="@+id/iv_img"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"></ImageView>
|
||||
android:scaleType="fitXY"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
@@ -15,6 +15,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/default_image"></ImageView>
|
||||
android:src="@mipmap/default_image"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -11,41 +11,153 @@
|
||||
android:background="@drawable/bg_r16_tb_ffffff"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_43"
|
||||
android:text="分享到"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_18" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_clean"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@mipmap/gb" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_71"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qq"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/tv_wx"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_50"
|
||||
android:drawableTop="@mipmap/real_q"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@mipmap/wx"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:text="微信好友"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wxq"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/tv_wx"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_45"
|
||||
android:drawableTop="@mipmap/sign_icon_wechat_q"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:text="朋友圈"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qq"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_marginStart="@dimen/dp_45"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/tv_wxq"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@mipmap/qq"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:text="QQ"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qqq"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_45"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@mipmap/wx"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:text="QQ"
|
||||
android:textColor="#ffb4b4b4"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weixin"
|
||||
android:id="@+id/tv_copy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@mipmap/wx_zf"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@mipmap/lianj"
|
||||
android:text="复制链接"
|
||||
android:gravity="center"
|
||||
android:text="微信"
|
||||
android:textColor="#ffb4b4b4"
|
||||
android:textSize="12sp" />
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_jub"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/tv_copy"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:drawableTop="@mipmap/jub"
|
||||
android:text="举报"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shanc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@+id/tv_jub"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:drawableTop="@mipmap/shanc"
|
||||
android:text="删除"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
@@ -55,14 +167,6 @@
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:background="#14FFFFFF" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_clean"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_55"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#ffb4b4b4"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
moduleUtil/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 5.9 KiB |
BIN
moduleUtil/src/main/res/mipmap-mdpi/delte.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
moduleUtil/src/main/res/mipmap-mdpi/gb.png
Normal file
|
After Width: | Height: | Size: 848 B |
|
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 2.4 KiB |
BIN
moduleUtil/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 6.5 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 16 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/bj.png
Normal file
|
After Width: | Height: | Size: 897 B |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/cr_album.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 25 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/im_delete.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/im_share.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/im_transfer.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/jub.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/lianj.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/lock.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/qq.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/shanc.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |