个性装扮展示完成

This commit is contained in:
2025-06-09 09:14:32 +08:00
parent c9f5c59ba8
commit 53ade75f84
25 changed files with 437 additions and 185 deletions

1
.idea/gradle.xml generated
View File

@@ -16,6 +16,7 @@
<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$/modulenews" />
<option value="$PROJECT_DIR$/moduleroom" />
<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" />

View File

@@ -88,6 +88,7 @@
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/> <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<queries> <queries>
<package android:name="com.tencent.mm" /> <package android:name="com.tencent.mm" />

View File

@@ -8,6 +8,7 @@ buildscript {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
jcenter() // 已废弃,仅限旧项目使用
gradlePluginPortal() gradlePluginPortal()
maven { url "https://maven.aliyun.com/repository/gradle-plugin" } maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
} }

View File

@@ -3,10 +3,15 @@ agp = "8.8.0"
alipayAlipaysdkAndroid = "15.8.33" alipayAlipaysdkAndroid = "15.8.33"
arouterApiVersion = "1.5.2" arouterApiVersion = "1.5.2"
comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5" comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5"
comLiulishuoOkdownloadOkdownload4 = "1.0.7"
comLiulishuoOkdownloadSqlite3 = "1.0.7"
comLiulishuoOkdownloadOkhttp3 = "1.0.7"
comLiulishuoOkdownloadFiledownloader3 = "1.0.7"
custompopwindow = "2.1.1" custompopwindow = "2.1.1"
databindingRuntimeVersion = "7.0.2" databindingRuntimeVersion = "7.0.2"
easypermissions = "3.0.0" easypermissions = "3.0.0"
easyProtectorRelease = "1.1.2" easyProtectorRelease = "1.1.2"
egameAnimplayer = "2.0.8"
flexboxVersion = "1.0.0" flexboxVersion = "1.0.0"
githubBannerviewpagerVersion = "3.5.12" githubBannerviewpagerVersion = "3.5.12"
githubGlide = "4.12.0" githubGlide = "4.12.0"
@@ -62,6 +67,7 @@ kotlinVersion = "1.9.24"
coreKtx = "1.10.1" coreKtx = "1.10.1"
lifecycleLivedataKtx = "2.6.1" lifecycleLivedataKtx = "2.6.1"
lifecycleViewmodelKtx = "2.6.1" lifecycleViewmodelKtx = "2.6.1"
webpdecoder = "1.6.4.9.0"
wechatSdkAndroid = "6.8.30" wechatSdkAndroid = "6.8.30"
xbanner = "1.7.0" xbanner = "1.7.0"
@@ -74,11 +80,16 @@ com-github-bumptech-glide-glide = { module = "com.github.bumptech.glide:glide",
com-github-mmin18-realtimeblurview = { module = "com.github.mmin18:realtimeblurview", version.ref = "githubRealtimeblurviewVersion" } com-github-mmin18-realtimeblurview = { module = "com.github.mmin18:realtimeblurview", version.ref = "githubRealtimeblurviewVersion" }
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" } com-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" }
com-liulishuo-okdownload-filedownloader4 = { module = "com.liulishuo.okdownload:filedownloader", version.ref = "comLiulishuoOkdownloadFiledownloader3" }
com-liulishuo-okdownload-okhttp4 = { module = "com.liulishuo.okdownload:okhttp", version.ref = "comLiulishuoOkdownloadOkhttp3" }
com-liulishuo-okdownload-sqlite4 = { module = "com.liulishuo.okdownload:sqlite", version.ref = "comLiulishuoOkdownloadSqlite3" }
com-liulishuo-okdownload-okdownload6 = { module = "com.liulishuo.okdownload:okdownload", version.ref = "comLiulishuoOkdownloadOkdownload4" }
custompopwindow = { module = "com.github.pinguo-zhouwei:CustomPopwindow", version.ref = "custompopwindow" } custompopwindow = { module = "com.github.pinguo-zhouwei:CustomPopwindow", version.ref = "custompopwindow" }
databinding-runtime-v702 = { module = "androidx.databinding:databinding-runtime", version.ref = "databindingRuntimeVersion" } databinding-runtime-v702 = { module = "androidx.databinding:databinding-runtime", version.ref = "databindingRuntimeVersion" }
dpa-oss-android-sdk = { module = "com.aliyun.dpa:oss-android-sdk", version.ref = "ossAndroidSdkVersion" } dpa-oss-android-sdk = { module = "com.aliyun.dpa:oss-android-sdk", version.ref = "ossAndroidSdkVersion" }
easy-protector-release = { module = "com.lahm.library:easy-protector-release", version.ref = "easyProtectorRelease" } easy-protector-release = { module = "com.lahm.library:easy-protector-release", version.ref = "easyProtectorRelease" }
easypermissions = { module = "pub.devrel:easypermissions", version.ref = "easypermissions" } easypermissions = { module = "pub.devrel:easypermissions", version.ref = "easypermissions" }
egame-animplayer = { module = "com.egame.vap:animplayer", version.ref = "egameAnimplayer" }
github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "githubPhotoview" } github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "githubPhotoview" }
github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" } github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" }
glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "githubGlide" } glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "githubGlide" }
@@ -133,6 +144,7 @@ material3 = { group = "androidx.compose.material3", name = "material3" }
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" } lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" } lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
webpdecoder = { module = "com.zlc.glide:webpdecoder", version.ref = "webpdecoder" }
wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdkAndroid" } wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdkAndroid" }
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" } xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" } zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }

View File

@@ -141,6 +141,17 @@ dependencies {
api(libs.zcw.togglebutton.library) api(libs.zcw.togglebutton.library)
//图片模糊 //图片模糊
api(libs.com.github.mmin18.realtimeblurview) api(libs.com.github.mmin18.realtimeblurview)
//播放器
//腾讯直播sdk
api('com.tencent.liteav:LiteAVSDK_Professional:10.9.0.13102')
api('com.google.android.exoplayer:exoplayer-core:2.19.1')
api('com.google.android.exoplayer:exoplayer-ui:2.19.1')
api("com.egame.vap:animplayer:2.0.8")
api("com.liulishuo.okdownload:okdownload:1.0.7")
// SVGA player
// api('com.github.yyued:SVGAPlayer-Android:2.6.1')
// OpenGL ES
// api('androidx.opengl:opengl:1.3.0')
//腾讯im //腾讯im
// api project(':tuiconversation') // api project(':tuiconversation')

View File

@@ -8,13 +8,17 @@ import lombok.Data;
*/ */
@Data @Data
public class ZhuangBanShangChengBean { public class ZhuangBanShangChengBean {
private String udid;
private int did = 0; private String user_id;
private String title = ""; private String is_using;
private String type = ""; private String end_time;
private String integral = ""; private String is_perpetual;
private int period = 0; private String special_num ;//靓号
private String base_image = ""; private String title ;//装扮名称
private String type ;//类型,顶部的头部选择
private String remaining_day ;//价格
private String base_image ;//显示图片
private String play_image;//播放图像
private boolean is_select = false; private boolean is_select = false;
public boolean isIs_select() { public boolean isIs_select() {

View File

@@ -8,12 +8,14 @@ import com.qxcm.moduleutil.bean.ExpandColumnBean;
import com.qxcm.moduleutil.bean.GiftLabelBean; import com.qxcm.moduleutil.bean.GiftLabelBean;
import com.qxcm.moduleutil.bean.HeatedBean; import com.qxcm.moduleutil.bean.HeatedBean;
import com.qxcm.moduleutil.bean.NewsDataBean; import com.qxcm.moduleutil.bean.NewsDataBean;
import com.qxcm.moduleutil.bean.PersonaltyBean;
import com.qxcm.moduleutil.bean.RealNameBean; import com.qxcm.moduleutil.bean.RealNameBean;
import com.qxcm.moduleutil.bean.RewardUserBean; import com.qxcm.moduleutil.bean.RewardUserBean;
import com.qxcm.moduleutil.bean.RoonGiftModel; import com.qxcm.moduleutil.bean.RoonGiftModel;
import com.qxcm.moduleutil.bean.UserBean; import com.qxcm.moduleutil.bean.UserBean;
import com.qxcm.moduleutil.bean.UserInfo; import com.qxcm.moduleutil.bean.UserInfo;
import com.qxcm.moduleutil.bean.UserTagBean; import com.qxcm.moduleutil.bean.UserTagBean;
import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
import com.qxcm.moduleutil.widget.Constants; import com.qxcm.moduleutil.widget.Constants;
import java.util.List; import java.util.List;
@@ -193,10 +195,20 @@ public interface ApiServer {
@POST(Constants.GET_ALBUM_DETAIL) @POST(Constants.GET_ALBUM_DETAIL)
Observable<BaseModel<AlbumBean>> getAlbumDetail(@Field("album_id") String albumId, @Field("pwd") String pwd, @Field("page") String page, @Field("page_limit") String page_limit); Observable<BaseModel<AlbumBean>> getAlbumDetail(@Field("album_id") String albumId, @Field("pwd") String pwd, @Field("page") String page, @Field("page_limit") String page_limit);
@GET(Constants.GET_PERSONALTY)
Observable<BaseModel<List<PersonaltyBean>>> getPersonaltyList();
@FormUrlEncoded @FormUrlEncoded
@POST(Constants.POST_GZ) @POST(Constants.POST_GZ)
Call<BaseModel<String>> userGuanz(@Field("user_id") String userId,@Field("type")String type); Call<BaseModel<String>> userGuanz(@Field("user_id") String userId,@Field("type")String type);
@GET(Constants.GET_DECORATE)
Observable<BaseModel<List<ZhuangBanShangChengBean>>> getDecorateList(@Query("type") String type);
@FormUrlEncoded
@POST(Constants.SET_USER_DECORATE)
Call<BaseModel<String>> setUserDecorate(@Field("udid") String udid);
@FormUrlEncoded @FormUrlEncoded
@POST(Constants.UP_ALBUM) @POST(Constants.UP_ALBUM)
Call<BaseModel<String>> upAddAlbum(@Field("album_id") String album_id, @Field("images") String images, @Field("content") String content); Call<BaseModel<String>> upAddAlbum(@Field("album_id") String album_id, @Field("images") String images, @Field("content") String content);

View File

@@ -19,12 +19,14 @@ import com.qxcm.moduleutil.bean.ExpandColumnBean;
import com.qxcm.moduleutil.bean.GiftLabelBean; import com.qxcm.moduleutil.bean.GiftLabelBean;
import com.qxcm.moduleutil.bean.HeatedBean; import com.qxcm.moduleutil.bean.HeatedBean;
import com.qxcm.moduleutil.bean.NewsDataBean; import com.qxcm.moduleutil.bean.NewsDataBean;
import com.qxcm.moduleutil.bean.PersonaltyBean;
import com.qxcm.moduleutil.bean.RealNameBean; import com.qxcm.moduleutil.bean.RealNameBean;
import com.qxcm.moduleutil.bean.RewardUserBean; import com.qxcm.moduleutil.bean.RewardUserBean;
import com.qxcm.moduleutil.bean.RoonGiftModel; import com.qxcm.moduleutil.bean.RoonGiftModel;
import com.qxcm.moduleutil.bean.UserBean; import com.qxcm.moduleutil.bean.UserBean;
import com.qxcm.moduleutil.bean.UserInfo; import com.qxcm.moduleutil.bean.UserInfo;
import com.qxcm.moduleutil.bean.UserTagBean; import com.qxcm.moduleutil.bean.UserTagBean;
import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
import com.qxcm.moduleutil.utils.SpUtil; import com.qxcm.moduleutil.utils.SpUtil;
import com.qxcm.moduleutil.utils.SystemUtils; import com.qxcm.moduleutil.utils.SystemUtils;
import com.qxcm.moduleutil.utils.logger.DataLogger; import com.qxcm.moduleutil.utils.logger.DataLogger;
@@ -292,6 +294,26 @@ public class RetrofitClient {
sApiServer.getAlbumDetail(albumId,pwd,page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer); sApiServer.getAlbumDetail(albumId,pwd,page,page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
} }
public void getPersonaltyList(BaseObserver<List<PersonaltyBean>> observer){
sApiServer.getPersonaltyList().compose(new DefaultTransformer<>()).subscribe(observer);
}
public void getDecorateList(String type,BaseObserver<List<ZhuangBanShangChengBean>> observer){
sApiServer.getDecorateList(type).compose(new DefaultTransformer<>()).subscribe(observer);
}
public void setUserDecorate(String decorateId,BaseObserver<String> observer){
sApiServer.setUserDecorate(decorateId).enqueue(new Callback<BaseModel<String>>() {
@Override
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
onNextRetu(response,observer);
}
@Override
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
}
});
}
public void publishZone(String images, String content, String topic_id, String room_id,String ip,BaseObserver<String> observer){ public void publishZone(String images, String content, String topic_id, String room_id,String ip,BaseObserver<String> observer){
sApiServer.publishZone(images,content,topic_id,room_id,ip).enqueue(new Callback<BaseModel<String>>() { sApiServer.publishZone(images,content,topic_id,room_id,ip).enqueue(new Callback<BaseModel<String>>() {

View File

@@ -400,6 +400,9 @@ public class Constants {
public static final String DELETE_ALBUM_IMAGE = "/api/User/delete_album_images";//删除图片 public static final String DELETE_ALBUM_IMAGE = "/api/User/delete_album_images";//删除图片
public static final String DELETE_ALBUM = "/api/User/delete_album";//删除相册 public static final String DELETE_ALBUM = "/api/User/delete_album";//删除相册
public static final String LIKE_ALBUM = "/api/User/like_album";//相册点赞 public static final String LIKE_ALBUM = "/api/User/like_album";//相册点赞
public static final String GET_PERSONALTY = "/api/Decorate/get_type_list";//装扮类型列表
public static final String GET_DECORATE = "/api/Decorate/user_decorate";//装扮详情
public static final String SET_USER_DECORATE = "/api/Decorate/set_user_decorate";//用户装扮
} }

View File

@@ -13,6 +13,7 @@
<color name="colorPrimaryDark">#FFFFBB00</color> <color name="colorPrimaryDark">#FFFFBB00</color>
<color name="colorAccent">#FFFFBB00</color> <color name="colorAccent">#FFFFBB00</color>
<color name="color_666666">#666666</color> <color name="color_666666">#666666</color>
<color name="color_FFBB53FF">#FFBB53FF</color>
<color name="color_text">#333333</color> <color name="color_text">#333333</color>
<color name="color_white">#ffffff</color> <color name="color_white">#ffffff</color>
<color name="transparent">#00000000</color> <color name="transparent">#00000000</color>

View File

@@ -33,6 +33,7 @@ import androidx.core.view.WindowInsetsCompat;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.blankj.utilcode.util.TimeUtils; import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.example.modulecircle.R; import com.example.modulecircle.R;
@@ -100,7 +101,9 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
@Override @Override
public void onHeadImageClick(CircleListBean item) { public void onHeadImageClick(CircleListBean item) {
Toast.makeText(getApplicationContext(), "查看主页:" + item.getNickname(), Toast.LENGTH_SHORT).show(); // Toast.makeText(getApplicationContext(), "查看主页:" + item.getNickname(), Toast.LENGTH_SHORT).show();
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", item.getUser_id() + "").navigation();
} }
@Override @Override

View File

@@ -72,13 +72,12 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
cirleCategoryBannerAdapter = new CirleCategoryBannerAdapter(); cirleCategoryBannerAdapter = new CirleCategoryBannerAdapter();
mBinding.bannerViewPager mBinding.bannerViewPager
.setPageMargin(1) .setPageMargin(1)
.setScrollDuration(800) .setScrollDuration(5000)
.setRevealWidth(0, 0) .setRevealWidth(0, 0)
.setIndicatorVisibility(View.VISIBLE) .setIndicatorVisibility(View.VISIBLE)
.setIndicatorView(getVectorDrawableIndicator()) .setIndicatorView(getVectorDrawableIndicator())
.setIndicatorSlideMode(IndicatorSlideMode.NORMAL) .setIndicatorSlideMode(IndicatorSlideMode.NORMAL)
.setAdapter(cirleCategoryBannerAdapter) .setAdapter(cirleCategoryBannerAdapter)
.create(); .create();
mBinding.constraintLayout.setVisibility(View.GONE); mBinding.constraintLayout.setVisibility(View.GONE);

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@@ -56,7 +56,7 @@ public class CustomSlidingTabLayout extends HorizontalScrollView implements View
*/ */
private Rect mTabRect = new Rect(); private Rect mTabRect = new Rect();
// private GradientDrawable mIndicatorDrawable = new GradientDrawable(); // private GradientDrawable mIndicatorDrawable = new GradientDrawable();
private GradientDrawable mIndicatorDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[]{Color.parseColor("#FFBB53FF"), Color.parseColor("#FF514FFF")}); private GradientDrawable mIndicatorDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[]{Color.parseColor("#45D08C"), Color.parseColor("#45D08C")});
private Paint mRectPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private Paint mRectPaint = new Paint(Paint.ANTI_ALIAS_FLAG);

View File

@@ -1,5 +1,6 @@
package com.example.modulevocal.activity; package com.example.modulevocal.activity;
import android.content.Intent;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@@ -7,24 +8,39 @@ import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
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.modulevocal.R; import com.example.modulevocal.R;
import com.example.modulevocal.conacts.PersonalityConacts;
import com.example.modulevocal.databinding.ActivityPersonalityBinding; import com.example.modulevocal.databinding.ActivityPersonalityBinding;
import com.example.modulevocal.fragment.CirleListFragment;
import com.example.modulevocal.fragment.MyAlbumFragment;
import com.example.modulevocal.fragment.UserGiftWallFragment;
import com.example.modulevocal.fragment.UserHomepageFragment;
import com.example.modulevocal.fragment.zhuangb.ZhuangBanShangChengFragment; import com.example.modulevocal.fragment.zhuangb.ZhuangBanShangChengFragment;
import com.example.modulevocal.presenter.PersonalityPresenter;
import com.google.android.material.tabs.TabLayout; import com.google.android.material.tabs.TabLayout;
import com.qxcm.moduleutil.activity.BaseAppCompatActivity; import com.qxcm.moduleutil.activity.BaseAppCompatActivity;
import com.qxcm.moduleutil.activity.BaseMvpActivity;
import com.qxcm.moduleutil.activity.WebViewActivity;
import com.qxcm.moduleutil.adapter.MyPagerAdapter; import com.qxcm.moduleutil.adapter.MyPagerAdapter;
import com.qxcm.moduleutil.bean.MyBagBean;
import com.qxcm.moduleutil.bean.PersonaltyBean;
import com.qxcm.moduleutil.utils.SpUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* @author qx * @author qx
* @data 2025/5/16 * @data 2025/5/16
* @description: 个性装扮 * @description: 个性装扮
*/ */
public class PersonalityActivity extends BaseAppCompatActivity<ActivityPersonalityBinding> { public class PersonalityActivity extends BaseMvpActivity<PersonalityPresenter, ActivityPersonalityBinding> implements PersonalityConacts.View {
private List<String> titleList = new ArrayList(); private List<String> titleList = new ArrayList();
private List<Fragment> mFragments = new ArrayList(); private List<Fragment> mFragments = new ArrayList();
@@ -32,81 +48,77 @@ public class PersonalityActivity extends BaseAppCompatActivity<ActivityPersonali
@Override @Override
protected void initData() { protected void initData() {
titleList.add("头像框"); if (MvpPre==null){
titleList.add("座驾"); MvpPre=bindPresenter();
titleList.add("气泡"); }
titleList.add("个人靓号"); MvpPre.getPersonaltyList();
titleList.add("房间靓号");
titleList.add("工会靓号");
mFragments.add(ZhuangBanShangChengFragment.newInstance(1));
mFragments.add(ZhuangBanShangChengFragment.newInstance(2));
mFragments.add(ZhuangBanShangChengFragment.newInstance(3));
mFragments.add(ZhuangBanShangChengFragment.newInstance(4));
mFragments.add(ZhuangBanShangChengFragment.newInstance(5));
mFragments.add(ZhuangBanShangChengFragment.newInstance(6));
myAdapter = new MyPagerAdapter(getSupportFragmentManager(), mFragments, titleList); // titleList.add("头像框");
mBinding.viewPager.setAdapter(myAdapter); // titleList.add("座驾");
mBinding.viewPager.setOffscreenPageLimit(mFragments.size()); // titleList.add("气泡");
mBinding.tabLayout.setupWithViewPager(mBinding.viewPager); // titleList.add("个人靓号");
setCustomViews(); // titleList.add("房间靓号");
// titleList.add("工会靓号");
//
// mFragments.add(ZhuangBanShangChengFragment.newInstance(1));
// mFragments.add(ZhuangBanShangChengFragment.newInstance(2));
// mFragments.add(ZhuangBanShangChengFragment.newInstance(3));
// mFragments.add(ZhuangBanShangChengFragment.newInstance(4));
// mFragments.add(ZhuangBanShangChengFragment.newInstance(5));
// mFragments.add(ZhuangBanShangChengFragment.newInstance(6));
mBinding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { // myAdapter = new MyPagerAdapter(getSupportFragmentManager(), mFragments, titleList);
@Override // mBinding.viewPager.setAdapter(myAdapter);
public void onTabSelected(TabLayout.Tab tab) { // mBinding.viewPager.setOffscreenPageLimit(mFragments.size());
updateTabView(tab, true); // mBinding.tabLayout.setupWithViewPager(mBinding.viewPager);
} // setCustomViews();
@Override // mBinding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
public void onTabUnselected(TabLayout.Tab tab) { // @Override
updateTabView(tab, false); // public void onTabSelected(TabLayout.Tab tab) {
} // updateTabView(tab, true);
@Override
public void onTabReselected(TabLayout.Tab tab) {
// 可选实现
}
private void updateTabView(TabLayout.Tab tab, boolean isSelected) {
if (tab.getCustomView() == null) return;
TextView text = tab.getCustomView().findViewById(R.id.tv_zbtab);
ImageView vView = tab.getCustomView().findViewById(R.id.v_view);
if (text != null) {
if (isSelected) {
text.setTextColor(Color.parseColor("#333333"));
text.setTextSize(16f);
text.setTypeface(Typeface.DEFAULT_BOLD);
} else {
text.setTextColor(Color.parseColor("#5B5B5B"));
text.setTextSize(14f);
text.setTypeface(Typeface.DEFAULT);
}
}
if (vView != null) {
vView.setVisibility(isSelected ? View.VISIBLE : View.GONE);
}
}
});
// viewModel.loadUserInfo();
// try {
// Login userBean = UserManager.user;
// if (userBean != null) {
// mBinding.tvName.setText(userBean.nick_name);
// mBinding.tvId.setText(String.valueOf(userBean.uid));
// Glide.with(this)
// .load(userBean.head_pic)
// .error(R.mipmap.ic_launcher_app)
// .into(mDataBinding.ivUser);
// } // }
// } catch (Exception e) { //
// e.printStackTrace(); // @Override
// } // public void onTabUnselected(TabLayout.Tab tab) {
// updateTabView(tab, false);
// }
//
// @Override
// public void onTabReselected(TabLayout.Tab tab) {
// // 可选实现
// }
//
// private void updateTabView(TabLayout.Tab tab, boolean isSelected) {
// if (tab.getCustomView() == null) return;
//
// TextView text = tab.getCustomView().findViewById(R.id.tv_zbtab);
// ImageView vView = tab.getCustomView().findViewById(R.id.v_view);
//
// if (text != null) {
// if (isSelected) {
// text.setTextColor(Color.parseColor("#333333"));
// text.setTextSize(16f);
// text.setTypeface(Typeface.DEFAULT_BOLD);
// } else {
// text.setTextColor(Color.parseColor("#5B5B5B"));
// text.setTextSize(14f);
// text.setTypeface(Typeface.DEFAULT);
// }
// }
//
// if (vView != null) {
// vView.setVisibility(isSelected ? View.VISIBLE : View.GONE);
// }
// }
// });
}
@Override
protected PersonalityPresenter bindPresenter() {
return new PersonalityPresenter(this, this);
} }
@Override @Override
@@ -114,6 +126,12 @@ public class PersonalityActivity extends BaseAppCompatActivity<ActivityPersonali
mBinding.topBar.setRightTxtVisible(true); mBinding.topBar.setRightTxtVisible(true);
mBinding.topBar.setRightText(getResources().getString(com.qxcm.moduleutil.R.string.shopping)); mBinding.topBar.setRightText(getResources().getString(com.qxcm.moduleutil.R.string.shopping));
mBinding.topBar.setRightColor(Color.parseColor("#FF8ACC")); mBinding.topBar.setRightColor(Color.parseColor("#FF8ACC"));
mBinding.topBar.getTvRight().setOnClickListener(v -> {
Intent intent=new Intent(this, WebViewActivity.class);
intent.putExtra("url", "http://vespa.qxmier.com/dist/build/web/index.html#/pages/union/propMall?id="+ SpUtil.getToken());
intent.putExtra("title", "道具商城");
startActivity(intent);
});
} }
@Override @Override
@@ -121,35 +139,80 @@ public class PersonalityActivity extends BaseAppCompatActivity<ActivityPersonali
return R.layout.activity_personality; return R.layout.activity_personality;
} }
private void setCustomViews() { // private void setCustomViews() {
int mSelectedTabPosition = mBinding.tabLayout.getSelectedTabPosition(); // int mSelectedTabPosition = mBinding.tabLayout.getSelectedTabPosition();
for (int i = 0; i < titleList.size(); i++) { // for (int i = 0; i < titleList.size(); i++) {
mBinding.tabLayout.getTabAt(i).setCustomView(getTabView(i, mSelectedTabPosition)); // Objects.requireNonNull(mBinding.tabLayout.getTabAt(i)).setCustomView(getTabView(i, mSelectedTabPosition));
// }
// }
// private View getTabView(int index, int mSelectedTabPosition) {
// // 自定义View布局
// View view = LayoutInflater.from(this).inflate(R.layout.item_tablayout_headerzb, null);
// TextView title = view.findViewById(R.id.tv_zbtab);
// ImageView v_view = view.findViewById(R.id.v_view);
// title.setText(titleList.get(index));
// title.setSelected(index == mSelectedTabPosition);
//// v_view.setSelected(index == mSelectedTabPosition);
// v_view.setVisibility(index == mSelectedTabPosition ? View.VISIBLE : View.GONE);
// if (index == mSelectedTabPosition) {
// title.setTextColor(Color.parseColor("#333333"));
// title.setTextSize(16f);
// title.setTypeface(Typeface.DEFAULT_BOLD);
// // title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 17f);
// // title.setTypeface(Typeface.DEFAULT_BOLD);
// } else {
// title.setTextColor(Color.parseColor("#5B5B5B"));
// title.setTextSize(14f);
// // title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15f);
// // title.setTypeface(Typeface.DEFAULT);
// }
//
// return view;
// }
@Override
public void getPersonaltyList(List<PersonaltyBean> personaltyBean) {
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getSupportFragmentManager(), personaltyBean));
// mBinding.viewPager.setOffscreenPageLimit(mFragments.size());
// mBinding.tabLayout.setupWithViewPager(mBinding.viewPager);
// setCustomViews();
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
mBinding.slidingTabLayout.setCurrentTab(0);
}
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
private List<PersonaltyBean> list;
private String userId;
public MyFragmentPagerAdapter(FragmentManager fm, List<PersonaltyBean> list) {
super(fm);
this.list = list;
this.userId = userId;
}
@Override
public Fragment getItem(int position) {
PersonaltyBean model = list.get(position);
return ZhuangBanShangChengFragment.newInstance(Integer.parseInt(model.getId()));
}
@Override
public int getCount() {
return list.size();
}
@Nullable
@Override
public CharSequence getPageTitle(int position) {
PersonaltyBean model = list.get(position);
return model.getName();
} }
} }
private View getTabView(int index, int mSelectedTabPosition) {
// 自定义View布局
View view = LayoutInflater.from(this).inflate(R.layout.item_tablayout_headerzb, null);
TextView title = view.findViewById(R.id.tv_zbtab);
ImageView v_view = view.findViewById(R.id.v_view);
title.setText(titleList.get(index));
title.setSelected(index == mSelectedTabPosition);
// v_view.setSelected(index == mSelectedTabPosition);
v_view.setVisibility(index == mSelectedTabPosition ? View.VISIBLE : View.GONE);
if (index == mSelectedTabPosition) {
title.setTextColor(Color.parseColor("#333333"));
title.setTextSize(16f);
title.setTypeface(Typeface.DEFAULT_BOLD);
// title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 17f);
// title.setTypeface(Typeface.DEFAULT_BOLD);
} else {
title.setTextColor(Color.parseColor("#5B5B5B"));
title.setTextSize(14f);
// title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15f);
// title.setTypeface(Typeface.DEFAULT);
}
return view;
}
} }

View File

@@ -69,7 +69,7 @@ public class AlbumPhotoAdapter extends BaseMultiItemQuickAdapter<AlbumBean.Image
boolean isSelected = !item.isSelected(); // 切换当前状态 boolean isSelected = !item.isSelected(); // 切换当前状态
item.setSelected(isSelected); item.setSelected(isSelected);
vCheckbox.setSelected(isSelected); vCheckbox.setSelected(isSelected);
notifyItemChanged(helper.getBindingAdapterPosition()); // 刷新整个列表确保状态正确 // notifyItemChanged(helper.getBindingAdapterPosition()); // 刷新整个列表确保状态正确
}); });
helper.getView(R.id.tb_photo).setOnClickListener(new View.OnClickListener() { helper.getView(R.id.tb_photo).setOnClickListener(new View.OnClickListener() {
@Override @Override
@@ -77,7 +77,7 @@ public class AlbumPhotoAdapter extends BaseMultiItemQuickAdapter<AlbumBean.Image
boolean isSelected = !item.isSelected(); boolean isSelected = !item.isSelected();
item.setSelected(isSelected); item.setSelected(isSelected);
vCheckbox.setSelected(isSelected); vCheckbox.setSelected(isSelected);
notifyItemChanged(helper.getBindingAdapterPosition()); // 刷新整个列表确保状态正确 // notifyItemChanged(helper.getBindingAdapterPosition()); // 刷新整个列表确保状态正确
} }
}); });

View File

@@ -154,6 +154,7 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
mBinding.tvMyWallet.setOnClickListener(this::onClick); mBinding.tvMyWallet.setOnClickListener(this::onClick);
mBinding.meDaily.setOnClickListener(this::onClick); mBinding.meDaily.setOnClickListener(this::onClick);
mBinding.meMyGuild.setOnClickListener(this::onClick); mBinding.meMyGuild.setOnClickListener(this::onClick);
mBinding.tvMyShopping.setOnClickListener(this::onClick);
} }
@@ -185,6 +186,11 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
intent.putExtra("url", "http://vespa.qxmier.com/dist/build/web/index.html?id="+SpUtil.getToken()); intent.putExtra("url", "http://vespa.qxmier.com/dist/build/web/index.html?id="+SpUtil.getToken());
intent.putExtra("title", "公会"); intent.putExtra("title", "公会");
startActivity(intent); startActivity(intent);
}else if (id==R.id.tv_my_shopping){
Intent intent=new Intent(getContext(), WebViewActivity.class);
intent.putExtra("url", "http://vespa.qxmier.com/dist/build/web/index.html#/pages/union/propMall?id="+SpUtil.getToken());
intent.putExtra("title", "道具商城");
startActivity(intent);
} }
// else if (id == R.id.me_my_union) { // else if (id == R.id.me_my_union) {
// if (ProxyCheckerT.isProxySet(getContext())){ // if (ProxyCheckerT.isProxySet(getContext())){

View File

@@ -15,7 +15,7 @@ public class MyBagAdapter extends BaseQuickAdapter<ZhuangBanShangChengBean, Base
@Override @Override
protected void convert(BaseViewHolder helper, ZhuangBanShangChengBean item) { protected void convert(BaseViewHolder helper, ZhuangBanShangChengBean item) {
ImageUtils.loadHeadCC(item.getBase_image(), helper.getView(R.id.iv_img)); ImageUtils.loadHeadCC(item.getBase_image(), helper.getView(R.id.iv_img));
helper.setText(R.id.integral, item.getIntegral()) helper.setText(R.id.integral, item.getRemaining_day())
.setText(R.id.tv_name_period, item.getTitle()); .setText(R.id.tv_name_period, item.getTitle());
} }
} }

View File

@@ -33,16 +33,16 @@ public class MyBagFragment extends BaseMvpFragment<MyBagPresenter, FragmentMyBag
@Override @Override
protected void initData() { protected void initData() {
zhuangBanShangChengBeanList=new ArrayList<>(); // zhuangBanShangChengBeanList=new ArrayList<>();
for (int i = 0; i < 6; i++) { // for (int i = 0; i < 6; i++) {
ZhuangBanShangChengBean zhuangBanShangChengBean=new ZhuangBanShangChengBean(); // ZhuangBanShangChengBean zhuangBanShangChengBean=new ZhuangBanShangChengBean();
zhuangBanShangChengBean.setTitle("标题"+i); // zhuangBanShangChengBean.setTitle("标题"+i);
zhuangBanShangChengBean.setIntegral("积分"+i); // zhuangBanShangChengBean.setIntegral("积分"+i);
zhuangBanShangChengBean.setPeriod(i); // zhuangBanShangChengBean.setPeriod(i);
zhuangBanShangChengBean.setType("类型"+i); // zhuangBanShangChengBean.setType("类型"+i);
zhuangBanShangChengBean.setBase_image(""); // zhuangBanShangChengBean.setBase_image("");
zhuangBanShangChengBeanList.add(zhuangBanShangChengBean); // zhuangBanShangChengBeanList.add(zhuangBanShangChengBean);
} // }
mAdapter=new MyBagAdapter(); mAdapter=new MyBagAdapter();
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 3); GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 3);

View File

@@ -22,7 +22,7 @@ public class ZhuangBanShangChengAdapter extends BaseQuickAdapter<ZhuangBanShangC
helper.addOnClickListener(R.id.zb_bg_ll); helper.addOnClickListener(R.id.zb_bg_ll);
ImageUtils.loadHeadCC(item.getBase_image(), helper.getView(R.id.iv_img)); ImageUtils.loadHeadCC(item.getBase_image(), helper.getView(R.id.iv_img));
helper.setText(R.id.integral, item.getIntegral()) helper.setText(R.id.integral, item.getRemaining_day())
.setText(R.id.tv_name_period, item.getTitle()); .setText(R.id.tv_name_period, item.getTitle());
// .setText(R.id.tv_time, "(有效期${item.period}天)") // .setText(R.id.tv_time, "(有效期${item.period}天)")
if (item.isIs_select()) { if (item.isIs_select()) {

View File

@@ -4,14 +4,21 @@ import android.app.Activity;
import com.qxcm.moduleutil.activity.IPresenter; import com.qxcm.moduleutil.activity.IPresenter;
import com.qxcm.moduleutil.activity.IView; import com.qxcm.moduleutil.activity.IView;
import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
import java.util.List;
public class ZhuangBanShangChengConactos { public class ZhuangBanShangChengConactos {
public interface View extends IView<Activity> { public interface View extends IView<Activity> {
void getDecorateList(List<ZhuangBanShangChengBean> zhuangBanShangChengBeans);
void setUserDecorate();
} }
public interface ICreatedRoomPre extends IPresenter { public interface ICreatedRoomPre extends IPresenter {
void getDecorateList(String type);
void setUserDecorate(String udid);
} }
} }

View File

@@ -2,20 +2,21 @@ package com.example.modulevocal.fragment.zhuangb;
import static com.qxcm.moduleutil.utils.ImageLoader.loadImage; import static com.qxcm.moduleutil.utils.ImageLoader.loadImage;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.Toast;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import com.example.modulevocal.R; import com.example.modulevocal.R;
import com.example.modulevocal.databinding.ZhuangbanRecyclerviewNorefBinding; import com.example.modulevocal.databinding.ZhuangbanRecyclerviewNorefBinding;
import com.example.modulevocal.fragment.MyRoomListFragment; import com.example.modulevocal.fragment.MyRoomListFragment;
import com.example.modulevocal.presenter.MyRoomPresenter;
import com.opensource.svgaplayer.SVGAImageView;
import com.qxcm.moduleutil.base.BaseMvpFragment; import com.qxcm.moduleutil.base.BaseMvpFragment;
import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean; import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
import com.qxcm.moduleutil.widget.AvatarFrameView;
import com.tencent.qgame.animplayer.AnimView;
import java.util.ArrayList;
import java.util.List; import java.util.List;
public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangChengPresenter, ZhuangbanRecyclerviewNorefBinding> implements ZhuangBanShangChengConactos.View { public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangChengPresenter, ZhuangbanRecyclerviewNorefBinding> implements ZhuangBanShangChengConactos.View {
@@ -24,7 +25,10 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
private List<ZhuangBanShangChengBean> zhuangBanShangChengBeanList; private List<ZhuangBanShangChengBean> zhuangBanShangChengBeanList;
int pSelect = -1; int pSelect = -1;
private int did; private String did;
ZhuangBanShangChengAdapter adapter;
AvatarFrameView imageBg;
AnimView item_animview;
@Override @Override
protected ZhuangBanShangChengPresenter bindPresenter() { protected ZhuangBanShangChengPresenter bindPresenter() {
return new ZhuangBanShangChengPresenter(this, getActivity()); return new ZhuangBanShangChengPresenter(this, getActivity());
@@ -44,26 +48,26 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
} }
@Override @Override
protected void initData() { protected void initData() {
//这里根据传递的type进行数据查询 MvpPre.getDecorateList(type+"");
zhuangBanShangChengBeanList=new ArrayList<>(); // //这里根据传递的type进行数据查询
for (int i = 0; i < 10; i++) { // zhuangBanShangChengBeanList=new ArrayList<>();
ZhuangBanShangChengBean zhuangBanShangChengBean=new ZhuangBanShangChengBean(); // for (int i = 0; i < 10; i++) {
zhuangBanShangChengBean.setTitle("标题"+i); // ZhuangBanShangChengBean zhuangBanShangChengBean=new ZhuangBanShangChengBean();
zhuangBanShangChengBean.setIntegral("积分"+i); // zhuangBanShangChengBean.setTitle("标题"+i);
zhuangBanShangChengBean.setPeriod(i); // zhuangBanShangChengBean.setIntegral("积分"+i);
zhuangBanShangChengBean.setType("类型"+i); // zhuangBanShangChengBean.setPeriod(i);
zhuangBanShangChengBean.setBase_image(""); // zhuangBanShangChengBean.setType("类型"+i);
zhuangBanShangChengBeanList.add(zhuangBanShangChengBean); // zhuangBanShangChengBean.setBase_image("");
} // zhuangBanShangChengBeanList.add(zhuangBanShangChengBean);
// }
SVGAImageView imageBg = (SVGAImageView) getActivity().findViewById(R.id.image_headPortrait); imageBg = (AvatarFrameView) getActivity().findViewById(R.id.image_headPortrait);
ZhuangBanShangChengAdapter adapter = new ZhuangBanShangChengAdapter(); item_animview = (AnimView) getActivity().findViewById(R.id.item_animview);
adapter = new ZhuangBanShangChengAdapter();
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 3); GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 3);
mBinding.recyclerView.setLayoutManager(gridLayoutManager); mBinding.recyclerView.setLayoutManager(gridLayoutManager);
mBinding.recyclerView.setAdapter(adapter); mBinding.recyclerView.setAdapter(adapter);
adapter.setOnItemChildClickListener((adapter1, view, position) -> { adapter.setOnItemChildClickListener((adapter1, view, position) -> {
List<ZhuangBanShangChengBean> list = (List<ZhuangBanShangChengBean>) adapter1.getData(); List<ZhuangBanShangChengBean> list = (List<ZhuangBanShangChengBean>) adapter1.getData();
@@ -71,37 +75,74 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
list.get(pSelect).setIs_select(false); list.get(pSelect).setIs_select(false);
list.get(position).setIs_select(true); list.get(position).setIs_select(true);
pSelect = position; pSelect = position;
did = list.get(position).getDid(); did = list.get(position).getUdid();
mBinding.ll.setVisibility(View.VISIBLE); mBinding.ll.setVisibility(View.VISIBLE);
loadImage(getContext(),imageBg, list.get(position).getBase_image()); if ("svga".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
// imageBg.playSVGA(list.get(position).getPlay_image());
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.SVGA,1);
} else if ("mp4".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
// imageBg.playMP4(Uri.parse(list.get(position).getPlay_image()));
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.MP4,1);
}
} else if (pSelect != -1 && pSelect == position) { } else if (pSelect != -1 && pSelect == position) {
list.get(position).setIs_select(false); list.get(position).setIs_select(false);
pSelect = -1; pSelect = -1;
// mDataBinding.tvMoney.setText("0");
mBinding.ll.setVisibility(View.GONE); mBinding.ll.setVisibility(View.GONE);
} else { } else {
list.get(position).setIs_select(true); list.get(position).setIs_select(true);
did = list.get(position).getDid(); did = list.get(position).getUdid();
pSelect = position; pSelect = position;
mBinding.ll.setVisibility(View.VISIBLE); mBinding.ll.setVisibility(View.VISIBLE);
loadImage(getContext(),imageBg, list.get(position).getBase_image()); // loadImage(getContext(),imageBg, list.get(position).getPlay_image());
// ImageUtils.loadDecorationAvatar(list.get(position).getPlay_image(), imageBg);
// imageBg.load(list.get(position).getPlay_image());
if ("svga".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.SVGA,1);
// imageBg.playSVGA(list.get(position).getPlay_image());
} else if ("mp4".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
imageBg.setSource(list.get(position).getPlay_image(), AvatarFrameView.RenderType.MP4,1);
// imageBg.playMP4(Uri.parse(list.get(position).getPlay_image()));
}
} }
adapter1.setNewData(list); adapter1.setNewData(list);
adapter1.notifyDataSetChanged(); adapter1.notifyDataSetChanged();
}); });
adapter.setNewData(zhuangBanShangChengBeanList); adapter.setNewData(zhuangBanShangChengBeanList);
}
private String getFileExtension(String url) {
if (url == null || url.isEmpty()) return "";
int dotIndex = url.lastIndexOf(".");
if (dotIndex > 0 && dotIndex < url.length() - 1) {
return url.substring(dotIndex + 1).toLowerCase(); // 返回 "mp4", "svga" 等
}
return "";
} }
@Override @Override
protected void initView() { protected void initView() {
mBinding.zhuangbanBuy.setOnClickListener(v -> {
MvpPre.setUserDecorate(did);
});
} }
@Override @Override
protected int getLayoutId() { protected int getLayoutId() {
return R.layout.zhuangban_recyclerview_noref; return R.layout.zhuangban_recyclerview_noref;
} }
@Override
public void getDecorateList(List<ZhuangBanShangChengBean> zhuangBanShangChengBeans) {
adapter.setNewData(zhuangBanShangChengBeans);
}
@Override
public void setUserDecorate() {
Toast.makeText(getSelfActivity(), "设置成功", Toast.LENGTH_SHORT).show();
}
} }

View File

@@ -3,10 +3,46 @@ package com.example.modulevocal.fragment.zhuangb;
import android.content.Context; import android.content.Context;
import com.example.modulevocal.conacts.CreatedRoomConactos; import com.example.modulevocal.conacts.CreatedRoomConactos;
import com.qxcm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
import com.qxcm.moduleutil.http.BaseObserver;
import com.qxcm.moduleutil.presenter.BasePresenter; import com.qxcm.moduleutil.presenter.BasePresenter;
public class ZhuangBanShangChengPresenter extends BasePresenter<ZhuangBanShangChengConactos.View> implements ZhuangBanShangChengConactos.ICreatedRoomPre{ import java.util.List;
import io.reactivex.disposables.Disposable;
public class ZhuangBanShangChengPresenter extends BasePresenter<ZhuangBanShangChengConactos.View> implements ZhuangBanShangChengConactos.ICreatedRoomPre {
public ZhuangBanShangChengPresenter(ZhuangBanShangChengConactos.View view, Context context) { public ZhuangBanShangChengPresenter(ZhuangBanShangChengConactos.View view, Context context) {
super(view, context); super(view, context);
} }
@Override
public void getDecorateList(String type) {
api.getDecorateList(type, new BaseObserver<List<ZhuangBanShangChengBean>>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(List<ZhuangBanShangChengBean> zhuangBanShangChengBeans) {
MvpRef.get().getDecorateList(zhuangBanShangChengBeans);
}
});
}
@Override
public void setUserDecorate(String udid) {
api.setUserDecorate(udid, new BaseObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(String s) {
MvpRef.get().setUserDecorate();
}
});
}
} }

View File

@@ -19,19 +19,38 @@
app:TopBarTitle="@string/dressup" app:TopBarTitle="@string/dressup"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.tabs.TabLayout <!-- <com.google.android.material.tabs.TabLayout-->
android:id="@+id/tab_layout" <!-- android:id="@+id/tab_layout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="@dimen/dp_48"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/top_bar"-->
<!-- app:tabBackground="@android:color/transparent"-->
<!-- app:tabIndicatorHeight="0dp"-->
<!-- app:tabMode="scrollable"-->
<!-- app:tabPaddingBottom="0dp"-->
<!-- app:tabPaddingEnd="0dp"-->
<!-- app:tabPaddingStart="0dp"-->
<!-- app:tabPaddingTop="0dp"-->
<!-- app:tabRippleColor="@android:color/transparent" />-->
<com.example.moduletablayout.CustomSlidingTabLayout
android:id="@+id/sliding_tab_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_48" android:layout_height="@dimen/dp_34"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_16"
app:layout_constraintTop_toBottomOf="@+id/top_bar" app:layout_constraintTop_toBottomOf="@+id/top_bar"
app:tabBackground="@android:color/transparent" app:tl_indicator_corner_radius="@dimen/dp_3"
app:tabIndicatorHeight="0dp" app:tl_indicator_height="@dimen/dp_2"
app:tabMode="scrollable" app:tl_indicator_margin_bottom="@dimen/dp_1"
app:tabPaddingBottom="0dp" app:tl_indicator_width="@dimen/dp_28"
app:tabPaddingEnd="0dp" app:tl_showCateIndicator="false"
app:tabPaddingStart="0dp" app:tl_textBold="SELECT"
app:tabPaddingTop="0dp" app:tl_textSelectColor="@color/color_2B2823"
app:tabRippleColor="@android:color/transparent" /> app:tl_textSelectedSize="@dimen/sp_14"
app:tl_textUnselectColor="@color/color_FF999999"
app:tl_textsize="@dimen/sp_12" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_2" android:id="@+id/cl_2"
@@ -42,7 +61,7 @@
android:visibility="visible" android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_layout"> app:layout_constraintTop_toBottomOf="@+id/sliding_tab_layout">
<com.makeramen.roundedimageview.RoundedImageView <com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/iv_user" android:id="@+id/iv_user"
@@ -58,47 +77,52 @@
app:riv_border_width="1dp" app:riv_border_width="1dp"
app:riv_oval="true" /> app:riv_oval="true" />
<com.opensource.svgaplayer.SVGAImageView <com.qxcm.moduleutil.widget.AvatarFrameView
android:id="@+id/image_headPortrait" android:id="@+id/image_headPortrait"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<com.tencent.qgame.animplayer.AnimView
android:id="@+id/item_animview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<!-- <com.example.moduletablayout.CustomSlidingTabLayout--> <!-- <com.example.moduletablayout.CustomSlidingTabLayout-->
<!-- android:id="@+id/sliding_tab_layout"--> <!-- android:id="@+id/sliding_tab_layout"-->
<!-- android:layout_width="match_parent"--> <!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"--> <!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="@dimen/dp_16"--> <!-- android:layout_marginLeft="@dimen/dp_16"-->
<!-- android:layout_marginTop="@dimen/dp_12"--> <!-- android:layout_marginTop="@dimen/dp_12"-->
<!-- android:layout_marginRight="@dimen/dp_16"--> <!-- android:layout_marginRight="@dimen/dp_16"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/cl_2"--> <!-- app:layout_constraintTop_toBottomOf="@+id/cl_2"-->
<!-- app:tl_indicator_corner_radius="@dimen/dp_3"--> <!-- app:tl_indicator_corner_radius="@dimen/dp_3"-->
<!-- app:tl_indicator_drawable="@drawable/index_bg_indicator"--> <!-- app:tl_indicator_drawable="@drawable/index_bg_indicator"-->
<!-- app:tl_indicator_height="@dimen/dp_6"--> <!-- app:tl_indicator_height="@dimen/dp_6"-->
<!-- app:tl_indicator_margin_bottom="@dimen/dp_3"--> <!-- app:tl_indicator_margin_bottom="@dimen/dp_3"-->
<!-- app:tl_indicator_width="@dimen/dp_28"--> <!-- app:tl_indicator_width="@dimen/dp_28"-->
<!-- app:tl_showCateIndicator="false"--> <!-- app:tl_showCateIndicator="false"-->
<!-- app:tl_tab_width="@dimen/dp_50"--> <!-- app:tl_tab_width="@dimen/dp_50"-->
<!-- app:tl_textBold="SELECT"--> <!-- app:tl_textBold="SELECT"-->
<!-- app:tl_textSelectColor="@color/color_2B2823"--> <!-- app:tl_textSelectColor="@color/color_2B2823"-->
<!-- app:tl_textSelectedSize="@dimen/sp_14"--> <!-- app:tl_textSelectedSize="@dimen/sp_14"-->
<!-- app:tl_textUnselectColor="@color/color_FF999999"--> <!-- app:tl_textUnselectColor="@color/color_FF999999"-->
<!-- app:tl_textsize="@dimen/sp_12" />--> <!-- app:tl_textsize="@dimen/sp_12" />-->
<com.qxcm.moduleutil.widget.ScrollViewPager <com.qxcm.moduleutil.widget.ScrollViewPager
android:id="@+id/view_pager" android:id="@+id/view_pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_30" android:layout_marginTop="@dimen/dp_30"
app:layout_constraintTop_toBottomOf="@+id/cl_2" app:layout_constraintTop_toBottomOf="@+id/cl_2" />
/>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_60" android:layout_height="@dimen/dp_60"
android:background="@color/color_transparent" android:background="@color/color_transparent"
app:layout_constraintBottom_toBottomOf="parent"/> app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@@ -48,3 +48,4 @@ include ':timcommon'
include ':tuichat' include ':tuichat'
include ':tuiconversation' include ':tuiconversation'
include ':tuicore' include ':tuicore'
include ':moduleroom'