1:添加签约房的按钮

2:我的家族和的身价页面完成
3:个性装扮降身卡完成
This commit is contained in:
2025-11-26 15:52:46 +08:00
parent 1753d9a98d
commit 9887185133
204 changed files with 1873 additions and 245 deletions

View File

@@ -22,6 +22,8 @@ public class RoomSettingBean implements MultiItemEntity {
public static final int QXRoomSettingTypeRoomTypeHUYU = 28;
//练歌房
public static final int QXRoomSettingTypeRoomTypeLianG = 31;
//签约
public static final int QXRoomSettingTypeRoomTypeSIGNONTRACT = 32;
/// 常用工具
/// 房间补贴
@@ -86,6 +88,7 @@ public class RoomSettingBean implements MultiItemEntity {
public int getItemType() {
return itemType;
}
public void updateItemType() {
if (type == -1) { // 特殊值表示标题
this.itemType = ITEM_TYPE_DEFAULT;

View File

@@ -15,11 +15,13 @@ public class ZhuangBanShangChengBean {
private String is_perpetual;
private String special_num ;//靓号
private String title ;//装扮名称
private String type ;//类型,顶部的头部选择
private String type="" ;//类型,顶部的头部选择
private String remaining_day ;//价格
private String base_image ;//显示图片
private String play_image;//播放图像
private boolean is_select = false;
private int num ;//数量
private String ext_value="" ;//这是使用降身卡的时候返回的参数对应的是降身卡的前面类似10%
public boolean isIs_select() {
return is_select;

View File

@@ -15,8 +15,8 @@ enum class RoomType(
DATING("交友", 1,3, 4, 8), // 1、3、4、8 均对应交友
BLACK_ROOM("小黑屋", 6),
JUKEBOX("点唱", 9),
MUTUAL_ENTERTAINMENT("互娱", 17),
SIGN_CONTRACT("签约", 7);
MUTUAL_ENTERTAINMENT("互娱", 7),
SIGN_CONTRACT("签约", 10);
companion object {

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:startColor="#C5FFC9"
android:centerColor="#F9E9FF"
android:endColor="#C7ECFA"
android:type="linear"
android:useLevel="true" />
<corners
android:bottomLeftRadius="12dp"
android:bottomRightRadius="12dp"
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
</shape>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:centerColor="#fff9e9ff"
android:endColor="#ffc7d3fa"
android:startColor="#fffffac5"
android:type="linear"
android:useLevel="true" />
<corners
android:bottomLeftRadius="12dp"
android:bottomRightRadius="12dp"
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
</shape>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:startColor="#FFDAED"
android:centerColor="#ffd9ffe1"
android:endColor="#F3FF98"
android:type="linear"
android:useLevel="true" />
<corners
android:bottomLeftRadius="4dp"
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp"
android:topRightRadius="4dp" />
</shape>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:startColor="#C2EBFF"
android:centerColor="#fff5d2f2"
android:endColor="#FFF6F0"
android:type="linear"
android:useLevel="true" />
<corners
android:bottomLeftRadius="6dp"
android:bottomRightRadius="6dp"
android:topLeftRadius="6dp"
android:topRightRadius="6dp" />
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#AEEDFF"/>
<corners
android:topLeftRadius="8dp"
android:topRightRadius="8dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
</shape>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 背景填充颜色,如果你不需要内部填充颜色,可以设置为透明 -->
<solid android:color="@color/white" />
<!-- 边框设置 -->
<stroke
android:width="0.5dp"
android:color="#9FF9DF" />
<!-- 圆角设置 -->
<corners android:radius="99dp" /> <!-- 你可以根据需要调整圆角大小 -->
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -4,6 +4,7 @@
<string name="voice_title">羽声语音</string>
<string name="circle_title">语圈</string>
<string name="wallet">钱包</string>
<string name="net_worth">身价</string>
<string name="dan">等级</string>
<string name="guild">公会中心</string>
<string name="dressup">个性装扮</string>
@@ -12,6 +13,7 @@
<string name="daily">每日任务</string>
<string name="news">消息</string>
<string name="setting_name">设置</string>
<string name="me_family">我的家族</string>
<string name="tab_text_2">未点亮</string>
<string name="tab_text_1">已点亮</string>

View File

@@ -6,6 +6,12 @@
<uses-permission android:name="android.permission.REORDER_TASKS" />
<application android:theme="@style/AppTheme">
<activity
android:name=".activity.user.activity.TotalRevenueActivity"
android:exported="false" />
<activity
android:name=".activity.user.activity.UserFamilyActivity"
android:exported="false" />
<activity
android:name=".activity.user.activity.HeartCpActivity"
android:exported="false" />

View File

@@ -1,5 +1,6 @@
package com.xscm.modulemain.activity.room.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -9,6 +10,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.blankj.utilcode.util.ActivityUtils;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
import com.xscm.modulemain.R;
@@ -17,15 +19,23 @@ import com.xscm.modulemain.activity.room.contacts.RequestSongContacts;
import com.xscm.modulemain.activity.room.presenter.RequestSongPresenter;
import com.xscm.modulemain.activity.room.adapter.SongAdapter;
import com.xscm.modulemain.activity.room.adapter.WheatPositionAdapter;
import com.xscm.modulemain.activity.user.activity.HeartCpActivity;
import com.xscm.modulemain.databinding.FragmentSongRequestBinding;
import com.xscm.moduleutil.base.BaseMvpFragment;
import com.xscm.moduleutil.bean.RoomGiftData;
import com.xscm.moduleutil.bean.SingerSongCount;
import com.xscm.moduleutil.bean.SongPlaylist;
import com.xscm.moduleutil.bean.room.RoomPitBean;
import com.xscm.moduleutil.dialog.ConfirmDialog;
import com.xscm.moduleutil.http.BaseObserver;
import com.xscm.moduleutil.http.RetrofitClient;
import com.xscm.moduleutil.utils.SpUtil;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.disposables.Disposable;
/**
* 点歌页面Fragment
*/
@@ -128,16 +138,37 @@ public class SongRequestFragment extends BaseMvpFragment<RequestSongPresenter, F
@Override
public void onSongClick(SongPlaylist.SongPlaylistBean song, int position) {
MvpPre.singerSong(song.getId() + "", roomId);
queren1(song);
}
});
}
// TODO: 2025/11/25 点歌提示框
private void queren1(SongPlaylist.SongPlaylistBean song) {
// 创建并显示确认对话框
new ConfirmDialog(ActivityUtils.getTopActivity(),
"温馨提示",
"您是否确认点歌<"+song.getSong_name()+">\n 演唱者:"+song.getSinger_nickname()+"\n 礼物价值:"+Integer.valueOf(song.getGift_price())*Integer.valueOf(song.getGift_num())+"金币",
"确认",
"取消",
v -> {
MvpPre.singerSong(song.getId() + "", roomId);
},
v -> {
// 点击“取消”按钮时什么都不做
}, false,0).show();
}
private void updateSongList(int wheatPosition) {
// 根据选中的麦位更新歌曲列表
// 可以在这里调用接口获取对应麦位的歌曲列表
if (wheatPosition==0){
MvpPre.getSong( "", roomId, "1", "10");
}else {
MvpPre.getSong(wheatPosition + "", "", "1", "10");
}
}

View File

@@ -31,76 +31,9 @@ import java.util.List;
* @description: 个性装扮
*/
public class PersonalityActivity extends BaseMvpActivity<PersonalityPresenter, ActivityPersonalityBinding> implements PersonalityConacts.View {
private List<String> titleList = new ArrayList();
private List<Fragment> mFragments = new ArrayList();
private MyPagerAdapter myAdapter;
@Override
protected void initData() {
// titleList.add("头像框");
// titleList.add("座驾");
// titleList.add("气泡");
// titleList.add("个人靓号");
// 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);
// mBinding.viewPager.setAdapter(myAdapter);
// mBinding.viewPager.setOffscreenPageLimit(mFragments.size());
// mBinding.tabLayout.setupWithViewPager(mBinding.viewPager);
// setCustomViews();
// mBinding.tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
// @Override
// public void onTabSelected(TabLayout.Tab tab) {
// updateTabView(tab, true);
// }
//
// @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
@@ -135,44 +68,10 @@ public class PersonalityActivity extends BaseMvpActivity<PersonalityPresenter, A
return R.layout.activity_personality;
}
// private void setCustomViews() {
// int mSelectedTabPosition = mBinding.tabLayout.getSelectedTabPosition();
// for (int i = 0; i < titleList.size(); i++) {
// 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);
@@ -188,6 +87,11 @@ public class PersonalityActivity extends BaseMvpActivity<PersonalityPresenter, A
public void onPageSelected(int position) {
// 当页面切换时,控制 tv_bb_qs 按钮的显示
refreshCurrentGiftFragment(personaltyBean.get(position).getId(),position);
if (personaltyBean.get(position).getId().equals("12")){
mBinding.cl2.setVisibility(View.GONE);
}else {
mBinding.cl2.setVisibility(View.VISIBLE);
}
}
@Override

View File

@@ -0,0 +1,55 @@
package com.xscm.modulemain.activity.user.activity
import android.util.Log
import com.xscm.modulemain.BaseMvpActivity
import com.xscm.modulemain.R
import com.xscm.modulemain.activity.user.conacts.UserFamilyConacts
import com.xscm.modulemain.activity.user.presenter.UserFamilyPresenter
import com.xscm.modulemain.databinding.ActivityTotalRevenueBinding
import com.xscm.moduleutil.widget.DoubleTimePickerBottomSheet
import com.xscm.moduleutil.widget.DoubleTimePickerBottomSheet.OnTimeRangeSelectedListener
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
/**
* @Author qx
* @Time 2025/11/26 10:56
* @Description 家族总收益
*/
class TotalRevenueActivity : BaseMvpActivity<UserFamilyPresenter, ActivityTotalRevenueBinding>(),
UserFamilyConacts.View {
var page = 1
var type = "1"
var revenueType = "1"
override fun bindPresenter(): UserFamilyPresenter? {
return UserFamilyPresenter(this, this)
}
override fun initData() {
mBinding.topBar.tvTitle.text = "总收益"
mBinding.rl3.setOnClickListener({ v ->
val dialog = DoubleTimePickerBottomSheet()
dialog.setOnTimeRangeSelectedListener(OnTimeRangeSelectedListener { startDate: Date?, endDate: Date? ->
// 处理选择的时间范围
val sdf = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
Log.d("SelectedTime", "开始时间:" + sdf.format(startDate))
mBinding.tv2.setText(sdf.format(startDate))
Log.d("SelectedTime", "结束时间:" + sdf.format(endDate))
mBinding.tv22.setText(sdf.format(endDate))
page = 1
})
val fragmentManager = supportFragmentManager
dialog.show(fragmentManager,"DoubleTimePickerBottomSheet")
})
}
override fun getLayoutId(): Int {
return R.layout.activity_total_revenue
}
}

View File

@@ -0,0 +1,110 @@
package com.xscm.modulemain.activity.user.activity
import android.graphics.Color
import android.view.LayoutInflater
import android.widget.ImageView
import android.widget.TextView
import com.google.android.material.tabs.TabLayout
import com.google.android.material.tabs.TabLayoutMediator
import com.xscm.modulemain.BaseMvpActivity
import com.xscm.modulemain.R
import com.xscm.modulemain.activity.user.conacts.UserFamilyConacts
import com.xscm.modulemain.activity.user.presenter.UserFamilyPresenter
import com.xscm.modulemain.adapter.FamilyPagerAdapter
import com.xscm.modulemain.databinding.ActivityUserFamilyBinding
/**
* @Author qx
* @Time 2025/11/25 17:11
* @Description 我的家族
*/
class UserFamilyActivity : BaseMvpActivity<UserFamilyPresenter, ActivityUserFamilyBinding>(),
UserFamilyConacts.View {
private lateinit var mAdapter: FamilyPagerAdapter
override fun bindPresenter(): UserFamilyPresenter? {
return UserFamilyPresenter(this,this)
}
override fun doDone() {
super.doDone()
}
override fun initView() {
super.initView()
}
override fun initData() {
mBinding.topBar.setTitle("家族")
mBinding.topBar.setColor(getResources().getColor(R.color.white))
setupViewPager()
setupTabLayout()
}
override fun getLayoutId(): Int {
return R.layout.activity_user_family
}
private fun setupViewPager() {
mAdapter = FamilyPagerAdapter(this)
mBinding.viewPager.adapter = mAdapter
}
private fun setupTabLayout() {
// 设置TabLayout的内部padding为0确保tab与边框贴合
TabLayoutMediator(mBinding.tabLayout, mBinding.viewPager) { tab, position ->
// 创建自定义Tab视图
val customView = LayoutInflater.from(this).inflate(R.layout.custom_tab_family, null)
val tabTitle = customView.findViewById<TextView>(R.id.tab_title)
when (position) {
0 -> {
tabTitle.text = "我的家族"
}
1 -> {
tabTitle.text = "我加入的家族"
}
}
// 设置Tab的初始状态
if (position == 0) {
tabTitle.setBackgroundResource(R.mipmap.user_tab_bj)
tabTitle.setTextColor(Color.BLACK)
} else {
tabTitle.setBackgroundResource(0)
tabTitle.setTextColor(Color.WHITE)
}
tab.customView = customView
}.attach()
// 设置Tab选中监听
mBinding.tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab) {
val customView = tab.customView
if (customView != null) {
val tabTitle = customView.findViewById<TextView>(R.id.tab_title)
tabTitle.setTextColor(Color.BLACK)
tabTitle.setBackgroundResource(R.mipmap.user_tab_bj)
}
}
override fun onTabUnselected(tab: TabLayout.Tab) {
val customView = tab.customView
if (customView != null) {
val tabTitle = customView.findViewById<TextView>(R.id.tab_title)
tabTitle.setTextColor(Color.WHITE)
tabTitle.setBackgroundResource(0)
}
}
override fun onTabReselected(tab: TabLayout.Tab) {
// 可以在这里处理重复点击Tab的事件
}
})
}
}

View File

@@ -109,6 +109,9 @@ class BosomFriendFragment : BaseMvpFragment<UserHomepagePresenter?, FragmentBoso
override fun initView() {
if (type == 1) {
mBinding.root.setBackgroundResource(R.mipmap.bj_intimate)
mBinding.imIntimate.setPadding(0, 270, 0, 0)
}else{
mBinding.imIntimate.setPadding(0, 80, 0, 0)
}
mBinding.rvMyRelationship.layoutManager =

View File

@@ -0,0 +1,20 @@
package com.xscm.modulemain.activity.user.conacts
import android.app.Activity
import com.xscm.moduleutil.activity.IPresenter
import com.xscm.moduleutil.activity.IView
/**
* 项目名称:羽声语音
* 时间2025/11/25 17:01
* 用途:
*/
class UserFamilyConacts {
interface View : IView<Activity>{
}
interface IPre : IPresenter {
}
}

View File

@@ -0,0 +1,39 @@
package com.xscm.modulemain.activity.user.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.xscm.modulemain.databinding.FragmentJoinedFamilyBinding
/**
* @Author qx
* @Time 2025/11/25 17:20
* @Description 我加入的家族Fragment
*/
class JoinedFamilyFragment : Fragment() {
private var _binding: FragmentJoinedFamilyBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
_binding = FragmentJoinedFamilyBinding.inflate(inflater, container, false)
return binding.root
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
companion object {
fun newInstance(): JoinedFamilyFragment {
return JoinedFamilyFragment()
}
}
}

View File

@@ -0,0 +1,86 @@
package com.xscm.modulemain.activity.user.fragment
import android.content.Intent
import android.view.View
import com.blankj.utilcode.util.ActivityUtils
import com.xscm.modulemain.R
import com.xscm.modulemain.activity.user.activity.HeartCpActivity
import com.xscm.modulemain.activity.user.activity.TotalRevenueActivity
import com.xscm.modulemain.activity.user.conacts.UserFamilyConacts
import com.xscm.modulemain.activity.user.presenter.UserFamilyPresenter
import com.xscm.modulemain.databinding.FragmentMyFamilyBinding
import com.xscm.moduleutil.base.BaseMvpFragment
import com.xscm.moduleutil.dialog.ConfirmDialog
import com.xscm.moduleutil.widget.CommonEmptyView
/**
* @Author qx
* @Time 2025/11/25 17:20
* @Description 我的家族Fragment
*/
class MyFamilyFragment : BaseMvpFragment<UserFamilyPresenter, FragmentMyFamilyBinding>(), UserFamilyConacts.View {
override fun bindPresenter(): UserFamilyPresenter? {
return UserFamilyPresenter(this, activity!!)
}
override fun onDestroyView() {
super.onDestroyView()
}
override fun initData() {
}
override fun initView() {
mBinding.tvZsyNum2.setOnClickListener {
val intent= Intent(activity, TotalRevenueActivity::class.java)
startActivity(intent)
}
val commonEmptyView = CommonEmptyView(getContext()!!)
commonEmptyView.setImg(R.mipmap.ic_empty)
commonEmptyView.setTextColor(getResources().getColor(com.xscm.moduleutil.R.color.color_FFBDBDBC))
// manageAdapter.bindToRecyclerView(mBinding.recycleView)
// manageAdapter.setEmptyView(commonEmptyView)
}
override fun getLayoutId(): Int {
return R.layout.fragment_my_family
}
companion object {
fun newInstance(): MyFamilyFragment {
return MyFamilyFragment()
}
}
private fun queren1(
type: Int,
content: String?,
giftid: String?,
userId: String,
roomId: String?
) {
// 创建并显示确认对话框
ConfirmDialog(
ActivityUtils.getTopActivity(),
"续约提示",
content,
if (type == 1) "确认免费续约" else "确认续约",
"取消",
View.OnClickListener { v: View? ->
if (type == 1) {
} else {
val userids = userId.toInt()
val intent = Intent(ActivityUtils.getTopActivity(), HeartCpActivity::class.java)
intent.putExtra("userId", userids)
startActivity(intent)
}
},
View.OnClickListener { v: View? -> }, false, 0
).show()
}
}

View File

@@ -26,6 +26,7 @@ import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
import com.xscm.modulemain.activity.user.activity.NobleTitleActivity;
import com.xscm.modulemain.activity.user.activity.RechargeActivity;
import com.xscm.modulemain.activity.user.activity.SingerVerificationActivity;
import com.xscm.modulemain.activity.user.activity.UserFamilyActivity;
import com.xscm.modulemain.activity.user.activity.UserPlaylistActivity;
import com.xscm.modulemain.databinding.FragmentVocalRangeBinding;
import com.xscm.modulemain.activity.user.activity.BlacklistActivity;
@@ -40,6 +41,7 @@ import com.xscm.modulemain.activity.user.activity.UserHomepageActivity;
import com.xscm.modulemain.activity.user.conacts.MeConacts;
import com.xscm.modulemain.activity.user.presenter.MePresenter;
import com.xscm.modulemain.activity.WebViewActivity;
import com.xscm.modulemain.dialog.UserNetWorthDialog;
import com.xscm.moduleutil.base.WebUrlConstants;
import com.xscm.moduleutil.widget.ShineTextView;
import com.xscm.moduleutil.base.BaseMvpFragment;
@@ -124,6 +126,8 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
mBinding.llSinger.setOnClickListener(this::onClick);
mBinding.llPlaylist.setOnClickListener(this::onClick);
mBinding.llMeZy.setOnClickListener(this::onClick);
mBinding.llMyNetWorth.setOnClickListener(this::onClick);
mBinding.llJz.setOnClickListener(this::onClick);
mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
@Override
@@ -214,14 +218,7 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
Intent intent = new Intent(getContext(), UserHomepageActivity.class);
intent.putExtra("userId", SpUtil.getUserId() + "");
startActivity(intent);
}
// else if (id == R.id.me_my_lv) {
// ARouter.getInstance().build(ARouteConstants.ME_GRADEACTIVITY).withString("from", "我的界面").withInt("type", 1).navigation();
// } else if (id == R.id.tv_my_sc) {
// //装扮商城
// ARouter.getInstance().build(ARouteConstants.ME_SHOP).withString("from", "我的界面").navigation();
// }
else if (id == R.id.me_dress_up){//个性装扮
} else if (id == R.id.me_dress_up){//个性装扮
startActivity(new Intent(getContext(), PersonalityActivity.class));
}
else if (id == R.id.tv_my_bb) {
@@ -263,25 +260,29 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
req.url = "https://work.weixin.qq.com/kfid/kfcb3d23a59c188a0e7"; // 客服URL
api.sendReq(req);
} else if (id == R.id.ll_gift_wall) {//我的页面的礼物墙
Intent intent=new Intent(getContext(), GiftWallActivity.class);
intent.putExtra("userId",userInfo.getUser_id());
startActivity(intent);
} else if (id == R.id.cl_noble_title) {//爵位展示页面
startActivity(new Intent(getContext(), NobleTitleActivity.class));
} else if (id == R.id.ll_singer) {//歌手认证
Intent intent = new Intent(getContext(), SingerVerificationActivity.class);
intent.putExtra("isSinger", userInfo.getSinger_status());
startActivity(intent);
} else if (id == R.id.ll_playlist) {//我的歌单
Intent intent = new Intent(getContext(), UserPlaylistActivity.class);
startActivity(intent);
}else if (id == R.id.ll_me_zy) {
}else if (id == R.id.ll_me_zy) {//挚友
Intent intent=new Intent(getContext(), BosomFriendActivity.class);
startActivity(intent);
}else if (id == R.id.ll_my_net_worth) {//身价
UserNetWorthDialog dialog = new UserNetWorthDialog(getContext());
dialog.show();
}else if (id == R.id.ll_jz) {//我的家族
Intent intent=new Intent(getContext(), UserFamilyActivity.class);
startActivity(intent);
}
}
private void copyComment(String content) {

View File

@@ -33,7 +33,7 @@ public class ZhuangBanShangChengAdapter extends BaseQuickAdapter<ZhuangBanShangC
ThemeableDrawableUtils.setThemeableRoundedBackground( tv_integral, ColorManager.getInstance().getPrimaryColorInt(), corners);
tv_integral.setTextColor(ColorManager.getInstance().getButtonColorInt());
helper.setText(R.id.integral, item.getRemaining_day()+"")
helper.setText(R.id.integral, !item.getType().equals("12")?item.getRemaining_day()+"" : "x"+item.getNum())
.setText(R.id.tv_name_period, item.getTitle());
// .setText(R.id.tv_time, "(有效期${item.period}天)")
if (item.isIs_select()) {

View File

@@ -2,22 +2,33 @@ package com.xscm.modulemain.activity.user.fragment.zhuangb;
import static android.view.View.GONE;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.recyclerview.widget.GridLayoutManager;
import com.blankj.utilcode.util.ActivityUtils;
import com.xscm.modulemain.R;
import com.xscm.modulemain.activity.user.activity.HeartCpActivity;
import com.xscm.modulemain.databinding.ZhuangbanRecyclerviewNorefBinding;
import com.hjq.toast.ToastUtils;
import com.makeramen.roundedimageview.RoundedImageView;
import com.tencent.qgame.animplayer.AnimView;
import com.xscm.modulemain.activity.user.fragment.MyRoomListFragment;
import com.xscm.moduleutil.base.BaseMvpFragment;
import com.xscm.moduleutil.bean.RoomGiftData;
import com.xscm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
import com.xscm.moduleutil.dialog.ConfirmDialog;
import com.xscm.moduleutil.http.BaseObserver;
import com.xscm.moduleutil.http.RetrofitClient;
import com.xscm.moduleutil.utils.ColorManager;
import com.xscm.moduleutil.utils.ImageUtils;
import com.xscm.moduleutil.utils.SpUtil;
@@ -27,6 +38,8 @@ import com.xscm.moduleutil.widget.GiftAnimView;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.disposables.Disposable;
public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangChengPresenter, ZhuangbanRecyclerviewNorefBinding> implements ZhuangBanShangChengConactos.View {
private int type;
@@ -40,6 +53,7 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
AnimView item_animview;
RoundedImageView image_user;
private int tabIndex;
private String zbName, zbPrice;//这是降身卡名称、降身卡可能降低的金额
@Override
protected ZhuangBanShangChengPresenter bindPresenter() {
@@ -68,25 +82,18 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
this.tabIndex = tabIndex;
MvpPre.getDecorateList(type + "", tabIndex);
}
@Override
protected void initData() {
MvpPre.getDecorateList(type + "", tabIndex);
if (type == 12) {
mBinding.zhuangbanBuy.setText("确认使用");
} else {
mBinding.zhuangbanBuy.setText("确认装扮");
}
// //这里根据传递的type进行数据查询
// zhuangBanShangChengBeanList=new ArrayList<>();
// for (int i = 0; i < 10; i++) {
// ZhuangBanShangChengBean zhuangBanShangChengBean=new ZhuangBanShangChengBean();
// zhuangBanShangChengBean.setTitle("标题"+i);
// zhuangBanShangChengBean.setIntegral("积分"+i);
// zhuangBanShangChengBean.setPeriod(i);
// zhuangBanShangChengBean.setType("类型"+i);
// zhuangBanShangChengBean.setBase_image("");
// zhuangBanShangChengBeanList.add(zhuangBanShangChengBean);
// }
image_user = (RoundedImageView) getActivity().findViewById(R.id.iv_user);
imageBg = (AvatarFrameView) getActivity().findViewById(R.id.image_headPortrait);
// imageBg2 = (GiftAnimView) getActivity().findViewById(R.id.image_headPortrait2);
@@ -105,21 +112,6 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
ImageUtils.loadHeadCC(SpUtil.getUserInfo().getAvatar(), image_user);
}
}
// if (type == 1) {
//// image_user.setVisibility(View.VISIBLE);
// imageBg.setVisibility(View.VISIBLE);
// imageBg2.setVisibility(View.GONE);
// } else if (type == 2){
//// image_user.setVisibility(View.GONE);
// imageBg.setVisibility(View.GONE);
// imageBg2.setVisibility(View.VISIBLE);
// }else {
//// image_user.setVisibility(View.GONE);
// imageBg.setVisibility(View.GONE);
// imageBg2.setVisibility(View.GONE);
// }
adapter = new ZhuangBanShangChengAdapter();
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 3);
mBinding.recyclerView.setLayoutManager(gridLayoutManager);
@@ -129,52 +121,26 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
List<ZhuangBanShangChengBean> list = (List<ZhuangBanShangChengBean>) adapter1.getData();
// 清除之前的选择状态
clearPreviousSelection(list);
// // 设置当前选择
// ZhuangBanShangChengBean selectedBean = list.get(position);
// selectedBean.setIs_select(true);
// pSelect = position;
// did = selectedBean.getUdid();
//
// // 更新UI显示
// if (position == 0) { // "无"选项
// mBinding.ll.setVisibility(View.GONE);
// clearDecorations();
// } else {
// mBinding.ll.setVisibility(View.VISIBLE);
//
// if ("svga".equalsIgnoreCase(getFileExtension(selectedBean.getPlay_image()))) {
// imageBg.stopAll();
// imageBg.setSource(selectedBean.getPlay_image(), 2);
// } else if ("mp4".equalsIgnoreCase(getFileExtension(selectedBean.getPlay_image()))) {
// imageBg.stopAll();
// imageBg.setSource(selectedBean.getPlay_image(), 2);
// }
// }
if (pSelect != -1 && pSelect != position) {
list.get(pSelect).setIs_select(false);
list.get(position).setIs_select(true);
pSelect = position;
did = list.get(position).getUdid();
mBinding.ll.setVisibility(View.VISIBLE);
if (list.get(position) != null && list.get(position).getType() != null && list.get(position).getPlay_image() != null) {
// if ("svga".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
if (list.get(position).getType().equals("1")) {
imageBg2.setVisibility(View.GONE);
imageBg.stopAll();
imageBg.setSource(list.get(position).getPlay_image(), 2);
} else if (list.get(position).getType().equals("2")) {
// imageBg2.setSource(list.get(position).getPlay_image(), 2);
imageBg2.setVisibility(View.VISIBLE);
imageBg2.previewEffectWith(list.get(position).getPlay_image());
}
}
// } else if ("mp4".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
//// imageBg.playMP4(Uri.parse(list.get(position).getPlay_image()));
// imageBg.stopAll();
// imageBg.setSource(list.get(position).getPlay_image(),2);
// }
} else if (pSelect != -1 && pSelect == position) {
list.get(position).setIs_select(false);
pSelect = -1;
@@ -193,32 +159,15 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
imageBg.setSource(list.get(position).getPlay_image(), 2);
} else if (list.get(position).getType().equals("2")) {
imageBg2.setVisibility(View.VISIBLE);
// imageBg2.stopAll();
// imageBg2.setSource(list.get(position).getPlay_image(), 2);
imageBg2.previewEffectWith(list.get(position).getPlay_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.stopAll();
// imageBg.setSource(list.get(position).getPlay_image(), 2);
//// imageBg.playSVGA(list.get(position).getPlay_image());
// } else if ("mp4".equalsIgnoreCase(getFileExtension(list.get(position).getPlay_image()))) {
// imageBg.stopAll();
// imageBg.setSource(list.get(position).getPlay_image(), 2);
//// imageBg.playMP4(Uri.parse(list.get(position).getPlay_image()));
// }
}
zbName = list.get(position).getTitle();
zbPrice = list.get(position).getExt_value();
adapter1.setNewData(list);
adapter1.notifyDataSetChanged();
});
adapter.setNewData(zhuangBanShangChengBeanList);
}
/**
@@ -258,14 +207,62 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
mBinding.zhuangbanBuy.setOnClickListener(v -> {
if (did == null || did.isEmpty()) {
MvpPre.cancelUserDecorate(type + "");
} else {
if (type == 12) {
queren(zbName, zbPrice);
} else {
MvpPre.setUserDecorate(did);
}
}
});
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.zhuangbanBuy, ColorManager.getInstance().getPrimaryColorInt(), 53);
mBinding.zhuangbanBuy.setTextColor(ColorManager.getInstance().getButtonColorInt());
}
private void queren(String name, String price) {
// 创建并显示确认对话框
new ConfirmDialog(ActivityUtils.getTopActivity(),
"温馨提示",
getFormattedText(name,price),
"确认",
"取消",
v -> {
MvpPre.setUserDecorate(did);
},
v -> {
// 点击“取消”按钮时什么都不做
}, false, 0).show();
}
public String getFormattedText(String name, String price) {
// 1. 构建完整的字符串
String fullText = "亲爱的羽声用户,您好~ \n 您是否确认使用" + name + ",本次使用后,您的实时身价将会降低" + price + "%身价。";
// 2. 创建 SpannableString 实例
SpannableString spannableString = new SpannableString(fullText);
// 3. 找到需要变色的文本的起始和结束位置
int nameStart = fullText.indexOf(name);
int nameEnd = nameStart + name.length();
int priceStart = fullText.indexOf(price);
int priceEnd = priceStart + price.length();
// 4. 创建颜色 Span
ForegroundColorSpan colorSpan = new ForegroundColorSpan(Color.RED); // 使用 Color.RED 或者你自己的颜色资源
// 5. 将 Span 应用到指定范围
if (nameStart != -1) {
spannableString.setSpan(colorSpan, nameStart, nameEnd, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
if (priceStart != -1) {
spannableString.setSpan(colorSpan, priceStart, priceEnd, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
return spannableString.toString();
}
@Override
protected int getLayoutId() {
return R.layout.zhuangban_recyclerview_noref;
@@ -279,10 +276,12 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
if (zhuangBanShangChengBeans == null) {
zhuangBanShangChengBeans = new ArrayList<>();
}
if (type != 12) {
ZhuangBanShangChengBean zhuangBanShangChengBean = new ZhuangBanShangChengBean();
zhuangBanShangChengBean.setTitle("");
zhuangBanShangChengBean.setBase_image("");
zhuangBanShangChengBeans.add(0, zhuangBanShangChengBean);
}
adapter.setNewData(zhuangBanShangChengBeans);
this.tabIndex = tabIndex;
@@ -291,6 +290,7 @@ public class ZhuangBanShangChengFragment extends BaseMvpFragment<ZhuangBanShangC
@Override
public void setUserDecorate() {
Toast.makeText(getSelfActivity(), "设置成功", Toast.LENGTH_SHORT).show();
MvpPre.getDecorateList(type + "", tabIndex);
}
@Override

Some files were not shown because too many files have changed in this diff Show More