春节主题:首页弹窗、礼物、部分按钮。

This commit is contained in:
2026-01-28 16:17:06 +08:00
parent 88ce0205fb
commit 7aa294c3a9
53 changed files with 223 additions and 60 deletions

View File

@@ -5,6 +5,9 @@ import android.graphics.Color;
import androidx.annotation.ColorInt;
import androidx.annotation.Nullable;
import com.blankj.utilcode.util.ActivityUtils;
import com.xscm.moduleutil.R;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -69,7 +72,7 @@ public class ColorManager {
// 解析颜色为int值
public int getPrimaryColorInt() {
try {
return Color.parseColor(primaryColor);
return UtilConfig.getAttrColor(ActivityUtils.getTopActivity(), R.attr.app_color_colorPrimary);//Color.parseColor(primaryColor);
} catch (Exception e) {
return Color.parseColor("#3ABC6D"); // 默认颜色
}

View File

@@ -1,6 +1,8 @@
package com.xscm.moduleutil.utils;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import com.lahm.library.EasyProtectorLib;
import com.lahm.library.EmulatorCheckCallback;
@@ -50,4 +52,31 @@ public class UtilConfig {
public static void setSalt(String salt) {
UtilConfig.salt = salt;
}
public static int getAttBg(Context context, int attr){
// 1. 定义需要获取的自定义属性数组
int[] attrs = new int[]{attr};
// 2. 从Context的Theme中获取TypedArray核心绑定当前主题的属性值
TypedArray ta = context.obtainStyledAttributes(attrs);
// 3. 获取attr对应的资源ID默认值0无有效资源时返回0
int bgResId = ta.getResourceId(0, 0);
// 4. 关键手动回收TypedArray释放系统资源避免内存泄漏
ta.recycle();
// 5. 有有效资源ID时设置背景
return bgResId;
}
// 新增:解析自定义颜色属性,返回实际颜色码(核心)
public static int getAttrColor(Context context, int colorAttrId) {
if (context == null) {
return Color.BLACK; // 上下文为空时返回默认黑色,可自定义
}
// 从主题中获取TypedArray解析颜色属性
TypedArray ta = context.obtainStyledAttributes(new int[]{colorAttrId});
// getColor(索引, 默认颜色)直接返回十六进制颜色码适配setTextColor
int color = ta.getColor(0, Color.BLACK);
ta.recycle(); // 必须回收,避免内存泄漏
return color;
}
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- <solid android:color="#E3F2FD" />-->
<gradient
android:angle="90"
android:endColor="#FFFBFBFF"
android:startColor="#FFFFEBEB"
android:type="linear"
android:useLevel="true" />
<stroke
android:width="1dp"
android:color="#FFFF7676" />
<corners android:radius="8dp" />
</shape>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp" android:color="@color/colorPrimary" />
<stroke android:width="1dp" android:color="?attr/app_color_colorPrimary" />
<solid android:color="#ffeff2f8" />
<corners android:topLeftRadius="65dp" android:topRightRadius="65dp" android:bottomLeftRadius="65dp" android:bottomRightRadius="65dp" />
</shape>

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp" android:color="#8865FF" />
<stroke android:width="1dp" android:color="?attr/app_color_colorPrimary" />
<corners android:topLeftRadius="79dp" android:topRightRadius="79dp" android:bottomLeftRadius="79dp" android:bottomRightRadius="79dp" />
</shape>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="2dp" android:color="@color/colorPrimary" />
<stroke android:width="2dp" android:color="?attr/app_color_colorPrimary" />
<corners android:topLeftRadius="70dp" android:topRightRadius="70dp" android:bottomLeftRadius="70dp" android:bottomRightRadius="70dp" />
</shape>

View File

@@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/h_bj_b"
android:src="?attr/app_main_dialog_refill_bg_line"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -26,7 +26,7 @@
android:id="@+id/rl_t"
android:layout_width="@dimen/dp_276"
android:layout_height="@dimen/dp_350"
android:background="@mipmap/frb_bg"
android:background="?attr/app_main_dialog_refill_bg_first"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/h_bj_b"
android:src="?attr/app_main_dialog_refill_bg_line"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -26,7 +26,7 @@
android:id="@+id/rl_t"
android:layout_width="@dimen/dp_276"
android:layout_height="@dimen/dp_365"
android:background="@mipmap/heaven_bj"
android:background="?attr/app_main_dialog_refill_bg_day"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"

View File

@@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/h_bj_b"
android:src="?attr/app_main_dialog_refill_bg_line"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -26,7 +26,7 @@
android:id="@+id/rl_t"
android:layout_width="@dimen/dp_276"
android:layout_height="@dimen/dp_338"
android:background="@mipmap/new_people_bj"
android:background="?attr/app_main_dialog_refill_bg_new"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -17,7 +17,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="fitXY"
android:src="@mipmap/index_youth"
android:src="?attr/app_index_youth_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="300:375"
app:layout_constraintEnd_toEndOf="parent"
@@ -77,6 +77,7 @@
android:background="@drawable/cs"
android:gravity="center"
android:text="开启青少年模式"
android:backgroundTint="?attr/app_color_colorPrimary"
android:textColor="@color/color_FF333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold"

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 KiB

View File

@@ -16,9 +16,27 @@
<attr name="app_main_tab_text_color" format="reference"/>
<attr name="app_main_tab_bg" format="reference"/>
<attr name="app_invite_bg" format="reference"/>
<attr name="app_index_youth_bg" format="reference"/>
<attr name="app_main_dialog_refill_bg_line" format="reference"/>
<attr name="app_main_dialog_refill_bg_new" format="reference"/>
<attr name="app_main_dialog_refill_bg_day" format="reference"/>
<attr name="app_main_dialog_refill_bg_first" format="reference"/>
<attr name="app_user_bg_color" format="color"/>
<attr name="app_user_edit_me" format="reference"/>
<attr name="app_tab_mark" format="reference"/>
<attr name="app_select_item" format="reference"/>
<attr name="app_bottom_dialog_bg" format="reference"/>
<attr name="app_bottom_dialog_send_gift_bg" format="reference"/>
<declare-styleable name="ExplainView">
<attr name="ev_title" />
<attr name="ev_hint" format="string" />

View File

@@ -43,11 +43,35 @@
<item name="app_main_tab_2">@drawable/main_bottom_bar_icon_media</item>
<item name="app_main_tab_3">@drawable/main_bottom_bar_icon_news</item>
<item name="app_main_tab_4">@drawable/main_bottom_bar_icon_tend</item>
<item name="app_main_tab_text_color">@drawable/text_color_two</item>
<item name="app_main_tab_bg">@drawable/home_bbar_xz</item>
<item name="app_invite_bg">@mipmap/invite_bj</item>
<item name="app_index_youth_bg">@mipmap/index_youth</item>
<item name="app_main_dialog_refill_bg_line">@mipmap/h_bj_b</item>
<item name="app_main_dialog_refill_bg_first">@mipmap/frb_bg</item>
<item name="app_main_dialog_refill_bg_new">@mipmap/new_people_bj</item>
<item name="app_main_dialog_refill_bg_day">@mipmap/heaven_bj</item>
<item name="app_user_bg_color">#231F2C</item>
<item name="app_user_edit_me">@mipmap/me_edit</item>
<item name="app_tab_mark">@mipmap/tab_x</item>
<item name="app_select_item">@drawable/bg_item_selected</item>
<item name="app_bottom_dialog_bg">@drawable/dialog_user_info_bg</item>
<item name="app_bottom_dialog_send_gift_bg">@drawable/bg_room_gift</item>
</style>
<!-- 子主题:元旦主题 -->
@@ -65,9 +89,25 @@
<item name="app_main_tab_text_color">@drawable/text_color_two</item>
<item name="app_main_tab_bg">@drawable/home_bbar_xz</item>
<item name="app_invite_bg">@mipmap/invite_bj</item>
<item name="app_index_youth_bg">@mipmap/index_youth</item>
<item name="app_main_dialog_refill_bg_line">@mipmap/h_bj_b</item>
<item name="app_main_dialog_refill_bg_first">@mipmap/frb_bg</item>
<item name="app_main_dialog_refill_bg_new">@mipmap/new_people_bj</item>
<item name="app_main_dialog_refill_bg_day">@mipmap/heaven_bj</item>
<item name="app_user_bg_color">#231F2C</item>
<item name="app_user_edit_me">@mipmap/me_edit</item>
<item name="app_tab_mark">@mipmap/tab_x</item>
<item name="app_select_item">@drawable/bg_item_selected</item>
<item name="app_bottom_dialog_bg">@drawable/dialog_user_info_bg</item>
<item name="app_bottom_dialog_send_gift_bg">@drawable/bg_room_gift</item>
</style>
@@ -86,9 +126,27 @@
<item name="app_main_tab_text_color">@drawable/text_color_spring</item>
<item name="app_main_tab_bg">@mipmap/icon_main_tab_bg</item>
<item name="app_user_bg_color">#FF600D00</item>
<item name="app_invite_bg">@mipmap/icon_invite_spring</item>
<item name="app_index_youth_bg">@mipmap/icon_spring_index_youth</item>
<item name="app_main_dialog_refill_bg_line">@mipmap/icon_spring_h_bj_b</item>
<item name="app_main_dialog_refill_bg_first">@mipmap/icon_spring_frb_bg</item>
<item name="app_main_dialog_refill_bg_new">@mipmap/icon_spring_new_people_bj</item>
<item name="app_main_dialog_refill_bg_day">@mipmap/icon_spring_heaven_bj</item>
<item name="app_user_bg_color">#FF600D00</item>
<item name="app_user_edit_me">@mipmap/icon_spring_edit_me</item>
<item name="app_tab_mark">@mipmap/icon_bg_tab_line</item>
<item name="app_select_item">@drawable/bg_item_spring_selected</item>
<item name="app_bottom_dialog_bg">@drawable/dialog_user_info_spring_bg</item>
<item name="app_bottom_dialog_send_gift_bg">@drawable/dialog_user_info_spring_bg</item>
</style>

View File

@@ -78,6 +78,7 @@ import com.tencent.qcloud.tuicore.TUILogin;
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
import com.xscm.moduleutil.utils.SpUtil;
import com.xscm.moduleutil.utils.SystemUtils;
import com.xscm.moduleutil.utils.UtilConfig;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@@ -788,7 +789,7 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
int userNameStart = fullText.indexOf(redBean.getNickname());
if (userNameStart >= 0) {
builder.setSpan(
new ForegroundColorSpan(ContextCompat.getColor(this, com.xscm.moduleutil.R.color.colorPrimary)),
new ForegroundColorSpan(ContextCompat.getColor(this, UtilConfig.getAttrColor(this,R.attr.app_color_colorPrimary))),
userNameStart,
userNameStart + redBean.getNickname().length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
@@ -799,7 +800,7 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
int roomNameStart = fullText.indexOf(redBean.getRoom_name());
if (roomNameStart >= 0) {
builder.setSpan(
new ForegroundColorSpan(ContextCompat.getColor(this, com.xscm.moduleutil.R.color.colorPrimary)),
new ForegroundColorSpan(ContextCompat.getColor(this, UtilConfig.getAttrColor(this,R.attr.app_color_colorPrimary))),
roomNameStart,
roomNameStart + redBean.getRoom_name().length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE

View File

@@ -9,7 +9,6 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
@@ -33,14 +32,12 @@ import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.azhon.appupdate.listener.OnButtonClickListener;
import com.azhon.appupdate.listener.OnDownloadListener;
import com.azhon.appupdate.manager.DownloadManager;
import com.azhon.appupdate.util.ApkUtil;
import com.blankj.utilcode.util.FragmentUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.bumptech.glide.Glide;
import com.permissionx.guolindev.PermissionX;
import com.permissionx.guolindev.callback.RequestCallback;
import com.stx.xhb.xbanner.XBanner;
@@ -49,7 +46,6 @@ import com.tencent.imsdk.v2.V2TIMValueCallback;
import com.xscm.modulemain.Application;
import com.xscm.modulemain.BaseMvpActivity;
import com.xscm.modulemain.R;
import com.xscm.modulemain.TransparentActivity;
import com.xscm.modulemain.activity.main.contacts.HomeContacts;
import com.xscm.modulemain.activity.main.presenter.HomePresenter;
import com.xscm.modulemain.activity.msg.fragment.NewsFragment;
@@ -73,7 +69,6 @@ import com.xscm.moduleutil.bean.room.RoomOnline;
import com.xscm.moduleutil.bean.room.RoomOnlineBean;
import com.xscm.moduleutil.dialog.FirstChargeDialog;
import com.xscm.moduleutil.dialog.HeavenGiftDialog;
import com.xscm.modulemain.dialog.InviteDialog;
import com.xscm.moduleutil.dialog.NewPeopleDialog;
import com.xscm.moduleutil.dialog.RechargeDialogFragment;
import com.xscm.moduleutil.event.RoomOutEvent;
@@ -81,11 +76,11 @@ import com.xscm.moduleutil.event.UnreadCountEvent;
import com.xscm.moduleutil.http.RetrofitClient;
import com.xscm.moduleutil.listener.MessageListenerSingleton;
import com.xscm.moduleutil.utils.ARouteConstants;
import com.xscm.moduleutil.utils.BackgroundManager;
import com.xscm.moduleutil.utils.ColorManager;
import com.xscm.moduleutil.utils.ImageLoader;
import com.xscm.moduleutil.utils.PermissionDescriptionHelper;
import com.xscm.moduleutil.utils.SpUtil;
import com.xscm.moduleutil.utils.UtilConfig;
import com.xscm.moduleutil.utils.location.LocationProvider;
import com.xscm.moduleutil.utils.location.SystemLocationProvider;
import com.xscm.moduleutil.utils.logger.Logger;
@@ -96,9 +91,7 @@ import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@@ -144,18 +137,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
}
private int getTabBg(){
// 1. 定义需要获取的自定义属性数组
int[] attrs = new int[]{com.xscm.moduleutil.R.attr.app_main_tab_bg};
// 2. 从Context的Theme中获取TypedArray核心绑定当前主题的属性值
TypedArray ta = obtainStyledAttributes(attrs);
// 3. 获取attr对应的资源ID默认值0无有效资源时返回0
int bgResId = ta.getResourceId(0, 0);
// 4. 关键手动回收TypedArray释放系统资源避免内存泄漏
ta.recycle();
// 5. 有有效资源ID时设置背景
return bgResId;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -340,7 +322,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
// 初始化显示派对Tab
reset();
mBinding.rlMedia.setSelected(true);
mBinding.llBottomBar.setBackgroundResource(getTabBg());
mBinding.llBottomBar.setBackgroundResource(UtilConfig.getAttBg(this,com.xscm.moduleutil.R.attr.app_main_tab_bg));
FragmentUtils.showHide(0, fragments);
}
@@ -363,7 +345,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
public void onClick(View view) {
int id = view.getId();
if (id == R.id.rl_media) {
mBinding.llBottomBar.setBackgroundResource(getTabBg());
mBinding.llBottomBar.setBackgroundResource(UtilConfig.getAttBg(this,com.xscm.moduleutil.R.attr.app_main_tab_bg));
selectShow(0);
} else if (id == R.id.rl_trend) {
mBinding.llBottomBar.setBackgroundResource(com.xscm.moduleutil.R.drawable.home_bbar_yuan);
@@ -374,7 +356,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
selectShow(2);
} else if (id == R.id.rl_me) {
mBinding.llBottomBar.setBackgroundResource(getTabBg());
mBinding.llBottomBar.setBackgroundResource(UtilConfig.getAttBg(this,com.xscm.moduleutil.R.attr.app_main_tab_bg));
selectShow(3);
//C0101我的界面

View File

@@ -293,7 +293,7 @@ public class VoiceCategoryFragment extends BaseMvpFragment<VoiceCategoryPresente
// 创建适配器
MyFragmentPagerAdapter adapter = new MyFragmentPagerAdapter(getActivity(), list);
mBinding.viewPager.setAdapter(adapter);
mBinding.slidingTabLayout.setSelectedTabIndicatorColor(ColorManager.getInstance().getPrimaryColorInt());
// mBinding.slidingTabLayout.setSelectedTabIndicatorColor(ColorManager.getInstance().getPrimaryColorInt());
if (!list.isEmpty())
mBinding.viewPager.setOffscreenPageLimit(list.size() - 1);
// 设置 TabLayout 与 ViewPager2 的关联

View File

@@ -1,5 +1,6 @@
package com.xscm.modulemain.adapter;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
@@ -15,6 +16,7 @@ import com.xscm.modulemain.R;
import com.xscm.moduleutil.bean.RewardUserBean;
import com.xscm.moduleutil.utils.ImageUtils;
import com.xscm.moduleutil.utils.SpUtil;
import com.xscm.moduleutil.utils.UtilConfig;
import com.xscm.moduleutil.widget.BaseWheatView;
import java.util.ArrayList;
@@ -41,10 +43,11 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
helper.setVisible(R.id.riv_pit, item.isSelect());
TextView tvPit = helper.getView(R.id.tv_pit);
if (item.isSelect()) {
helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show);
// helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show);
helper.getView(R.id.tv_pit).setBackgroundTintList(ColorStateList.valueOf(UtilConfig.getAttrColor(tvPit.getContext(),com.xscm.moduleutil.R.attr.app_color_colorPrimary)));
tvPit.setTextColor(Color.parseColor("#ffffff"));
} else {
helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show_b);
helper.getView(R.id.tv_pit).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#FFFFFF")));
tvPit.setTextColor(Color.parseColor("#ff333333"));
}
}
@@ -78,10 +81,11 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
}
}
if (item.isSelect()) {
helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show);
helper.getView(R.id.tv_pit).setBackgroundTintList(ColorStateList.valueOf(UtilConfig.getAttrColor(tvPit.getContext(),com.xscm.moduleutil.R.attr.app_color_colorPrimary)));
tvPit.setTextColor(Color.parseColor("#ffffff"));
} else {
helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show_b);
// helper.getView(R.id.tv_pit).setBackgroundResource(com.xscm.moduleutil.R.mipmap.gift_show_b);
helper.getView(R.id.tv_pit).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#FFFFFF")));
tvPit.setTextColor(Color.parseColor("#ff333333"));
}
}

View File

@@ -7,6 +7,7 @@ import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.xscm.modulemain.R
import com.xscm.moduleutil.bean.PitTimeRespBean
import com.xscm.moduleutil.utils.UtilConfig
/**
* 项目名称:羽声语音
@@ -40,8 +41,8 @@ class RoomPitTimeAdapter(val dataList: List<PitTimeRespBean>,
// 设置选中状态
if (position == selectedPosition) {
textView.setBackgroundResource(R.drawable.bg_item_selected) // 选中背景
textView.setTextColor(android.graphics.Color.parseColor("#3ABC6D"))
textView.setBackgroundResource(UtilConfig.getAttBg(itemView.context,com.xscm.moduleutil.R.attr.app_select_item)) // 选中背景
textView.setTextColor(UtilConfig.getAttrColor(itemView.context,com.xscm.moduleutil.R.attr.app_color_colorPrimary))
} else {
textView.setBackgroundResource(R.drawable.bg_item_normal) // 默认背景
textView.setTextColor(android.graphics.Color.parseColor("#333333"))

View File

@@ -4,9 +4,9 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.compose.ui.graphics.Color
import androidx.recyclerview.widget.RecyclerView
import com.xscm.modulemain.R
import com.xscm.moduleutil.utils.UtilConfig
/**
* 项目名称:羽声语音
@@ -41,8 +41,8 @@ class RoomTalentAdapter(
// 设置选中状态
if (position == selectedPosition) {
textView.setBackgroundResource(R.drawable.bg_item_selected) // 选中背景
textView.setTextColor(android.graphics.Color.parseColor("#3ABC6D"))
textView.setBackgroundResource(UtilConfig.getAttBg(itemView.context,com.xscm.moduleutil.R.attr.app_select_item)) // 选中背景
textView.setTextColor(UtilConfig.getAttrColor(itemView.context,com.xscm.moduleutil.R.attr.app_color_colorPrimary))
} else {
textView.setBackgroundResource(R.drawable.bg_item_normal) // 默认背景
textView.setTextColor(android.graphics.Color.parseColor("#333333"))

View File

@@ -52,8 +52,13 @@ public class SearchUserResultAdapter extends BaseQuickAdapter<UserResultResp, Ba
helper.getView(R.id.gensui).setBackgroundResource(com.xscm.moduleutil.R.mipmap.six);
}
helper.getView(R.id.dy_head_image).setOnClickListener(new View.OnClickListener() {
/**
* Handles the click event for the view
* @param v The view that was clicked
*/
@Override
public void onClick(View v) {
// Check if the listener is set before calling the click handler
if (mListener != null) mListener.onHeadImageClick(item);
}
});

View File

@@ -15,7 +15,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@mipmap/invite_bj"
android:src="?attr/app_invite_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -36,6 +36,7 @@
android:layout_height="@dimen/dp_70"
android:layout_marginTop="@dimen/dp_12"
android:src="@mipmap/invite_tx"
android:tint="?attr/app_color_colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_bg"
@@ -124,6 +125,7 @@
android:text="接受"
android:textSize="@dimen/sp_14"
android:gravity="center"
android:backgroundTint="?attr/app_color_colorPrimary"
android:background="@drawable/cs"/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -7,7 +7,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dialog_user_info_bg"
android:background="?attr/app_bottom_dialog_bg"
android:clipToPadding="false"
android:maxHeight="@dimen/dp_400"
android:paddingTop="@dimen/dp_10"
@@ -98,7 +98,7 @@
android:layout_marginHorizontal="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_20"
android:background="@drawable/shape_15"
android:backgroundTint="#FF3ABC6D"
android:backgroundTint="?attr/app_color_colorPrimary"
android:paddingHorizontal="@dimen/dp_10"
android:paddingVertical="@dimen/dp_3"
android:text="充值"

View File

@@ -70,6 +70,7 @@
android:layout_marginStart="@dimen/sp_16"
android:layout_weight="2"
android:background="@drawable/bg_r53_0dffb9"
android:backgroundTint="?attr/app_color_colorPrimary"
android:gravity="center"
android:text="确定"
android:textColor="@color/white"

View File

@@ -70,6 +70,7 @@
android:layout_marginStart="@dimen/sp_16"
android:layout_weight="2"
android:background="@drawable/bg_r53_0dffb9"
android:backgroundTint="?attr/app_color_colorPrimary"
android:gravity="center"
android:text="确定"
android:textColor="@color/white"

View File

@@ -62,7 +62,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_3"
android:background="@drawable/shape_15"
android:backgroundTint="#3ABC6D"
android:backgroundTint="?attr/app_color_colorPrimary"
android:gravity="center"
android:paddingHorizontal="@dimen/dp_8"
android:paddingVertical="@dimen/dp_1"
@@ -102,7 +102,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_3"
android:background="@drawable/shape_15"
android:backgroundTint="#3ABC6D"
android:backgroundTint="?attr/app_color_colorPrimary"
android:gravity="center"
android:paddingHorizontal="@dimen/dp_8"
android:paddingVertical="@dimen/dp_1"

View File

@@ -272,7 +272,7 @@
app:tabIndicatorGravity="bottom"
app:tabMode="scrollable"
app:tabMinWidth="@dimen/dp_30"
app:tabIndicatorColor="@color/colorPrimary"
app:tabIndicatorColor="?attr/app_color_colorPrimary"
app:tabTextAppearance="@style/CustomTabTextAppearance"
app:tabTextColor="#F1ECFF" />
</com.google.android.material.appbar.AppBarLayout>

View File

@@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_r16_fff"
android:layout_marginBottom="@dimen/dp_10"
android:orientation="vertical"
android:paddingTop="@dimen/dp_4"
android:paddingBottom="@dimen/dp_4">

View File

@@ -3,6 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_marginHorizontal="@dimen/dp_6"
android:layout_marginVertical="@dimen/dp_6">
@@ -10,6 +11,7 @@
android:id="@+id/tv_talent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
tools:text="talent"
android:padding="@dimen/dp_10"
android:gravity="center"

View File

@@ -83,7 +83,7 @@
android:layout_width="@dimen/dp_40"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/tab_x" />
android:src="?attr/app_tab_mark" />
</LinearLayout>
<LinearLayout
@@ -108,7 +108,7 @@
android:id="@+id/v_line2"
android:layout_width="@dimen/dp_40"
android:layout_height="wrap_content"
android:src="@mipmap/tab_x"
android:src="?attr/app_tab_mark"
android:scaleType="fitXY"
android:visibility="gone" />
</LinearLayout>
@@ -136,7 +136,7 @@
android:layout_width="@dimen/dp_40"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/tab_x"
android:src="?attr/app_tab_mark"
android:visibility="gone" />
</LinearLayout>
@@ -162,7 +162,7 @@
android:id="@+id/v_line4"
android:layout_width="@dimen/dp_40"
android:layout_height="wrap_content"
android:src="@mipmap/tab_x"
android:src="?attr/app_tab_mark"
android:scaleType="fitXY"
android:visibility="gone" />
</LinearLayout>

View File

@@ -73,7 +73,7 @@
android:focusable="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_room_gift"
android:background="?attr/app_bottom_dialog_send_gift_bg"
android:layout_alignParentBottom="true"
android:paddingStart="@dimen/dp_16"
android:paddingTop="@dimen/dp_25"
@@ -111,7 +111,7 @@
android:background="@drawable/text_bg_x"
android:gravity="center"
android:text="全麦"
android:textColor="#8865FF"
android:textColor="?attr/app_color_colorPrimary"
android:textSize="@dimen/sp_14" />
</RelativeLayout>

View File

@@ -38,6 +38,7 @@
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="1"
android:background="@mipmap/gift_show_b"
android:textColor="@color/color_FF333333"
android:textSize="8sp"
android:visibility="gone"