1、个人信息完善
2、集成聊天功能 3、完成登录
2
.idea/compiler.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<bytecodeTargetLevel target="21" />
|
<bytecodeTargetLevel target="17" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
5
.idea/deploymentTargetSelector.xml
generated
@@ -4,7 +4,7 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2025-05-20T06:42:14.989297Z">
|
<DropdownSelection timestamp="2025-05-26T06:41:03.502984700Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=88Y4C19912006888" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=88Y4C19912006888" />
|
||||||
@@ -31,6 +31,9 @@
|
|||||||
<SelectionState runConfigName="modulevocal">
|
<SelectionState runConfigName="modulevocal">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
|
<SelectionState runConfigName="modulenews">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
7
.idea/gradle.xml
generated
@@ -6,7 +6,7 @@
|
|||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
<option name="gradleJvm" value="ms-17" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
@@ -15,9 +15,14 @@
|
|||||||
<option value="$PROJECT_DIR$/moduleUtil" />
|
<option value="$PROJECT_DIR$/moduleUtil" />
|
||||||
<option value="$PROJECT_DIR$/modulecircle" />
|
<option value="$PROJECT_DIR$/modulecircle" />
|
||||||
<option value="$PROJECT_DIR$/modulemain" />
|
<option value="$PROJECT_DIR$/modulemain" />
|
||||||
|
<option value="$PROJECT_DIR$/modulenews" />
|
||||||
<option value="$PROJECT_DIR$/moduletablayout" />
|
<option value="$PROJECT_DIR$/moduletablayout" />
|
||||||
<option value="$PROJECT_DIR$/modulevocal" />
|
<option value="$PROJECT_DIR$/modulevocal" />
|
||||||
<option value="$PROJECT_DIR$/modulevoice" />
|
<option value="$PROJECT_DIR$/modulevoice" />
|
||||||
|
<option value="$PROJECT_DIR$/timcommon" />
|
||||||
|
<option value="$PROJECT_DIR$/tuichat" />
|
||||||
|
<option value="$PROJECT_DIR$/tuiconversation" />
|
||||||
|
<option value="$PROJECT_DIR$/tuicore" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveExternalAnnotations" value="false" />
|
<option name="resolveExternalAnnotations" value="false" />
|
||||||
|
|||||||
2
.idea/misc.xml
generated
@@ -46,7 +46,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ android {
|
|||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
ndk {
|
||||||
|
//设置支持的so库框架
|
||||||
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|
||||||
@@ -79,8 +84,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
dataBinding true
|
dataBinding true
|
||||||
@@ -95,8 +100,9 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '11'
|
jvmTarget = '17'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -118,5 +124,9 @@ dependencies {
|
|||||||
implementation files('libs/logger-2.2.2-release.aar')
|
implementation files('libs/logger-2.2.2-release.aar')
|
||||||
implementation files('libs/main-2.2.3-release.aar')
|
implementation files('libs/main-2.2.3-release.aar')
|
||||||
|
|
||||||
|
//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,
|
||||||
|
////aar的名称,例如:WbCloudNormal-v5.1.10-123456789.aar,填入 'WbCloudNormal-v5.1.10-123456789.aar'
|
||||||
|
// implementation(name: 'WbCloudNormal-v5.1.10-4e3e198', ext: 'aar')
|
||||||
}
|
}
|
||||||
89
app/proguard-rules.pro
vendored
@@ -787,3 +787,92 @@ public static java.lang.String TABLENAME;
|
|||||||
*;
|
*;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 避免删除代码逻辑
|
||||||
|
-dontshrink
|
||||||
|
-dontoptimize
|
||||||
|
# 避免混淆 TUIKit
|
||||||
|
-keep class com.tencent.qcloud.** { *; }
|
||||||
|
-keep class com.tencent.imsdk.** { *; }
|
||||||
|
-keep class * implements com.tencent.qcloud.tuicore.interfaces.TUIInitializer {}
|
||||||
|
|
||||||
|
######################云刷脸混淆规则 faceverify-BEGIN#######################
|
||||||
|
####
|
||||||
|
#不混淆内部类
|
||||||
|
-keepattributes InnerClasses
|
||||||
|
|
||||||
|
#不混淆jni调用类
|
||||||
|
-keepclasseswithmembers class *{
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
###################### faceverify-BEGIN ###########################
|
||||||
|
-ignorewarnings
|
||||||
|
-keep public class com.tencent.ytcommon.**{*;}
|
||||||
|
-keep class com.tencent.turingfd.sdk.mfa.TNative$aa { public *; }
|
||||||
|
-keep class com.tencent.turingfd.sdk.mfa.TNative$aa$bb { public *;}
|
||||||
|
-keep class com.tencent.turingcam.** {*;}
|
||||||
|
-keep class com.tencent.turingfd.** {*;}
|
||||||
|
|
||||||
|
-keep public class com.tencent.youtu.ytagreflectlivecheck.jni.**{*;}
|
||||||
|
-keep public class com.tencent.youtu.ytagreflectlivecheck.YTAGReflectLiveCheckInterface{
|
||||||
|
public <methods>;
|
||||||
|
}
|
||||||
|
-keep public class com.tencent.youtu.ytposedetect.jni.**{*;}
|
||||||
|
-keep public class com.tencent.youtu.ytposedetect.data.**{*;}
|
||||||
|
-keep public class com.tencent.youtu.liveness.YTFaceTracker{*;}
|
||||||
|
-keep public class com.tencent.youtu.liveness.YTFaceTracker$*{*;}
|
||||||
|
|
||||||
|
-keep public class com.tencent.cloud.huiyansdkface.facelight.net.*$*{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep public class com.tencent.cloud.huiyansdkface.facelight.net.**{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep public class com.tencent.cloud.huiyansdkface.facelight.config.cdn.WbUiTips{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
|
||||||
|
#================数据上报混淆规则 start===========================
|
||||||
|
#实体类
|
||||||
|
-keep class com.tencent.cloud.huiyansdkface.analytics.EventSender{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep class com.tencent.cloud.huiyansdkface.analytics.EventSender$*{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep class com.tencent.cloud.huiyansdkface.analytics.WBSAEvent{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep class com.tencent.cloud.huiyansdkface.analytics.WBSAParam{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
#================数据上报混淆规则 end===========================
|
||||||
|
|
||||||
|
#######################faceverify-END#############################
|
||||||
|
|
||||||
|
####################### normal混淆规则-BEGIN#############################
|
||||||
|
#不混淆内部类
|
||||||
|
-keepattributes InnerClasses
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keepattributes Signature
|
||||||
|
-keepattributes Exceptions
|
||||||
|
|
||||||
|
-keep public class com.tencent.cloud.huiyansdkface.normal.net.*$*{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keep public class com.tencent.cloud.huiyansdkface.normal.net.*{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
#bugly
|
||||||
|
-keep class com.tencent.bugly.idasc.**{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
#wehttp混淆规则
|
||||||
|
-dontwarn com.tencent.cloud.huiyansdkface.okio.**
|
||||||
|
-keep class com.tencent.cloud.huiyansdkface.okio.**{
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-dontwarn com.tencent.cloud.huiyansdkface.okhttp3.OkHttpClient$Builder
|
||||||
|
|
||||||
|
####################### normal混淆规则-END#############################
|
||||||
@@ -106,11 +106,12 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
tools:replace="android:theme"
|
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
tools:targetApi="31"
|
tools:targetApi="31"
|
||||||
tools:ignore="SelectedPhotoAccess">
|
tools:ignore="SelectedPhotoAccess"
|
||||||
|
tools:replace="android:theme,android:allowBackup"
|
||||||
|
>
|
||||||
<activity
|
<activity
|
||||||
android:name=".LaunchPageActivity"
|
android:name=".LaunchPageActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ import com.qxcm.moduleutil.dialog.PolicyDialog;
|
|||||||
import com.qxcm.moduleutil.utils.SpUtil;
|
import com.qxcm.moduleutil.utils.SpUtil;
|
||||||
import com.qxcm.moduleutil.utils.logger.Logger;
|
import com.qxcm.moduleutil.utils.logger.Logger;
|
||||||
import com.qxcm.qxlive.databinding.ActivityLaunchPageBinding;
|
import com.qxcm.qxlive.databinding.ActivityLaunchPageBinding;
|
||||||
|
import com.tencent.qcloud.tuicore.TUILogin;
|
||||||
|
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, ActivityLaunchPageBinding> implements LaunchContacter.View {
|
public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, ActivityLaunchPageBinding> implements LaunchContacter.View {
|
||||||
private Handler handler;
|
private Handler handler;
|
||||||
@@ -165,6 +169,16 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
|
|||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} else {
|
} else {
|
||||||
|
TUILogin.login(getBaseContext(), 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("@@@","成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
startActivity(new Intent(this, MainActivity.class));
|
startActivity(new Intent(this, MainActivity.class));
|
||||||
}
|
}
|
||||||
finish();
|
finish();
|
||||||
|
|||||||
@@ -32,4 +32,5 @@ android.injected.testOnly=false
|
|||||||
APP_VERSION_NAME=1.0.0
|
APP_VERSION_NAME=1.0.0
|
||||||
APP_VERSION_CODE=1
|
APP_VERSION_CODE=1
|
||||||
|
|
||||||
|
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||||
|
org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||||
|
|||||||
@@ -9,12 +9,14 @@ easyProtectorRelease = "1.1.2"
|
|||||||
flexboxVersion = "1.0.0"
|
flexboxVersion = "1.0.0"
|
||||||
githubBannerviewpagerVersion = "3.5.12"
|
githubBannerviewpagerVersion = "3.5.12"
|
||||||
githubGlide = "4.12.0"
|
githubGlide = "4.12.0"
|
||||||
|
githubNiceSpinnerVersion = "1.4.4"
|
||||||
githubPhotoview = "2.3.0"
|
githubPhotoview = "2.3.0"
|
||||||
githubShadowlayout = "3.3.1"
|
githubShadowlayout = "3.3.1"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.1.5"
|
junitVersion = "1.1.5"
|
||||||
espressoCore = "3.5.1"
|
espressoCore = "3.5.1"
|
||||||
appcompat = "1.6.1"
|
appcompat = "1.6.1"
|
||||||
|
libraryVersion = "1.4"
|
||||||
lombok = "1.18.32"
|
lombok = "1.18.32"
|
||||||
marqueeview = "1.1.0"
|
marqueeview = "1.1.0"
|
||||||
material = "1.10.0"
|
material = "1.10.0"
|
||||||
@@ -42,6 +44,7 @@ roundedimageview = "2.3.0"
|
|||||||
rxandroid = "2.1.1"
|
rxandroid = "2.1.1"
|
||||||
scwangSmartrefreshlayout = "1.1.0-alpha-20"
|
scwangSmartrefreshlayout = "1.1.0-alpha-20"
|
||||||
scwangSmartrefreshheader = "1.1.0-alpha-20"
|
scwangSmartrefreshheader = "1.1.0-alpha-20"
|
||||||
|
singledateandtimepicker = "2.2.7"
|
||||||
svgaplayerAndroid = "2.5.13"
|
svgaplayerAndroid = "2.5.13"
|
||||||
toastVersion = "8.2"
|
toastVersion = "8.2"
|
||||||
utilcode = "1.30.6"
|
utilcode = "1.30.6"
|
||||||
@@ -61,6 +64,7 @@ xbanner = "1.7.0"
|
|||||||
[libraries]
|
[libraries]
|
||||||
alipay-alipaysdk-android = { module = "com.alipay.sdk:alipaysdk-android", version.ref = "alipayAlipaysdkAndroid" }
|
alipay-alipaysdk-android = { module = "com.alipay.sdk:alipaysdk-android", version.ref = "alipayAlipaysdkAndroid" }
|
||||||
android-flexbox = { module = "com.google.android:flexbox", version.ref = "flexboxVersion" }
|
android-flexbox = { module = "com.google.android:flexbox", version.ref = "flexboxVersion" }
|
||||||
|
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-bumptech-glide-glide = { module = "com.github.bumptech.glide:glide", version.ref = "githubGlide" }
|
||||||
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" }
|
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" }
|
||||||
com-jacktuotuo-customview-verificationcodeview3 = { module = "com.jacktuotuo.customview:verificationcodeview", version.ref = "comJacktuotuoCustomviewVerificationcodeview2" }
|
com-jacktuotuo-customview-verificationcodeview3 = { module = "com.jacktuotuo.customview:verificationcodeview", version.ref = "comJacktuotuoCustomviewVerificationcodeview2" }
|
||||||
@@ -96,12 +100,14 @@ greenrobot-eventbus-annotation-processor = { module = "org.greenrobot:eventbus-a
|
|||||||
google-gson = { module = "com.google.code.gson:gson", version.ref = "gsonVersion" }
|
google-gson = { module = "com.google.code.gson:gson", version.ref = "gsonVersion" }
|
||||||
logger = { module = "com.orhanobut:logger", version.ref = "logger" }
|
logger = { module = "com.orhanobut:logger", version.ref = "logger" }
|
||||||
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
|
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
|
||||||
|
numberprogressbar-library = { module = "com.daimajia.numberprogressbar:library", version.ref = "libraryVersion" }
|
||||||
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptorVersion" }
|
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptorVersion" }
|
||||||
persistentcookiejar = { module = "com.github.franmontiel:PersistentCookieJar", version.ref = "persistentcookiejar" }
|
persistentcookiejar = { module = "com.github.franmontiel:PersistentCookieJar", version.ref = "persistentcookiejar" }
|
||||||
pictureselector-picture_library = { module = "com.github.LuckSiege.PictureSelector:picture_library", version.ref = "picture_libraryVersion" }
|
pictureselector-picture_library = { module = "com.github.LuckSiege.PictureSelector:picture_library", version.ref = "picture_libraryVersion" }
|
||||||
reactivex-rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "reactivexRxjava" }
|
reactivex-rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "reactivexRxjava" }
|
||||||
roundedimageview = { module = "com.makeramen:roundedimageview", version.ref = "roundedimageview" }
|
roundedimageview = { module = "com.makeramen:roundedimageview", version.ref = "roundedimageview" }
|
||||||
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
|
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
|
||||||
|
singledateandtimepicker = { module = "com.github.florent37:singledateandtimepicker", version.ref = "singledateandtimepicker" }
|
||||||
squareup-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "comSquareupRetrofit2Retrofit3" }
|
squareup-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "comSquareupRetrofit2Retrofit3" }
|
||||||
retrofit2-adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "comSquareupRetrofit2Retrofit3" }
|
retrofit2-adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "comSquareupRetrofit2Retrofit3" }
|
||||||
svgaplayer-android = { module = "com.github.yyued:SVGAPlayer-Android", version.ref = "svgaplayerAndroid" }
|
svgaplayer-android = { module = "com.github.yyued:SVGAPlayer-Android", version.ref = "svgaplayerAndroid" }
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ import com.qxcm.moduleutil.utils.SpUtil;
|
|||||||
import com.qxcm.moduleutil.widget.Constants;
|
import com.qxcm.moduleutil.widget.Constants;
|
||||||
|
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -98,25 +100,6 @@ public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, A
|
|||||||
return new ImproveInfoPresenter(this, this);
|
return new ImproveInfoPresenter(this, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void success(UserFillResp resp) {
|
|
||||||
// UserBean user = MyApplication.getInstance().getUser();
|
|
||||||
// user.setSex(Integer.parseInt(sex));
|
|
||||||
// user.setNickname(nickname);
|
|
||||||
// try {
|
|
||||||
// user.setSex(Integer.parseInt(sex));
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
// MyApplication.getInstance().setUser(user);
|
|
||||||
// ToastUtils.showShort("设置成功");
|
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
|
||||||
// if (resp != null && !"0".equals(resp.getGift_bag_id())) {
|
|
||||||
// intent.putExtra("giftBagUrl", resp.getGift_bag_url());
|
|
||||||
// }
|
|
||||||
startActivity(intent);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
@@ -276,6 +259,7 @@ public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, A
|
|||||||
@Override
|
@Override
|
||||||
public void updateSuccess(UserBean userBean) {
|
public void updateSuccess(UserBean userBean) {
|
||||||
SpUtil.saveUserInfo(userBean);
|
SpUtil.saveUserInfo(userBean);
|
||||||
|
EventBus.getDefault().post(userBean);
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ public final class ImproveInfoContacts {
|
|||||||
|
|
||||||
|
|
||||||
public interface View extends IView<Activity> {
|
public interface View extends IView<Activity> {
|
||||||
void success(UserFillResp s);
|
|
||||||
|
|
||||||
void upLoadSuccess(String url, int type);
|
void upLoadSuccess(String url, int type);
|
||||||
|
|
||||||
@@ -30,7 +29,6 @@ public final class ImproveInfoContacts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface IImproveInfoPre extends IPresenter {
|
public interface IImproveInfoPre extends IPresenter {
|
||||||
void fill(String user_no, String nickname, String sex);
|
|
||||||
|
|
||||||
void uploadFile(File file, int type);
|
void uploadFile(File file, int type);
|
||||||
|
|
||||||
|
|||||||
@@ -33,26 +33,6 @@ public class ImproveInfoPresenter extends BasePresenter<ImproveInfoContacts.View
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public void fill(String user_no, String nickname, String sex) {
|
|
||||||
MvpRef.get().showLoadings();
|
|
||||||
// ApiClient.getInstance().userFill(user_no, nickname, sex, new BaseObserver<UserFillResp>() {
|
|
||||||
// @Override
|
|
||||||
// public void onSubscribe(Disposable d) {
|
|
||||||
// addDisposable(d);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onNext(UserFillResp s) {
|
|
||||||
MvpRef.get().success(null);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void onComplete() {
|
|
||||||
// MvpRef.get().disLoadings();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uploadFile(File file, int type) {
|
public void uploadFile(File file, int type) {
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public class LoginPresenter extends BasePresenter<LoginContacter.View> implement
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
EventBus.getDefault().post(userBean.get(0));
|
||||||
com.blankj.utilcode.util.ActivityUtils.startActivity(MainActivity.class);
|
com.blankj.utilcode.util.ActivityUtils.startActivity(MainActivity.class);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
dataBinding {
|
dataBinding {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '11'
|
jvmTarget = '17'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ dependencies {
|
|||||||
// api(libs.glide.compiler)
|
// api(libs.glide.compiler)
|
||||||
|
|
||||||
api(libs.svgaplayer.android)
|
api(libs.svgaplayer.android)
|
||||||
//banner-viewpager,无限循环滚动
|
//banner-viewpager,无限循环滚动 https://gitcode.com/gh_mirrors/ba/BannerViewPager?source_module=search_project
|
||||||
api(libs.com.github.zhpanvip.bannerviewpager)
|
api(libs.com.github.zhpanvip.bannerviewpager)
|
||||||
|
|
||||||
api(libs.android.flexbox)
|
api(libs.android.flexbox)
|
||||||
@@ -118,4 +118,16 @@ dependencies {
|
|||||||
|
|
||||||
api(libs.lombok)
|
api(libs.lombok)
|
||||||
annotationProcessor 'org.projectlombok:lombok:1.18.32'
|
annotationProcessor 'org.projectlombok:lombok:1.18.32'
|
||||||
|
//下拉框 https://gitcode.com/gh_mirrors/ni/nice-spinner?utm_source=csdn_blog_hover&isLogin=1
|
||||||
|
api(libs.com.github.arcadefire.nice.spinner)
|
||||||
|
|
||||||
|
//腾讯im
|
||||||
|
// api project(':tuiconversation')
|
||||||
|
// api project(':tuichat')
|
||||||
|
api project(':tuichat')
|
||||||
|
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
|
||||||
|
api files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
|
||||||
|
api files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||||
|
//2. 云normal SDK,
|
||||||
|
//aar的名称,例如:WbCloudNormal-v5.1.10-123456789.aar,填入 'WbCloudNormal-v5.1.10-123456789.aar'
|
||||||
}
|
}
|
||||||
BIN
moduleUtil/libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar
Normal file
BIN
moduleUtil/libs/WbCloudNormal-v5.1.10-4e3e198.aar
Normal file
@@ -1,8 +1,12 @@
|
|||||||
package com.qxcm.moduleutil.activity;
|
package com.qxcm.moduleutil.activity;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.provider.Settings;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
@@ -38,6 +42,18 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
initView();
|
initView();
|
||||||
initData();
|
initData();
|
||||||
initCompleted();
|
initCompleted();
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
if (!Settings.canDrawOverlays(this)) {
|
||||||
|
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
||||||
|
Uri.parse("package:" + getPackageName()));
|
||||||
|
startActivityForResult(intent, 100);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 对于低于 Android 6.0 的设备,无需请求悬浮窗权限
|
||||||
|
// 可在此处添加针对旧版本的处理逻辑(如果需要)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,11 +1,32 @@
|
|||||||
package com.qxcm.moduleutil.activity;
|
package com.qxcm.moduleutil.activity;
|
||||||
|
|
||||||
|
import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
|
import android.animation.ObjectAnimator;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.PixelFormat;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.databinding.ViewDataBinding;
|
import androidx.databinding.ViewDataBinding;
|
||||||
|
|
||||||
|
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.utils.LanguageUtil;
|
import com.qxcm.moduleutil.utils.LanguageUtil;
|
||||||
|
import com.tencent.qcloud.tuicore.TUILogin;
|
||||||
|
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewDataBinding> extends BaseAppCompatActivity<VDB> implements IView<Activity> {
|
public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewDataBinding> extends BaseAppCompatActivity<VDB> implements IView<Activity> {
|
||||||
|
|
||||||
@@ -50,4 +71,106 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
|||||||
protected void attachBaseContext(Context newBase) {
|
protected void attachBaseContext(Context newBase) {
|
||||||
super.attachBaseContext(LanguageUtil.attachBaseContext(newBase));
|
super.attachBaseContext(LanguageUtil.attachBaseContext(newBase));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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() {
|
||||||
|
@Override
|
||||||
|
public void onError(final int code, final String desc) {
|
||||||
|
LogUtils.e("@@@",code,"描述:",desc);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onSuccess() {
|
||||||
|
LogUtils.e("@@@","成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示全局飘屏消息(支持任意位置飘过)
|
||||||
|
*
|
||||||
|
* @param message 漂浮内容
|
||||||
|
* @param duration 动画时间(毫秒)
|
||||||
|
*/
|
||||||
|
public void showPiaoPingMessage(String message, long duration) {
|
||||||
|
WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
|
||||||
|
if (windowManager == null) return;
|
||||||
|
|
||||||
|
int screenWidth = getResources().getDisplayMetrics().widthPixels;
|
||||||
|
int screenHeight = getResources().getDisplayMetrics().heightPixels;
|
||||||
|
|
||||||
|
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(
|
||||||
|
WindowManager.LayoutParams.MATCH_PARENT,
|
||||||
|
WindowManager.LayoutParams.WRAP_CONTENT,
|
||||||
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ?
|
||||||
|
WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY :
|
||||||
|
WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
|
||||||
|
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
|
||||||
|
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
|
||||||
|
PixelFormat.TRANSLUCENT);
|
||||||
|
|
||||||
|
// 设置 Gravity 为左上角
|
||||||
|
layoutParams.gravity = Gravity.TOP | Gravity.START;
|
||||||
|
|
||||||
|
// Y 轴随机位置
|
||||||
|
layoutParams.y = (int) ((Math.random() * (screenHeight - 200)));
|
||||||
|
|
||||||
|
// 初始 X 设为负值,确保 View 在屏幕左侧外
|
||||||
|
layoutParams.x = -200;
|
||||||
|
|
||||||
|
View piaoPingView = LayoutInflater.from(this).inflate(R.layout.item_piaoping, null);
|
||||||
|
TextView textView = piaoPingView.findViewById(R.id.tv_content);
|
||||||
|
textView.setText(message);
|
||||||
|
|
||||||
|
windowManager.addView(piaoPingView, layoutParams);
|
||||||
|
|
||||||
|
piaoPingView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@Override
|
||||||
|
public void onGlobalLayout() {
|
||||||
|
piaoPingView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
|
|
||||||
|
int viewWidth = piaoPingView.getWidth();
|
||||||
|
|
||||||
|
// 设置锚点为左上角,避免偏移干扰
|
||||||
|
piaoPingView.setPivotX(0);
|
||||||
|
piaoPingView.setPivotY(0);
|
||||||
|
|
||||||
|
// 更新 x 坐标为 -screenWidth,确保 View 完全在屏幕左侧外
|
||||||
|
layoutParams.x = -screenWidth;
|
||||||
|
windowManager.updateViewLayout(piaoPingView, layoutParams);
|
||||||
|
|
||||||
|
// 启动动画:从左外滑入 -> 右外滑出
|
||||||
|
ObjectAnimator animator = ObjectAnimator.ofFloat(
|
||||||
|
piaoPingView,
|
||||||
|
"translationX",
|
||||||
|
0f, // 初始偏移为 0(此时 View 在左侧外)
|
||||||
|
screenWidth + viewWidth // 向右移动整个屏幕宽度 + View 宽度
|
||||||
|
);
|
||||||
|
animator.setDuration(duration);
|
||||||
|
animator.addUpdateListener(animation -> {
|
||||||
|
float value = (float) animation.getAnimatedValue();
|
||||||
|
LogUtils.d("PiaoPing", "translationX = " + value);
|
||||||
|
});
|
||||||
|
animator.addListener(new AnimatorListenerAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
windowManager.removeView(piaoPingView);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 强制 GPU 渲染
|
||||||
|
piaoPingView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||||
|
|
||||||
|
animator.start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
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.UserImgList;
|
||||||
|
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||||
|
|
||||||
|
public class UserPhotoWallAdapter extends BaseQuickAdapter<UserImgList, BaseViewHolder> {
|
||||||
|
private boolean b = false;
|
||||||
|
private int longClickPos = -1;
|
||||||
|
|
||||||
|
public UserPhotoWallAdapter() {
|
||||||
|
super(R.layout.me_item_user_photo_wall);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void convert(BaseViewHolder helper, UserImgList item) {
|
||||||
|
if (helper.getAdapterPosition() == 5) {
|
||||||
|
helper.setVisible(R.id.riv_user_head, false);
|
||||||
|
helper.setVisible(R.id.iv_close, false);
|
||||||
|
} else {
|
||||||
|
helper.setVisible(R.id.riv_user_head, true);
|
||||||
|
if (!"0".equals(item.getId())) {
|
||||||
|
ImageUtils.loadCenterCrop(item.getUrl(), helper.getView(R.id.riv_user_head));
|
||||||
|
if (longClickPos == helper.getAdapterPosition()) {
|
||||||
|
helper.setVisible(R.id.iv_close, true);
|
||||||
|
} else {
|
||||||
|
helper.setVisible(R.id.iv_close, false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
helper.setImageResource(R.id.riv_user_head, com.qxcm.moduleutil.R.mipmap.add_img);
|
||||||
|
helper.setGone(R.id.iv_close, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
helper.addOnClickListener(R.id.iv_close);
|
||||||
|
helper.addOnClickListener(R.id.riv_user_head);
|
||||||
|
helper.addOnLongClickListener(R.id.riv_user_head);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setDelete(boolean b) {
|
||||||
|
this.b = b;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongClickPos(int pos) {
|
||||||
|
this.longClickPos = pos;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getDelete() {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.qxcm.moduleutil.bean;
|
||||||
|
|
||||||
|
import com.stx.xhb.xbanner.entity.SimpleBannerInfo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class BannerModel extends SimpleBannerInfo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ad_id : 11
|
||||||
|
* type : 2
|
||||||
|
* title : 鱼糖语音·开服送好礼
|
||||||
|
* item_id : 9
|
||||||
|
* link_url : null
|
||||||
|
* content : https://gudao-prod.oss-cn-hangzhou.aliyuncs.com/user-dir/YZrsGTJR5F.jpg
|
||||||
|
* detail_pictures : null
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String ad_id;
|
||||||
|
private String type;
|
||||||
|
private String title;
|
||||||
|
private String item_id;
|
||||||
|
private String link_url;
|
||||||
|
private String content;
|
||||||
|
private ArrayList<String> detail_pictures;
|
||||||
|
|
||||||
|
public String getAd_id() {
|
||||||
|
return ad_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAd_id(String ad_id) {
|
||||||
|
this.ad_id = ad_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItem_id() {
|
||||||
|
return item_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItem_id(String item_id) {
|
||||||
|
this.item_id = item_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLink_url() {
|
||||||
|
return link_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLink_url(String link_url) {
|
||||||
|
this.link_url = link_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getDetail_pictures() {
|
||||||
|
return detail_pictures;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetail_pictures(ArrayList<String> detail_pictures) {
|
||||||
|
this.detail_pictures = detail_pictures;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getXBannerUrl() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.qxcm.moduleutil.bean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
/**
|
||||||
|
*@author qx
|
||||||
|
*@data 2025/5/27
|
||||||
|
*@description: 礼盒数据
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GiftBoxBean {
|
||||||
|
private String newDataJinbi;
|
||||||
|
private List<GiftBean> giftList;
|
||||||
|
@Data
|
||||||
|
public static class GiftBean {
|
||||||
|
private String giftName; //初级礼盒、高级礼盒
|
||||||
|
private String giftTitle; //最高可以获得的金币数
|
||||||
|
private String getGiftTypeName; //满多少个金币
|
||||||
|
private String giftTypeNumber; //当前的百分比
|
||||||
|
private String giftTypeStatus; //是否已经可以
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.qxcm.moduleutil.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
/**
|
||||||
|
*@author qx
|
||||||
|
*@data 2025/5/27
|
||||||
|
*@description: 实名认证点击获取返回的参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RealNameBean {
|
||||||
|
private String userid;
|
||||||
|
private String nonce;
|
||||||
|
private String sign;
|
||||||
|
private String appid;
|
||||||
|
private String orderNo;
|
||||||
|
private String apiVersion;
|
||||||
|
private String licence;
|
||||||
|
private String faceId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.qxcm.moduleutil.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RevenueBean {
|
||||||
|
private String title;
|
||||||
|
private String time;
|
||||||
|
private String money;
|
||||||
|
private String type;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.qxcm.moduleutil.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TaskDataBean {
|
||||||
|
private String taskName;//任务名称
|
||||||
|
private String taskNumber;//对应的数量
|
||||||
|
private String taskType;//类型,展示不同的按钮:1.观看,2.完成,3.送礼,4.邀请,5.充值,6.任务
|
||||||
|
private String taskPictureUrl;//任务不同的图片地址
|
||||||
|
private String taskReward;//奖励
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.qxcm.moduleutil.http;
|
package com.qxcm.moduleutil.http;
|
||||||
|
|
||||||
|
|
||||||
|
import com.qxcm.moduleutil.bean.RealNameBean;
|
||||||
import com.qxcm.moduleutil.bean.UserBean;
|
import com.qxcm.moduleutil.bean.UserBean;
|
||||||
import com.qxcm.moduleutil.widget.Constants;
|
import com.qxcm.moduleutil.widget.Constants;
|
||||||
|
|
||||||
@@ -53,6 +54,9 @@ public interface ApiServer {
|
|||||||
@POST(Constants.CHANGE_PASSWORD)
|
@POST(Constants.CHANGE_PASSWORD)
|
||||||
Call<BaseModel<String>> getPostData(@Field("new_password") String new_password,@Field("mobile") String mobile,@Field("sms_code") String code,@Field("user_id") String userId);
|
Call<BaseModel<String>> getPostData(@Field("new_password") String new_password,@Field("mobile") String mobile,@Field("sms_code") String code,@Field("user_id") String userId);
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(Constants.REAL_NAME_RESULT)
|
||||||
|
Call<BaseModel<String>> getRealNameResult(@Field("orderNo") String order_no);
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST(Constants.URL_LOGIN)
|
@POST(Constants.URL_LOGIN)
|
||||||
Observable<BaseModel<List<UserBean>>> oauthLogin(@Field("login_token") String login_token);
|
Observable<BaseModel<List<UserBean>>> oauthLogin(@Field("login_token") String login_token);
|
||||||
@@ -64,6 +68,10 @@ public interface ApiServer {
|
|||||||
@POST(Constants.URL_WX_CODE)
|
@POST(Constants.URL_WX_CODE)
|
||||||
Observable<BaseModel<List<UserBean>>> authCode1(@Field("code") String login_token);
|
Observable<BaseModel<List<UserBean>>> authCode1(@Field("code") String login_token);
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(Constants.REAL_NAME)
|
||||||
|
Observable<BaseModel<RealNameBean>> realName(@Field("real_name") String real_name, @Field("card_number") String card_number);
|
||||||
|
|
||||||
|
|
||||||
// @FormUrlEncoded
|
// @FormUrlEncoded
|
||||||
// @POST(Constant.URL.ADDBANK)
|
// @POST(Constant.URL.ADDBANK)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.franmontiel.persistentcookiejar.PersistentCookieJar;
|
|||||||
import com.franmontiel.persistentcookiejar.cache.SetCookieCache;
|
import com.franmontiel.persistentcookiejar.cache.SetCookieCache;
|
||||||
import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor;
|
import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor;
|
||||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||||
|
import com.qxcm.moduleutil.bean.RealNameBean;
|
||||||
import com.qxcm.moduleutil.bean.UserBean;
|
import com.qxcm.moduleutil.bean.UserBean;
|
||||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||||
import com.qxcm.moduleutil.utils.SystemUtils;
|
import com.qxcm.moduleutil.utils.SystemUtils;
|
||||||
@@ -195,4 +196,8 @@ public class RetrofitClient {
|
|||||||
sApiServer.authCode(netease_token).compose(new DefaultTransformer<>()).subscribe(observer);
|
sApiServer.authCode(netease_token).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void realName(String real_name, String card_number,BaseObserver<RealNameBean> observer){
|
||||||
|
sApiServer.realName(real_name,card_number).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ public enum EnvironmentEnum {
|
|||||||
"DhpCS82gaigZljYqsWsUWUAZ20dREz",
|
"DhpCS82gaigZljYqsWsUWUAZ20dREz",
|
||||||
"qx-yusheng",
|
"qx-yusheng",
|
||||||
"https://qx-yusheng.oss-cn-hangzhou.aliyuncs.com/",
|
"https://qx-yusheng.oss-cn-hangzhou.aliyuncs.com/",
|
||||||
"wx9b6db036ca1073a2"),
|
"wx9b6db036ca1073a2",
|
||||||
|
1600086675),
|
||||||
TEST(
|
TEST(
|
||||||
"http://chat.qxmier.com/",
|
"http://chat.qxmier.com/",
|
||||||
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
|
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
|
||||||
@@ -17,7 +18,8 @@ public enum EnvironmentEnum {
|
|||||||
"DhpCS82gaigZljYqsWsUWUAZ20dREz",
|
"DhpCS82gaigZljYqsWsUWUAZ20dREz",
|
||||||
"qx-yusheng",
|
"qx-yusheng",
|
||||||
"https://qx-yusheng.oss-cn-hangzhou.aliyuncs.com/",
|
"https://qx-yusheng.oss-cn-hangzhou.aliyuncs.com/",
|
||||||
"wx9b6db036ca1073a2");
|
"wx9b6db036ca1073a2",
|
||||||
|
1600086675);
|
||||||
|
|
||||||
private final String serverUrl;
|
private final String serverUrl;
|
||||||
private final String ALI_AUTH_KEY;//阿里云授权key
|
private final String ALI_AUTH_KEY;//阿里云授权key
|
||||||
@@ -30,7 +32,11 @@ public enum EnvironmentEnum {
|
|||||||
|
|
||||||
private final String wxAppId;
|
private final String wxAppId;
|
||||||
|
|
||||||
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId, String ossAccessKeySecret, String ossBucketName, String ossBaseUrl,String wxAppId) {
|
private final int sdkAppId;//腾讯云sdkAppId im
|
||||||
|
|
||||||
|
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
|
||||||
|
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl,String wxAppId,
|
||||||
|
int sdkAppId) {
|
||||||
this.serverUrl = serverUrl;
|
this.serverUrl = serverUrl;
|
||||||
this.ALI_AUTH_KEY = ALI_AUTH_KEY;
|
this.ALI_AUTH_KEY = ALI_AUTH_KEY;
|
||||||
this.ossEndPoint = ossEndPoint;
|
this.ossEndPoint = ossEndPoint;
|
||||||
@@ -39,6 +45,11 @@ public enum EnvironmentEnum {
|
|||||||
this.ossBucketName = ossBucketName;
|
this.ossBucketName = ossBucketName;
|
||||||
this.ossBaseUrl = ossBaseUrl;
|
this.ossBaseUrl = ossBaseUrl;
|
||||||
this.wxAppId=wxAppId;
|
this.wxAppId=wxAppId;
|
||||||
|
this.sdkAppId=sdkAppId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSdkAppId() {
|
||||||
|
return sdkAppId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getWxAppId() {
|
public String getWxAppId() {
|
||||||
|
|||||||
@@ -361,4 +361,7 @@ public class Constants {
|
|||||||
|
|
||||||
public static final String AUTHORIZATION = "/api/Login/AlipayUserInfo";
|
public static final String AUTHORIZATION = "/api/Login/AlipayUserInfo";
|
||||||
|
|
||||||
|
public static final String REAL_NAME = "/api/UserData/real_name";//调用实名认证接口
|
||||||
|
public static final String REAL_NAME_RESULT = "/api/UserData/real_name_result";//调用实名认证接口
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.qxcm.moduleutil.widget;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||||
|
|
||||||
|
public class CustomBottomSheetDialog extends BottomSheetDialog {
|
||||||
|
public CustomBottomSheetDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package com.qxcm.moduleutil.widget;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TabHost;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||||
|
import com.qxcm.moduleutil.R;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class DoubleTimePickerBottomSheet extends BottomSheetDialogFragment {
|
||||||
|
|
||||||
|
private OnTimeRangeSelectedListener listener;
|
||||||
|
|
||||||
|
public interface OnTimeRangeSelectedListener {
|
||||||
|
void onTimeRangeSelected(Date startDate, Date endDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnTimeRangeSelectedListener(OnTimeRangeSelectedListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
|
return new CustomBottomSheetDialog(requireContext());
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.dialog_double_time_picker, container, false);
|
||||||
|
|
||||||
|
// 初始化 TabHost
|
||||||
|
TabHost tabHost = view.findViewById(R.id.tabHost);
|
||||||
|
tabHost.setup();
|
||||||
|
|
||||||
|
tabHost.addTab(tabHost.newTabSpec("start").setIndicator("开始时间").setContent(R.id.start_time_tab));
|
||||||
|
tabHost.addTab(tabHost.newTabSpec("end").setIndicator("结束时间").setContent(R.id.end_time_tab));
|
||||||
|
|
||||||
|
// 初始化 Wheel Views
|
||||||
|
WheelDatePicker wheelStartDate = view.findViewById(R.id.wheel_start_date);
|
||||||
|
WheelTimePicker wheelStartTime = view.findViewById(R.id.wheel_start_time);
|
||||||
|
WheelDatePicker wheelEndDate = view.findViewById(R.id.wheel_end_date);
|
||||||
|
WheelTimePicker wheelEndTime = view.findViewById(R.id.wheel_end_time);
|
||||||
|
|
||||||
|
// 默认设置当前时间
|
||||||
|
Calendar startCal = Calendar.getInstance();
|
||||||
|
wheelStartDate.init(startCal.get(Calendar.YEAR), startCal.get(Calendar.MONTH), startCal.get(Calendar.DAY_OF_MONTH));
|
||||||
|
wheelStartTime.init(startCal.get(Calendar.HOUR_OF_DAY), startCal.get(Calendar.MINUTE),startCal.get(Calendar.SECOND));
|
||||||
|
|
||||||
|
// 设置默认结束时间略晚于开始时间
|
||||||
|
Calendar endCal = (Calendar) startCal.clone();
|
||||||
|
endCal.add(Calendar.HOUR, 1);
|
||||||
|
wheelEndDate.init(endCal.get(Calendar.YEAR), endCal.get(Calendar.MONTH), endCal.get(Calendar.DAY_OF_MONTH));
|
||||||
|
wheelEndTime.init(endCal.get(Calendar.HOUR_OF_DAY), endCal.get(Calendar.MINUTE),endCal.get(Calendar.SECOND));
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
view.findViewById(R.id.btn_cancel).setOnClickListener(v -> dismiss());
|
||||||
|
|
||||||
|
// 确定按钮
|
||||||
|
view.findViewById(R.id.btn_sure).setOnClickListener(v -> {
|
||||||
|
Calendar start = Calendar.getInstance();
|
||||||
|
start.set(wheelStartDate.getYear(), wheelStartDate.getMonth(), wheelStartDate.getDay(),
|
||||||
|
wheelStartTime.getHour(), wheelStartTime.getMinute(), wheelStartTime.getSecond());
|
||||||
|
|
||||||
|
Calendar end = Calendar.getInstance();
|
||||||
|
end.set(wheelEndDate.getYear(), wheelEndDate.getMonth(), wheelEndDate.getDay(),
|
||||||
|
wheelEndTime.getHour(), wheelEndTime.getMinute(), wheelEndTime.getSecond());
|
||||||
|
|
||||||
|
if (end.getTime().before(start.getTime())) {
|
||||||
|
Toast.makeText(requireContext(), "结束时间不能早于开始时间", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onTimeRangeSelected(start.getTime(), end.getTime());
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -56,4 +56,5 @@ public class ScrollViewPager extends ViewPager {
|
|||||||
public void setCurrentItem(int item) {
|
public void setCurrentItem(int item) {
|
||||||
super.setCurrentItem(item);
|
super.setCurrentItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.qxcm.moduleutil.widget;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.NumberPicker;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
|
public class WheelDatePicker extends LinearLayout {
|
||||||
|
|
||||||
|
private NumberPicker yearPicker, monthPicker, dayPicker;
|
||||||
|
private int maxDay = 31;
|
||||||
|
|
||||||
|
public WheelDatePicker(Context context) {
|
||||||
|
this(context, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WheelDatePicker(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
init(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init(Context context) {
|
||||||
|
setOrientation(HORIZONTAL);
|
||||||
|
|
||||||
|
yearPicker = new NumberPicker(context);
|
||||||
|
monthPicker = new NumberPicker(context);
|
||||||
|
dayPicker = new NumberPicker(context);
|
||||||
|
|
||||||
|
LayoutParams params = new LayoutParams(0, LayoutParams.WRAP_CONTENT, 1);
|
||||||
|
yearPicker.setLayoutParams(params);
|
||||||
|
monthPicker.setLayoutParams(params);
|
||||||
|
dayPicker.setLayoutParams(params);
|
||||||
|
|
||||||
|
addView(yearPicker);
|
||||||
|
addView(monthPicker);
|
||||||
|
addView(dayPicker);
|
||||||
|
|
||||||
|
// 初始化年份范围
|
||||||
|
int currentYear = Calendar.getInstance().get(Calendar.YEAR);
|
||||||
|
yearPicker.setMinValue(currentYear - 50);
|
||||||
|
yearPicker.setMaxValue(currentYear + 50);
|
||||||
|
|
||||||
|
// 月份从 1 到 12
|
||||||
|
monthPicker.setMinValue(1);
|
||||||
|
monthPicker.setMaxValue(12);
|
||||||
|
monthPicker.setOnValueChangedListener((picker, oldVal, newVal) -> updateDays());
|
||||||
|
|
||||||
|
// 默认天数范围
|
||||||
|
dayPicker.setMinValue(1);
|
||||||
|
dayPicker.setMaxValue(maxDay);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateDays() {
|
||||||
|
int year = yearPicker.getValue();
|
||||||
|
int month = monthPicker.getValue();
|
||||||
|
|
||||||
|
int daysInMonth;
|
||||||
|
if (month == 4 || month == 6 || month == 9 || month == 11) {
|
||||||
|
daysInMonth = 30;
|
||||||
|
} else if (month == 2) {
|
||||||
|
daysInMonth = isLeapYear(year) ? 29 : 28;
|
||||||
|
} else {
|
||||||
|
daysInMonth = 31;
|
||||||
|
}
|
||||||
|
|
||||||
|
int currentDay = dayPicker.getValue();
|
||||||
|
dayPicker.setMaxValue(daysInMonth);
|
||||||
|
if (currentDay > daysInMonth) {
|
||||||
|
dayPicker.setValue(daysInMonth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isLeapYear(int year) {
|
||||||
|
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(int year, int month, int day) {
|
||||||
|
yearPicker.setValue(year);
|
||||||
|
monthPicker.setValue(month + 1); // Calendar 是 0-based
|
||||||
|
dayPicker.setValue(day);
|
||||||
|
updateDays();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getYear() {
|
||||||
|
return yearPicker.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMonth() {
|
||||||
|
return monthPicker.getValue() - 1; // 转回 Calendar 的 0-based
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDay() {
|
||||||
|
return dayPicker.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.qxcm.moduleutil.widget;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.NumberPicker;
|
||||||
|
|
||||||
|
public class WheelTimePicker extends LinearLayout {
|
||||||
|
|
||||||
|
private NumberPicker hourPicker, minutePicker, secondPicker;
|
||||||
|
|
||||||
|
public WheelTimePicker(Context context) {
|
||||||
|
this(context, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WheelTimePicker(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
init(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init(Context context) {
|
||||||
|
setOrientation(HORIZONTAL);
|
||||||
|
|
||||||
|
hourPicker = new NumberPicker(context);
|
||||||
|
minutePicker = new NumberPicker(context);
|
||||||
|
secondPicker= new NumberPicker(context);
|
||||||
|
|
||||||
|
LayoutParams params = new LayoutParams(0, LayoutParams.WRAP_CONTENT, 1);
|
||||||
|
hourPicker.setLayoutParams(params);
|
||||||
|
minutePicker.setLayoutParams(params);
|
||||||
|
secondPicker.setLayoutParams(params);
|
||||||
|
|
||||||
|
addView(hourPicker);
|
||||||
|
addView(minutePicker);
|
||||||
|
addView(secondPicker);
|
||||||
|
|
||||||
|
// 设置小时范围
|
||||||
|
hourPicker.setMinValue(0);
|
||||||
|
hourPicker.setMaxValue(23);
|
||||||
|
|
||||||
|
// 设置分钟范围
|
||||||
|
minutePicker.setMinValue(0);
|
||||||
|
minutePicker.setMaxValue(59);
|
||||||
|
|
||||||
|
// 秒范围
|
||||||
|
secondPicker.setMinValue(0);
|
||||||
|
secondPicker.setMaxValue(59);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(int hour, int minute, int second) {
|
||||||
|
hourPicker.setValue(hour);
|
||||||
|
minutePicker.setValue(minute);
|
||||||
|
secondPicker.setValue(second);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHour() {
|
||||||
|
return hourPicker.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMinute() {
|
||||||
|
return minutePicker.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSecond() {
|
||||||
|
return secondPicker.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
6
moduleUtil/src/main/res/drawable/bg_r16_f6f6f6.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#F6F6F6"/>
|
||||||
|
<corners android:radius="11dp"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
5
moduleUtil/src/main/res/drawable/rounded_background.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_50" />
|
||||||
|
<solid android:color="@color/transparent" />
|
||||||
|
</shape>
|
||||||
@@ -26,6 +26,10 @@
|
|||||||
android:calendarViewShown="false"
|
android:calendarViewShown="false"
|
||||||
android:datePickerMode="spinner"
|
android:datePickerMode="spinner"
|
||||||
android:spinnersShown="true" />
|
android:spinnersShown="true" />
|
||||||
|
<TimePicker
|
||||||
|
android:id="@+id/timePickerStart"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|||||||
92
moduleUtil/src/main/res/layout/dialog_double_time_picker.xml
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
<?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:orientation="vertical"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TabHost
|
||||||
|
android:id="@+id/tabHost"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TabWidget
|
||||||
|
android:id="@android:id/tabs"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@android:id/tabcontent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<!-- 开始时间 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/start_time_tab"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="10dp">
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.WheelDatePicker
|
||||||
|
android:id="@+id/wheel_start_date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="180dp" />
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.WheelTimePicker
|
||||||
|
android:id="@+id/wheel_start_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="180dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 结束时间 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/end_time_tab"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="10dp">
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.WheelDatePicker
|
||||||
|
android:id="@+id/wheel_end_date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="180dp" />
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.WheelTimePicker
|
||||||
|
android:id="@+id/wheel_end_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="180dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</TabHost>
|
||||||
|
|
||||||
|
<!-- 按钮区域 -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="16dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_cancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:text="取消" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_sure"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:text="确定" />
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
13
moduleUtil/src/main/res/layout/item_piaoping.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:minWidth="200dp"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:textColor="#FF0000"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:background="@color/color_FF999999"/>
|
||||||
34
moduleUtil/src/main/res/layout/me_item_user_photo_wall.xml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?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_marginTop="@dimen/dp_5"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:paddingLeft="@dimen/dp_6"
|
||||||
|
android:paddingRight="@dimen/dp_6">
|
||||||
|
|
||||||
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
|
android:id="@+id/riv_user_head"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:riv_corner_radius="@dimen/dp_5"
|
||||||
|
tools:src="@mipmap/add_img" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_close"
|
||||||
|
android:layout_width="@dimen/dp_13"
|
||||||
|
android:layout_height="@dimen/dp_13"
|
||||||
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
|
android:layout_marginEnd="@dimen/dp_2"
|
||||||
|
android:src="@mipmap/icon_closes"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/riv_user_head"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/riv_user_head"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/gg.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/go_cz.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/go_lock.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/go_sl.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/go_wc.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/go_yq.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/nan.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/not_unlocked.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/nv.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/release_n.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/task_cj.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/task_gj.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/task_gz.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/task_lock.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/task_t.png
Normal file
|
After Width: | Height: | Size: 723 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/unlocked.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/up_t.png
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/up_x.png
Normal file
|
After Width: | Height: | Size: 760 B |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/xt.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/ylq.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
@@ -6,6 +6,7 @@
|
|||||||
<string name="voice_title">Vespa</string>
|
<string name="voice_title">Vespa</string>
|
||||||
<string name="wallet">wallet</string>
|
<string name="wallet">wallet</string>
|
||||||
<string name="dan">dan</string>
|
<string name="dan">dan</string>
|
||||||
|
<string name="news">news</string>
|
||||||
<string name="guild">Guild</string>
|
<string name="guild">Guild</string>
|
||||||
<string name="dressup">dress up</string>
|
<string name="dressup">dress up</string>
|
||||||
<string name="shopping">shopping</string>
|
<string name="shopping">shopping</string>
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
<color name="color_FF757575">#FF757575</color>
|
<color name="color_FF757575">#FF757575</color>
|
||||||
<color name="color_FFA6A6A6">#FFA6A6A6</color>
|
<color name="color_FFA6A6A6">#FFA6A6A6</color>
|
||||||
<color name="color_FFE3E3E3">#FFE3E3E3</color>
|
<color name="color_FFE3E3E3">#FFE3E3E3</color>
|
||||||
|
<color name="color_F8E3C8">#F8E3C8</color>
|
||||||
<color name="color_FFBDBDBC">#FFBDBDBC</color>
|
<color name="color_FFBDBDBC">#FFBDBDBC</color>
|
||||||
<color name="color_FF6A6A6A">#FF6A6A6A</color>
|
<color name="color_FF6A6A6A">#FF6A6A6A</color>
|
||||||
<color name="color_FFC8C8C8">#FFC8C8C8</color>
|
<color name="color_FFC8C8C8">#FFC8C8C8</color>
|
||||||
@@ -152,11 +153,14 @@
|
|||||||
<color name="color_424242">#424242</color>
|
<color name="color_424242">#424242</color>
|
||||||
<color name="color_A9A9A9">#A9A9A9</color>
|
<color name="color_A9A9A9">#A9A9A9</color>
|
||||||
<color name="color_EDF2F8">#EDF2F8</color>
|
<color name="color_EDF2F8">#EDF2F8</color>
|
||||||
|
<color name="color_E24171">#E24171</color>
|
||||||
|
<color name="color_FFB8CD">#FFB8CD</color>
|
||||||
<color name="color_EDF2F8_6_percent">#F0EDF2F8</color>
|
<color name="color_EDF2F8_6_percent">#F0EDF2F8</color>
|
||||||
<color name="color_8699FC">#8699FC</color>
|
<color name="color_8699FC">#8699FC</color>
|
||||||
<color name="color_D7E3F6">#D7E3F6</color>
|
<color name="color_D7E3F6">#D7E3F6</color>
|
||||||
<color name="color_797979">#797979</color>
|
<color name="color_797979">#797979</color>
|
||||||
<color name="color_FF31505E">#FF31505E</color>
|
<color name="color_FF31505E">#FF31505E</color>
|
||||||
|
<color name="color_F35F07">#F35F07</color>
|
||||||
<color name="color_5570FF">#5570FF</color>
|
<color name="color_5570FF">#5570FF</color>
|
||||||
<color name="color_DBE1FF">#DBE1FF</color>
|
<color name="color_DBE1FF">#DBE1FF</color>
|
||||||
<color name="color_DFFFFE">#DFFFFE</color>
|
<color name="color_DFFFFE">#DFFFFE</color>
|
||||||
@@ -196,6 +200,7 @@
|
|||||||
<color name="color_212121">#212121</color>
|
<color name="color_212121">#212121</color>
|
||||||
<color name="color_2B2823">#2B2823</color>
|
<color name="color_2B2823">#2B2823</color>
|
||||||
<color name="color_34322D">#34322D</color>
|
<color name="color_34322D">#34322D</color>
|
||||||
|
<color name="color_FCE4ED">#FCE4ED</color>
|
||||||
<color name="color_EBEDF6">#EBEDF6</color>
|
<color name="color_EBEDF6">#EBEDF6</color>
|
||||||
<color name="color_B7C3FC">#B7C3FC</color>
|
<color name="color_B7C3FC">#B7C3FC</color>
|
||||||
<color name="color_CCCCCC">#CCCCCC</color>
|
<color name="color_CCCCCC">#CCCCCC</color>
|
||||||
@@ -209,6 +214,7 @@
|
|||||||
<color name="color_FFFFADAD">#FFFFADAD</color>
|
<color name="color_FFFFADAD">#FFFFADAD</color>
|
||||||
<color name="color_FF845500">#FF845500</color>
|
<color name="color_FF845500">#FF845500</color>
|
||||||
<color name="color_FFFFDC96">#FFFFDC96</color>
|
<color name="color_FFFFDC96">#FFFFDC96</color>
|
||||||
|
<color name="color_FDE8AE">#FDE8AE</color>
|
||||||
<color name="color_FFFFD698">#FFFFD698</color>
|
<color name="color_FFFFD698">#FFFFD698</color>
|
||||||
<color name="color_FF7F5FF5">#FF7F5FF5</color>
|
<color name="color_FF7F5FF5">#FF7F5FF5</color>
|
||||||
<color name="color_FFFF5858">#FFFF5858</color>
|
<color name="color_FFFF5858">#FFFF5858</color>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<string name="shopping">道具商城</string>
|
<string name="shopping">道具商城</string>
|
||||||
<string name="backpack">我的背包</string>
|
<string name="backpack">我的背包</string>
|
||||||
<string name="daily">每日任务</string>
|
<string name="daily">每日任务</string>
|
||||||
|
<string name="news">音信</string>
|
||||||
|
|
||||||
<string name="msg_notification">消息通知</string>
|
<string name="msg_notification">消息通知</string>
|
||||||
<string name="minor_mode">未成年人模式</string>
|
<string name="minor_mode">未成年人模式</string>
|
||||||
@@ -95,6 +96,7 @@
|
|||||||
<string name="diamond_income_expense">钻石收支</string>
|
<string name="diamond_income_expense">钻石收支</string>
|
||||||
<string name="other_functions">其他功能</string>
|
<string name="other_functions">其他功能</string>
|
||||||
<string name="diamond_to_coin">钻石换币</string>
|
<string name="diamond_to_coin">钻石换币</string>
|
||||||
|
<string name="coin_to_diamond">金币收支</string>
|
||||||
|
|
||||||
<string name="recharge">充值</string>
|
<string name="recharge">充值</string>
|
||||||
<string name="payment_method">支付方式</string>
|
<string name="payment_method">支付方式</string>
|
||||||
|
|||||||
@@ -145,5 +145,14 @@
|
|||||||
<item name="android:backgroundDimEnabled">true</item>
|
<item name="android:backgroundDimEnabled">true</item>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
<!-- 使用 Material 3 支持的属性或回退到兼容样式 -->
|
||||||
|
<!-- <style name="RoundedProgressBar" parent="Widget.AppCompat.ProgressBar.Horizontal">-->
|
||||||
|
<!-- <item name="android:layerType">software</item>-->
|
||||||
|
<!-- <item name="android:background">@drawable/rounded_background</item>-->
|
||||||
|
<!-- </style>-->
|
||||||
|
<style name="RoundedProgressBar" parent="Widget.Material3.LinearProgressIndicator">
|
||||||
|
<item name="trackCornerRadius">50dp</item>
|
||||||
|
<!-- <item name="indicatorCornerRadius">50%</item>-->
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -24,8 +24,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
dataBinding {
|
dataBinding {
|
||||||
enabled = true
|
enabled = true
|
||||||
@@ -39,6 +39,8 @@ dependencies {
|
|||||||
|
|
||||||
implementation libs.appcompat
|
implementation libs.appcompat
|
||||||
implementation libs.material
|
implementation libs.material
|
||||||
|
implementation libs.activity
|
||||||
|
implementation libs.constraintlayout
|
||||||
testImplementation libs.junit
|
testImplementation libs.junit
|
||||||
androidTestImplementation libs.ext.junit
|
androidTestImplementation libs.ext.junit
|
||||||
androidTestImplementation libs.espresso.core
|
androidTestImplementation libs.espresso.core
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true">
|
||||||
android:theme="@style/BaseAppTheme" />
|
<activity
|
||||||
|
android:name=".activity.ReleaseActivity"
|
||||||
|
android:exported="false" />
|
||||||
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
package com.example.modulecircle.activity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.example.modulecircle.R;
|
||||||
|
import com.example.modulecircle.contacts.ReleaseContract;
|
||||||
|
import com.example.modulecircle.databinding.ActivityReleaseBinding;
|
||||||
|
import com.example.modulecircle.dialog.MultiSelectAdapter;
|
||||||
|
import com.example.modulecircle.presenter.ReleasePresenter;
|
||||||
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||||
|
import com.luck.picture.lib.PictureSelector;
|
||||||
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
|
import com.luck.picture.lib.config.PictureMimeType;
|
||||||
|
import com.luck.picture.lib.entity.LocalMedia;
|
||||||
|
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||||
|
import com.qxcm.moduleutil.adapter.UserPhotoWallAdapter;
|
||||||
|
import com.qxcm.moduleutil.bean.UserImgList;
|
||||||
|
import com.qxcm.moduleutil.utils.GlideEngine;
|
||||||
|
import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||||
|
import com.qxcm.moduleutil.widget.Constants;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author qx
|
||||||
|
* @data 2025/5/28
|
||||||
|
* @description: 发布动态
|
||||||
|
*/
|
||||||
|
public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityReleaseBinding> implements ReleaseContract.View {
|
||||||
|
UserPhotoWallAdapter mUserPhotoWallAdapter;
|
||||||
|
List<UserImgList> list;
|
||||||
|
final int maxNum = 1200;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initData() {
|
||||||
|
mBinding.topBar.setTitle("动态发布");
|
||||||
|
|
||||||
|
mBinding.tvSz.setText("0/" + maxNum);
|
||||||
|
mBinding.etG.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
if (s.length() == maxNum) {
|
||||||
|
mBinding.tvSz.setText("您输入的字数已超过限制");
|
||||||
|
} else {
|
||||||
|
mBinding.tvSz.setText((maxNum - s.length()) + "/" + maxNum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mBinding.rvPhotoWall.setLayoutManager(new GridLayoutManager(this, 3));
|
||||||
|
mBinding.rvPhotoWall.setAdapter(mUserPhotoWallAdapter = new UserPhotoWallAdapter());
|
||||||
|
mUserPhotoWallAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
|
int id = view.getId();
|
||||||
|
UserImgList item = mUserPhotoWallAdapter.getItem(position);
|
||||||
|
if (id == com.qxcm.moduleutil.R.id.iv_close) {
|
||||||
|
// MvpPre.deletePhoto(item.getId(), position);
|
||||||
|
} else {
|
||||||
|
if ("0".equals(item.getId())) {
|
||||||
|
startChoosePhoto(PictureMimeType.ofImage(), PictureConfig.REQUEST_CAMERA, true, 9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mUserPhotoWallAdapter.setOnItemChildLongClickListener(new BaseQuickAdapter.OnItemChildLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
|
mUserPhotoWallAdapter.setLongClickPos(position);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
list = new ArrayList<>();
|
||||||
|
UserImgList userImgList = new UserImgList("0", "");
|
||||||
|
list.add(userImgList);
|
||||||
|
mUserPhotoWallAdapter.setNewData(list);
|
||||||
|
mUserPhotoWallAdapter.setDelete(true);
|
||||||
|
|
||||||
|
mBinding.rl1.setOnClickListener(this::onClick);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onClick(View view) {
|
||||||
|
if (view.getId() == R.id.rl_1) {
|
||||||
|
dialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dialog() {
|
||||||
|
|
||||||
|
// 示例数据
|
||||||
|
List<String> topics = Arrays.asList("话题1", "话题2", "话题3", "话题4");
|
||||||
|
|
||||||
|
BottomSheetDialog dialog = new BottomSheetDialog(this);
|
||||||
|
dialog.setContentView(R.layout.bottom_sheet_recyclerview);
|
||||||
|
|
||||||
|
RecyclerView recyclerView = dialog.findViewById(R.id.rv_options);
|
||||||
|
Button btnCancel = dialog.findViewById(R.id.btn_cancel);
|
||||||
|
Button btnConfirm = dialog.findViewById(R.id.btn_confirm);
|
||||||
|
|
||||||
|
assert recyclerView != null;
|
||||||
|
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
|
MultiSelectAdapter adapter = new MultiSelectAdapter(topics);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
|
btnCancel.setOnClickListener(v -> dialog.dismiss());
|
||||||
|
|
||||||
|
btnConfirm.setOnClickListener(v -> {
|
||||||
|
List<String> selectedTopics = adapter.getSelectedItems();
|
||||||
|
// 返回结果给调用页面(可使用接口或 onActivityResult 等方式)
|
||||||
|
Log.d("Selected Topics", selectedTopics.toString());
|
||||||
|
// 示例:更新 UI
|
||||||
|
((TextView)findViewById(R.id.tv_ht)).setText("已选:" + TextUtils.join(",", selectedTopics));
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.show();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startChoosePhoto(int mimeType, int requestCode, boolean isVideo, int type) {
|
||||||
|
|
||||||
|
PictureSelector.create(this)
|
||||||
|
.openGallery(mimeType)
|
||||||
|
.isGif(isVideo)
|
||||||
|
.imageEngine(GlideEngine.createGlideEngine())
|
||||||
|
.maxSelectNum(type)
|
||||||
|
.isPreviewImage(true)
|
||||||
|
.isCamera(true)
|
||||||
|
.setOutputCameraPath(Constants.FILE_PATH)
|
||||||
|
.isCompress(true)
|
||||||
|
.setPictureStyle(MyPictureParameterStyle.Companion.selectPicture())
|
||||||
|
.forResult(requestCode); //结果回调onActivityResult code
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (resultCode == RESULT_OK && data != null) {
|
||||||
|
switch (requestCode) {
|
||||||
|
case PictureConfig.CHOOSE_REQUEST:
|
||||||
|
List<LocalMedia> localMedia = PictureSelector.obtainMultipleResult(data);
|
||||||
|
if (localMedia != null && localMedia.size() != 0) {
|
||||||
|
LocalMedia imgMedia = localMedia.get(0);
|
||||||
|
String url;
|
||||||
|
if (imgMedia.isCompressed()) {
|
||||||
|
url = imgMedia.getCompressPath();
|
||||||
|
} else {
|
||||||
|
url = imgMedia.getRealPath();
|
||||||
|
}
|
||||||
|
// MvpPre.uploadFile(new File(url), 0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PictureConfig.REQUEST_CAMERA:
|
||||||
|
List<LocalMedia> localMedia1 = PictureSelector.obtainMultipleResult(data);
|
||||||
|
if (localMedia1 != null && localMedia1.size() != 0) {
|
||||||
|
LocalMedia imgMedia = localMedia1.get(0);
|
||||||
|
// MvpPre.uploadFile(new File(imgMedia.getRealPath()), 3);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.activity_release;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ReleasePresenter bindPresenter() {
|
||||||
|
return new ReleasePresenter(this, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
package com.example.modulecircle.adapter;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
|
import com.example.modulecircle.R;
|
||||||
|
import com.qxcm.moduleutil.adapter.OneImageYuanJiaoAdapter;
|
||||||
|
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||||
|
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||||
|
import com.qxcm.moduleutil.widget.MyGridView;
|
||||||
|
import com.qxcm.moduleutil.widget.img.FullScreenUtil;
|
||||||
|
|
||||||
|
public class ExpandColumnAdapter extends BaseQuickAdapter<CircleListBean, BaseViewHolder> {
|
||||||
|
public ExpandColumnAdapter() {
|
||||||
|
super(R.layout.item_expand_column);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void convert(BaseViewHolder helper, CircleListBean item) {
|
||||||
|
helper.addOnClickListener(com.qxcm.moduleutil.R.id.dianzan)
|
||||||
|
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_lookmore_tv)
|
||||||
|
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_head_image)
|
||||||
|
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_more_image)
|
||||||
|
.addOnClickListener(com.qxcm.moduleutil.R.id.dy_oneimage_iv);
|
||||||
|
|
||||||
|
//先让单图,多图,音频的布局显示
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_oneimage_iv).setVisibility(View.VISIBLE);
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||||
|
helper.getView(com.qxcm.moduleutil.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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//昵称
|
||||||
|
helper.setText(com.qxcm.moduleutil.R.id.dy_name_text, item.getUserNickName());
|
||||||
|
|
||||||
|
//头像
|
||||||
|
ImageUtils.loadHeadCC(item.getUserAvatar(), (ImageView) helper.getView(com.qxcm.moduleutil.R.id.dy_head_image));
|
||||||
|
|
||||||
|
//动态内容以富文本展示
|
||||||
|
String content = item.getContent();
|
||||||
|
if (content == null || content.length() == 0) {
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onPreDraw() {
|
||||||
|
//这个回调会调用多次,获取完行数记得注销监听
|
||||||
|
TextView view = helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv);
|
||||||
|
int lineCount = view.getLineCount();
|
||||||
|
if (lineCount >= 7) {
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||||
|
} else {
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
helper.setText(com.qxcm.moduleutil.R.id.dy_content_tv, content);
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(content)) {
|
||||||
|
TextView view = helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv);
|
||||||
|
view.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
TextView view = helper.getView(com.qxcm.moduleutil.R.id.dy_content_tv);
|
||||||
|
view.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//点赞
|
||||||
|
helper.setText(com.qxcm.moduleutil.R.id.dy_fabulous, item.getLike());
|
||||||
|
// if (item.is_praise() == 1) {
|
||||||
|
// TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||||
|
// dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan2));
|
||||||
|
// helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_yidianzan);
|
||||||
|
// } else {
|
||||||
|
// TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||||
|
// dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan1));
|
||||||
|
// helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_dianzan);
|
||||||
|
// }
|
||||||
|
|
||||||
|
//分享数
|
||||||
|
helper.setText(com.qxcm.moduleutil.R.id.dy_zs, item.getIsShare());
|
||||||
|
//评论数
|
||||||
|
helper.setText(com.qxcm.moduleutil.R.id.dy_comment, item.getComment() + "");
|
||||||
|
|
||||||
|
|
||||||
|
//时间
|
||||||
|
|
||||||
|
if (!item.getTime().isEmpty()) {
|
||||||
|
try {
|
||||||
|
helper.setText(com.qxcm.moduleutil.R.id.dy_time_text, item.getTime());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (item.getImages().size() != 0) {
|
||||||
|
String[] arrIv = item.getImages().toArray(new String[item.getImages().size()]);
|
||||||
|
int length = arrIv.length;
|
||||||
|
|
||||||
|
|
||||||
|
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||||
|
MyGridView recyclerView = helper.getView(com.qxcm.moduleutil.R.id.dy_image_recyc);
|
||||||
|
recyclerView.setNumColumns(3);
|
||||||
|
recyclerView.setAdapter(oneImageYuanJiaoAdapter);
|
||||||
|
oneImageYuanJiaoAdapter.getList_adapter().clear();
|
||||||
|
|
||||||
|
for (int j = 0; j < arrIv.length; j++) {
|
||||||
|
oneImageYuanJiaoAdapter.getList_adapter().add(arrIv[j]);
|
||||||
|
}
|
||||||
|
helper.getView(com.qxcm.moduleutil.R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||||
|
|
||||||
|
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||||
|
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.example.modulecircle.contacts;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
|
||||||
|
import com.qxcm.moduleutil.activity.IPresenter;
|
||||||
|
import com.qxcm.moduleutil.activity.IView;
|
||||||
|
|
||||||
|
public class ReleaseContract {
|
||||||
|
public interface View extends IView<Activity> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IIndexPre extends IPresenter {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.example.modulecircle.dialog;
|
||||||
|
|
||||||
|
import android.util.SparseBooleanArray;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.example.modulecircle.R;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.ViewHolder> {
|
||||||
|
private List<String> options;
|
||||||
|
private SparseBooleanArray selectedPositions = new SparseBooleanArray();
|
||||||
|
|
||||||
|
public MultiSelectAdapter(List<String> options) {
|
||||||
|
this.options = options;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_multi_select, parent, false);
|
||||||
|
return new ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
|
String item = options.get(position);
|
||||||
|
holder.tvOption.setText(item);
|
||||||
|
holder.cbOption.setChecked(selectedPositions.get(position, false));
|
||||||
|
|
||||||
|
holder.itemView.setOnClickListener(v -> {
|
||||||
|
boolean isChecked = selectedPositions.get(position, false);
|
||||||
|
if (isChecked) {
|
||||||
|
selectedPositions.delete(position);
|
||||||
|
} else {
|
||||||
|
selectedPositions.put(position, true);
|
||||||
|
}
|
||||||
|
notifyItemChanged(position);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return options.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getSelectedItems() {
|
||||||
|
List<String> selected = new ArrayList<>();
|
||||||
|
for (int i = 0; i < options.size(); i++) {
|
||||||
|
if (selectedPositions.get(i)) {
|
||||||
|
selected.add(options.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
CheckBox cbOption;
|
||||||
|
TextView tvOption;
|
||||||
|
|
||||||
|
public ViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
cbOption = itemView.findViewById(R.id.cb_option);
|
||||||
|
tvOption = itemView.findViewById(R.id.tv_option);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,9 +1,16 @@
|
|||||||
package com.example.modulecircle.fragment;
|
package com.example.modulecircle.fragment;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||||
|
|
||||||
import com.example.modulecircle.R;
|
import com.example.modulecircle.R;
|
||||||
|
import com.example.modulecircle.activity.ReleaseActivity;
|
||||||
import com.example.modulecircle.contacts.CircleContacts;
|
import com.example.modulecircle.contacts.CircleContacts;
|
||||||
import com.example.modulecircle.databinding.FragmentCircleBinding;
|
import com.example.modulecircle.databinding.FragmentCircleBinding;
|
||||||
import com.example.modulecircle.presenter.CirclePresenter;
|
import com.example.modulecircle.presenter.CirclePresenter;
|
||||||
@@ -11,6 +18,8 @@ import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
|||||||
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||||
import com.qxcm.moduleutil.bean.HeatedBean;
|
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||||
|
import com.qxcm.moduleutil.bean.MyBagBean;
|
||||||
|
import com.qxcm.moduleutil.bean.RoomTypeModel;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -20,22 +29,32 @@ import java.util.List;
|
|||||||
*语圈
|
*语圈
|
||||||
*/
|
*/
|
||||||
public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCircleBinding> implements CircleContacts.View {
|
public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCircleBinding> implements CircleContacts.View {
|
||||||
|
private List<MyBagBean> list;
|
||||||
public static CircleFragment newInstance () {
|
public static CircleFragment newInstance () {
|
||||||
return new CircleFragment();
|
return new CircleFragment();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData () {
|
protected void initData () {
|
||||||
|
list=new ArrayList<>();
|
||||||
|
list.add(new MyBagBean("发现", "1"));
|
||||||
|
list.add(new MyBagBean("扩列", "2"));
|
||||||
|
|
||||||
|
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list));
|
||||||
|
mBinding.tabLayout.setViewPager(mBinding.viewPager);
|
||||||
|
mBinding.tabLayout.setCurrentTab(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView () {
|
protected void initView () {
|
||||||
|
|
||||||
List<Fragment> fragments = new ArrayList<>();
|
mBinding.ivRelease.setOnClickListener(this::onClick);
|
||||||
fragments.add(CircleCategoryFragment.newInstance());
|
}
|
||||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(fragments, getChildFragmentManager()));
|
|
||||||
|
|
||||||
|
private void onClick(View view) {
|
||||||
|
if (view.getId()==R.id.iv_release){//发布
|
||||||
|
startActivity(new Intent(getContext(), ReleaseActivity.class));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -63,4 +82,37 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
|||||||
public void setCircleList(List<CircleListBean> list) {
|
public void setCircleList(List<CircleListBean> list) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
|
private List<MyBagBean> list;
|
||||||
|
|
||||||
|
|
||||||
|
public MyFragmentPagerAdapter(FragmentManager fm, List<MyBagBean> list) {
|
||||||
|
super(fm);
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Fragment getItem(int position) {
|
||||||
|
MyBagBean model = list.get(position);
|
||||||
|
if ("1".equals(model.getMyBagType())){
|
||||||
|
return CircleCategoryFragment.newInstance();
|
||||||
|
}else {
|
||||||
|
return ExpandColumnFragment.newInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public CharSequence getPageTitle(int position) {
|
||||||
|
MyBagBean model = list.get(position);
|
||||||
|
return model.getMyBagTitle();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.example.modulecircle.fragment;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
|
import com.example.modulecircle.R;
|
||||||
|
import com.example.modulecircle.contacts.CircleContacts;
|
||||||
|
import com.example.modulecircle.databinding.FragmentCircleBinding;
|
||||||
|
import com.example.modulecircle.databinding.FragmentExpandColumnBinding;
|
||||||
|
import com.example.modulecircle.presenter.CirclePresenter;
|
||||||
|
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||||
|
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||||
|
import com.qxcm.moduleutil.bean.HeatedBean;
|
||||||
|
|
||||||
|
import org.angmarch.views.NiceSpinner;
|
||||||
|
import org.angmarch.views.OnSpinnerItemSelectedListener;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@author qx
|
||||||
|
*@data 2025/5/28
|
||||||
|
*@description: 动态中的扩列fragemnt
|
||||||
|
*/
|
||||||
|
public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, FragmentExpandColumnBinding> implements CircleContacts.View {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected CirclePresenter bindPresenter() {
|
||||||
|
return new CirclePresenter(this,getActivity());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ExpandColumnFragment newInstance() {
|
||||||
|
return new ExpandColumnFragment();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void initData() {
|
||||||
|
|
||||||
|
List<String> dataset = new LinkedList<>(Arrays.asList("只看女生", "只看男生", "查看全部"));
|
||||||
|
mBinding.niceSpinner.attachDataSource(dataset);
|
||||||
|
mBinding.niceSpinner.setOnSpinnerItemSelectedListener(new OnSpinnerItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(NiceSpinner parent, View view, int position, long id) {
|
||||||
|
// 示例使用的是 String 类型,但你的数据类型可以是任意的
|
||||||
|
String item = (String) parent.getItemAtPosition(position);
|
||||||
|
LogUtils.e("@@@",item);
|
||||||
|
mBinding.niceSpinner.setText(item);
|
||||||
|
// mBinding.niceSpinner.getItemAtPosition(position);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mBinding.niceSpinner.setText("只看女生");
|
||||||
|
mBinding.niceSpinner.setBackground(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.fragment_expand_column;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCategories(List<HeatedBean> list) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCircleList(List<CircleListBean> list) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.example.modulecircle.presenter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.example.modulecircle.contacts.ReleaseContract;
|
||||||
|
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||||
|
|
||||||
|
public class ReleasePresenter extends BasePresenter<ReleaseContract.View> implements ReleaseContract.IIndexPre {
|
||||||
|
public ReleasePresenter(ReleaseContract.View view, Context context) {
|
||||||
|
super(view, context);
|
||||||
|
}
|
||||||
|
}
|
||||||
115
modulecircle/src/main/res/layout/activity_release.xml
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?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.ReleaseActivity">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_FFF8F8F8">
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||||
|
android:id="@+id/top_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_1"
|
||||||
|
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"
|
||||||
|
android:background="@drawable/bg_r16_ffeff2f8"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/top_bar">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_ht"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_9"
|
||||||
|
android:layout_marginBottom="@dimen/dp_9"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="选择话题"
|
||||||
|
android:textColor="@color/color_FF333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_16"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:src="@mipmap/up_t" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_180"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/rl_1"
|
||||||
|
android:background="@drawable/bg_r10_white">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_g"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_7"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:gravity="left|top"
|
||||||
|
android:hint="此刻想和大家分享点什么"
|
||||||
|
android:maxLength="1200"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textColorHint="@color/color_FF999999"
|
||||||
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sz"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:gravity="bottom"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:layout_marginBottom="@dimen/dp_12"
|
||||||
|
android:text="0/1200"
|
||||||
|
android:textColor="@color/color_FF666666"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_photo_wall"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/rl_2"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_42"
|
||||||
|
android:background="@drawable/cs"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/rv_photo_wall"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_38"
|
||||||
|
android:layout_marginEnd="@dimen/dp_38"
|
||||||
|
android:text="立即发布"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/color_FF333333"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?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:orientation="vertical"
|
||||||
|
android:background="@drawable/bg_r16_tb_ffffff"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:text="请选择选项"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_options"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="end"
|
||||||
|
android:layout_marginTop="16dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_cancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:text="取消"
|
||||||
|
android:backgroundTint="#E0E0E0"
|
||||||
|
android:textColor="#000"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_confirm"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:text="确认"
|
||||||
|
android:backgroundTint="#2196F3"
|
||||||
|
android:textColor="#FFF"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -19,22 +19,31 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||||
|
android:id="@+id/tab_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/circle_title"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
android:textColor="@color/color_black"
|
app:tl_indicator_corner_radius="@dimen/dp_3"
|
||||||
android:textSize="@dimen/sp_25"
|
app:tl_indicator_drawable="@drawable/index_bg_indicator"
|
||||||
android:textStyle="normal"
|
app:tl_indicator_height="@dimen/dp_6"
|
||||||
android:layout_marginLeft="@dimen/dp_15"/>
|
app:tl_indicator_margin_bottom="@dimen/dp_3"
|
||||||
|
app:tl_indicator_width="@dimen/dp_28"
|
||||||
|
app:tl_showCateIndicator="false"
|
||||||
|
app:tl_tab_width="@dimen/dp_50"
|
||||||
|
app:tl_textBold="SELECT"
|
||||||
|
app:tl_textSelectColor="@color/color_2B2823"
|
||||||
|
app:tl_textSelectedSize="@dimen/sp_16"
|
||||||
|
app:tl_textUnselectColor="@color/color_FF999999"
|
||||||
|
app:tl_textsize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_room2"
|
android:id="@+id/iv_release"
|
||||||
android:layout_width="@dimen/dp_24"
|
android:layout_width="@dimen/dp_24"
|
||||||
android:layout_height="@dimen/dp_24"
|
android:layout_height="@dimen/dp_24"
|
||||||
android:src="@mipmap/notifi"
|
android:src="@mipmap/release_n"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginRight="@dimen/dp_11"/>
|
android:layout_marginRight="@dimen/dp_11"/>
|
||||||
|
|||||||
52
modulecircle/src/main/res/layout/fragment_expand_column.xml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
tools:context=".fragment.ExpandColumnFragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingStart="@dimen/dp_16"
|
||||||
|
android:paddingTop="@dimen/dp_12"
|
||||||
|
android:paddingBottom="@dimen/dp_16"
|
||||||
|
android:paddingEnd="@dimen/dp_16"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_24"
|
||||||
|
android:textColor="@color/color_FF333333"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:text="扩列交友" />
|
||||||
|
|
||||||
|
<org.angmarch.views.NiceSpinner
|
||||||
|
android:id="@+id/nice_spinner"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
app:arrowDrawable="@mipmap/up_x"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingBottom="@dimen/dp_12"
|
||||||
|
android:paddingTop="@dimen/dp_12"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
143
modulecircle/src/main/res/layout/item_expand_column.xml
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_r16_fff"
|
||||||
|
android:layout_marginBottom="@dimen/dp_12"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="15sp"
|
||||||
|
android:paddingBottom="@dimen/dp_10"
|
||||||
|
android:paddingTop="@dimen/dp_10"
|
||||||
|
android:paddingRight="15sp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.CircularImage
|
||||||
|
android:id="@+id/dy_head_image"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp" />
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:src="@mipmap/shequ_dongtai_gengduo" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
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" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
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:textColor="#999999"
|
||||||
|
android:textSize="11sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/gensui"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@mipmap/no_follow"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/diandian"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_14"
|
||||||
|
android:background="@mipmap/shequ_dongtai_gengduo"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/aaa"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.MyGridView
|
||||||
|
android:id="@+id/dy_image_recyc"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:numColumns="3"
|
||||||
|
android:scrollbars="none"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
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" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
24
modulecircle/src/main/res/layout/item_multi_select.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?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:orientation="horizontal"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/cb_option"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:focusable="false"
|
||||||
|
android:clickable="false"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_option"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="#333"
|
||||||
|
android:paddingStart="16dp"/>
|
||||||
|
</LinearLayout>
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
<!-- TODO: Remove or change this placeholder text -->
|
||||||
|
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -24,14 +24,14 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_11
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
dataBinding {
|
dataBinding {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = '11'
|
jvmTarget = '17'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,6 +44,7 @@ dependencies {
|
|||||||
implementation project(':modulevoice')
|
implementation project(':modulevoice')
|
||||||
implementation project(':modulecircle')
|
implementation project(':modulecircle')
|
||||||
implementation project(':modulevocal')
|
implementation project(':modulevocal')
|
||||||
|
implementation project(':modulenews')
|
||||||
|
|
||||||
testImplementation libs.junit
|
testImplementation libs.junit
|
||||||
androidTestImplementation libs.ext.junit
|
androidTestImplementation libs.ext.junit
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.QxLive">
|
>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.MainActivity"
|
android:name=".activity.MainActivity"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import androidx.fragment.app.Fragment;
|
|||||||
import com.blankj.utilcode.util.ActivityUtils;
|
import com.blankj.utilcode.util.ActivityUtils;
|
||||||
import com.blankj.utilcode.util.FragmentUtils;
|
import com.blankj.utilcode.util.FragmentUtils;
|
||||||
import com.example.modulecircle.fragment.CircleFragment;
|
import com.example.modulecircle.fragment.CircleFragment;
|
||||||
|
import com.example.modulenews.fragment.NewsFragment;
|
||||||
import com.example.modulevocal.fragment.VocalRangeFragment;
|
import com.example.modulevocal.fragment.VocalRangeFragment;
|
||||||
import com.example.modulevoice.fragment.VoiceFragment;
|
import com.example.modulevoice.fragment.VoiceFragment;
|
||||||
import com.qxcm.modulemain.R;
|
import com.qxcm.modulemain.R;
|
||||||
@@ -51,26 +52,22 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
fragments = new Fragment[]{
|
fragments = new Fragment[]{
|
||||||
VoiceFragment.newInstance(), // 声播
|
VoiceFragment.newInstance(), // 声播
|
||||||
CircleFragment.newInstance(), // 语圈
|
CircleFragment.newInstance(), // 语圈
|
||||||
VoiceFragment.newInstance(),
|
NewsFragment.newInstance(), //消息
|
||||||
VocalRangeFragment.newInstance()
|
VocalRangeFragment.newInstance() // 我的
|
||||||
// TrendFindFragment.newInstance(), // 动态
|
|
||||||
// IndexFragment.newInstance(), // 派对
|
|
||||||
// NewsFragment.newInstance(), // 消息
|
|
||||||
// MeFragment.newInstance(), // 我的
|
|
||||||
};
|
};
|
||||||
FragmentUtils.add(getSupportFragmentManager(), fragments, R.id.frame_layout, 0);
|
FragmentUtils.add(getSupportFragmentManager(), fragments, R.id.frame_layout, 0);
|
||||||
MvpPre.initData();
|
MvpPre.initData();
|
||||||
MvpPre.userFiles();
|
MvpPre.userFiles();
|
||||||
|
// 每11秒执行一次飘屏消息
|
||||||
// boolean isFirst = SPUtil.getBooleanDefultFalse(Constant.Channel.ISFIRST);
|
// new android.os.Handler().postDelayed(new Runnable() {
|
||||||
// if (!isFirst) {
|
// @Override
|
||||||
// MvpPre.randomHotRoom();
|
// public void run() {
|
||||||
// SPUtil.saveboolean(Constant.Channel.ISFIRST, true);
|
showPiaoPingMessage("这是一个飘屏消息", 10000); // 5秒飘过
|
||||||
|
// 通过递归调用实现循环定时
|
||||||
|
// new android.os.Handler().postDelayed(this, 1000);
|
||||||
// }
|
// }
|
||||||
// if (!TextUtils.isEmpty(giftBagUrl)) {
|
// }, 1000);
|
||||||
// new NewUserGiftDialog(this, giftBagUrl).show();
|
//
|
||||||
// }
|
|
||||||
// MvpPre.delayPreloadImage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="main_tab1">声播</string>
|
<string name="main_tab1">首页</string>
|
||||||
<string name="main_tab2">语圈</string>
|
<string name="main_tab2">广场</string>
|
||||||
<string name="main_tab3">音信</string>
|
<string name="main_tab3">消息</string>
|
||||||
<string name="main_tab4">音域</string>
|
<string name="main_tab4">我的</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="main_tab1">声播</string>
|
<string name="main_tab1">首页</string>
|
||||||
<string name="main_tab2">语圈</string>
|
<string name="main_tab2">广场</string>
|
||||||
<string name="main_tab3">音信</string>
|
<string name="main_tab3">消息</string>
|
||||||
<string name="main_tab4">音域</string>
|
<string name="main_tab4">我的</string>
|
||||||
</resources>
|
</resources>
|
||||||
1
modulenews/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
45
modulenews/build.gradle
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.library)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'com.example.modulenews'
|
||||||
|
compileSdk 35
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk 24
|
||||||
|
targetSdk 35
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
dataBinding {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation libs.appcompat
|
||||||
|
implementation libs.material
|
||||||
|
testImplementation libs.junit
|
||||||
|
androidTestImplementation libs.ext.junit
|
||||||
|
androidTestImplementation libs.espresso.core
|
||||||
|
|
||||||
|
implementation project(':moduleUtil')
|
||||||
|
api project(':tuiconversation')
|
||||||
|
api project(':tuichat')
|
||||||
|
}
|
||||||
21
modulenews/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.example.modulenews;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
public void useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||||
|
assertEquals("com.example.modulenews", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
||||||
11
modulenews/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.QxLive" />
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.example.modulenews.adapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.lifecycle.Lifecycle;
|
||||||
|
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class FragmentAdapter extends FragmentStateAdapter {
|
||||||
|
private static final String TAG = FragmentAdapter.class.getSimpleName();
|
||||||
|
private List<Fragment> fragmentList;
|
||||||
|
public FragmentAdapter(@NonNull FragmentActivity fragmentActivity) {
|
||||||
|
super(fragmentActivity);
|
||||||
|
}
|
||||||
|
public FragmentAdapter(@NonNull Fragment fragment) {
|
||||||
|
super(fragment);
|
||||||
|
}
|
||||||
|
public FragmentAdapter(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle) {
|
||||||
|
super(fragmentManager, lifecycle);
|
||||||
|
}
|
||||||
|
public void setFragmentList(List<Fragment> fragmentList) {
|
||||||
|
this.fragmentList = fragmentList;
|
||||||
|
}
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Fragment createFragment(int position) {
|
||||||
|
if (fragmentList == null || fragmentList.size() <= position) {
|
||||||
|
return new Fragment();
|
||||||
|
}
|
||||||
|
return fragmentList.get(position);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return fragmentList == null ? 0 : fragmentList.size();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.example.modulenews.contacts;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
|
||||||
|
import com.qxcm.moduleutil.activity.IPresenter;
|
||||||
|
import com.qxcm.moduleutil.activity.IView;
|
||||||
|
|
||||||
|
public class NewsContacts {
|
||||||
|
public interface View extends IView<Activity> {
|
||||||
|
|
||||||
|
}
|
||||||
|
public interface IHomePre extends IPresenter {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package com.example.modulenews.fragment;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import com.example.modulenews.R;
|
||||||
|
import com.example.modulenews.adapter.FragmentAdapter;
|
||||||
|
import com.example.modulenews.contacts.NewsContacts;
|
||||||
|
import com.example.modulenews.databinding.FragmentNewsBinding;
|
||||||
|
import com.example.modulenews.presenter.NewsPresenter;
|
||||||
|
import com.qxcm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||||
|
import com.qxcm.moduleutil.base.BaseMvpFragment;
|
||||||
|
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||||
|
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||||
|
import com.tencent.qcloud.tuicore.TUICore;
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.bean.C2CChatInfo;
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.bean.GroupChatInfo;
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatFragment;
|
||||||
|
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIGroupChatFragment;
|
||||||
|
import com.tencent.qcloud.tuikit.tuiconversation.classicui.page.TUIConversationFragment;
|
||||||
|
import com.tencent.qcloud.tuikit.tuiconversation.classicui.page.TUIConversationFragmentContainer;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*@author qx
|
||||||
|
*@data 2025/5/26
|
||||||
|
*@description: 音域
|
||||||
|
*/
|
||||||
|
public class NewsFragment extends BaseMvpFragment<NewsPresenter, FragmentNewsBinding> implements NewsContacts.View {
|
||||||
|
|
||||||
|
public static NewsFragment newInstance () {
|
||||||
|
return new NewsFragment();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initData () {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initView () {
|
||||||
|
|
||||||
|
List<Fragment> fragments = new ArrayList<>();
|
||||||
|
// 添加 tuiconversation 组件提供的经典版会话界面
|
||||||
|
fragments.add(new TUIConversationFragment());
|
||||||
|
|
||||||
|
// 添加 tuicontact 组件提供的经典版联系人界面
|
||||||
|
// fragments.add(new TUIContactFragment());
|
||||||
|
|
||||||
|
// FragmentAdapter fragmentAdapter = new FragmentAdapter(this);
|
||||||
|
// fragmentAdapter.setFragmentList(fragments);
|
||||||
|
// mBinding.viewPager.setOffscreenPageLimit(2);
|
||||||
|
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(fragments, getChildFragmentManager()));
|
||||||
|
mBinding.viewPager.setCurrentItem(0, false);
|
||||||
|
|
||||||
|
mBinding.ivRoom2.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent=new Intent(getActivity(), TUIC2CChatActivity.class);
|
||||||
|
intent.putExtra(TUIConstants.TUIChat.CHAT_ID, "10010");
|
||||||
|
intent.putExtra(TUIConstants.TUIChat.CHAT_TYPE, V2TIMConversation.V2TIM_C2C);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initListener () {
|
||||||
|
super.initListener();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId () {
|
||||||
|
return R.layout.fragment_news;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected NewsPresenter bindPresenter () {
|
||||||
|
return new NewsPresenter(this, getContext());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.example.modulenews.presenter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.example.modulenews.contacts.NewsContacts;
|
||||||
|
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||||
|
|
||||||
|
public class NewsPresenter extends BasePresenter<NewsContacts.View> implements NewsContacts.IHomePre {
|
||||||
|
public NewsPresenter(NewsContacts.View view, Context context) {
|
||||||
|
super(view, context);
|
||||||
|
}
|
||||||
|
}
|
||||||
170
modulenews/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
||||||
30
modulenews/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="85.84757"
|
||||||
|
android:endY="92.4963"
|
||||||
|
android:startX="42.9492"
|
||||||
|
android:startY="49.59793"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
||||||
56
modulenews/src/main/res/layout/fragment_news.xml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context=".fragment.NewsFragment">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_45"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
|
android:text="@string/news"
|
||||||
|
android:textColor="@color/color_black"
|
||||||
|
android:textSize="@dimen/sp_25"
|
||||||
|
android:textStyle="normal" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_room2"
|
||||||
|
android:layout_width="@dimen/dp_24"
|
||||||
|
android:layout_height="@dimen/dp_24"
|
||||||
|
android:src="@mipmap/notifi"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginRight="@dimen/dp_11"/>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.qxcm.moduleutil.widget.ScrollViewPager
|
||||||
|
android:id="@+id/view_pager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_60"
|
||||||
|
android:background="@color/color_transparent" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?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" />
|
||||||
|
</adaptive-icon>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?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" />
|
||||||
|
</adaptive-icon>
|
||||||
BIN
modulenews/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |