fix bugs.

This commit is contained in:
2025-12-02 19:35:18 +08:00
parent d94d7a75df
commit 10e5504ce1
20 changed files with 171 additions and 176 deletions

View File

@@ -172,7 +172,9 @@ dependencies {
// 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.egame.vap:animplayer:2.0.8")
api project(":animplayer")
api("com.liulishuo.okdownload:okdownload:1.0.7")
api('com.zlc.glide:webpdecoder:1.6.4.9.0')

View File

@@ -7,6 +7,7 @@ import android.os.Looper;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.SoundEffectConstants;
import android.view.View;
import android.widget.FrameLayout;
@@ -57,6 +58,12 @@ import okhttp3.ResponseBody;
public class AvatarFrameView extends FrameLayout {
private PlaybackManager playbackManager;
private boolean isMute = false;
public void setMute(boolean b) {
this.isMute = b;
}
public enum RenderType {SVGA, MP4}
private RenderType renderType;
@@ -113,49 +120,6 @@ public class AvatarFrameView extends FrameLayout {
// 初始化播放管理器
playbackManager = new PlaybackManager(mainHandler);
// 获取 MP4PlaybackCallback 单例实例并设置引用
// MP4PlaybackCallback callback = MP4PlaybackCallback.getInstance();
// callback.setAvatarFrameView(this);
// 设置播放完成监听
// mBinding.playView.setAnimListener(callback);
// if (mBinding != null) {
// mBinding.playView.setAnimListener(this);
// }
// MP4PlaybackCallback = new IAnimListener() {
// @Override
// public boolean onVideoConfigReady(@NonNull AnimConfig animConfig) {
// return false;
// }
//
// @Override
// public void onVideoStart() {
//
// }
//
// @Override
// public void onVideoRender(int i, @Nullable AnimConfig animConfig) {
//
// }
//
// @Override
// public void onVideoComplete() {
// onPlaybackComplete();
// }
//
// @Override
// public void onVideoDestroy() {
//
// }
//
// @Override
// public void onFailed(int i, @Nullable String s) {
// onPlaybackComplete();
// }
// };
// // 设置播放完成监听
// mBinding.playView.setAnimListener(MP4PlaybackCallback);
}
private String getFileExtension(String url) {
@@ -488,7 +452,7 @@ public class AvatarFrameView extends FrameLayout {
} else {
mBinding.playView.setLoop(1); // 播放一次
}
mBinding.playView.setMute(isMute);
// 开始播放前检查视图状态
if (!isDestroyed && mBinding != null && mBinding.playView != null) {
mBinding.playView.startPlay(file);

View File

@@ -29,9 +29,9 @@ class ShineTextView : AppCompatTextView {
//流光效果下字体流动次数
var shineCount: Int = Int.MAX_VALUE
//注入效果 开始,中间,结束
var startColor: Int = Color.WHITE
var shineColor: Int = Color.WHITE
var endColor: Int = Color.WHITE
var startColor: Int = Color.BLACK
var shineColor: Int = Color.BLACK
var endColor: Int = Color.BLACK
//一次动效时长
var shineDuration: Int = 1000
@@ -104,7 +104,7 @@ class ShineTextView : AppCompatTextView {
0f,
0f,
0f,
intArrayOf(Color.TRANSPARENT,Color.TRANSPARENT),
intArrayOf(Color.BLACK,Color.BLACK),
null,
Shader.TileMode.CLAMP
)

View File

@@ -352,15 +352,6 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("wheatFeedingDF","点击了" + viewName +"========="+ClickUtils.isFastDoubleClick(view));
if (ClickUtils.isFastDoubleClick(view)) {
return;
}
@@ -463,6 +454,15 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
dialog.show();
}
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("wheatFeedingDF","点击了" + viewName +"========="+ClickUtils.isFastDoubleClick(view));
}

View File

@@ -525,14 +525,7 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
private void onClick(View view) {
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("roomKTVFragment","点击了" + viewName );
if (id == R.id.ll_tiaoyt) {
// MvpPre.endSong(roomInfoResp.getRoom_info().getRoom_id());
TunerDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), getChildFragmentManager());
@@ -572,6 +565,14 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
volumeManager.saveBz(SpUtil.getUserId()+"",false);
}
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("roomKTVFragment","点击了" + viewName );
}
@Override

View File

@@ -259,10 +259,10 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
}
} else {
mBinding.tvTimeLeft.text = startOrDelay[0]
mBinding.tvTimeLeft.visibility = View.INVISIBLE
mBinding.tvTime.visibility = View.INVISIBLE
mBinding.tvTimeRight.visibility = View.INVISIBLE
mBinding.groupLeftPrice.visibility = View.INVISIBLE
mBinding.tvTimeLeft.visibility = View.GONE
mBinding.tvTime.visibility = View.GONE
mBinding.tvTimeRight.visibility = View.GONE
mBinding.groupLeftPrice.visibility = View.GONE
if (!isSignUser) {
mBinding.tvLeftPrice.text = "0"
mBinding.tvSignDay.visibility = View.GONE
@@ -275,7 +275,7 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
if (mRoomInfo?.user_info?.pit_number == 9 && !mSignPitBean?.user_id.equals("0")) {
mBinding.tvTimeLeft.visibility = View.VISIBLE
} else {
mBinding.tvTimeLeft.visibility = View.INVISIBLE
mBinding.tvTimeLeft.visibility = View.GONE
}
}

View File

@@ -112,7 +112,7 @@ class HeartCpActivity : BaseMvpActivity<HeartCpPresenter, ActivityHeartCpBinding
leftUserId = heartCpBean.user_id2
rightUserId = heartCpBean.user_id1
}
mBinding.cpAnim.setMute(true)
mBinding.cpAnim.setSource(heartCpBean.pendant, 1)
val xd = heartCpBean.next_level_exp

View File

@@ -107,14 +107,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
MvpPre = bindPresenter();
}
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("点击了~" + viewName);
if (id == R.id.ll_youth) {
// startActivity(new Intent(this, UnderageActivity.class));
@@ -271,6 +264,14 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
// }
// });
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("点击了~" + viewName);
}
private void showYouthModelDialog() {
YouthModelDialog youthModelDialog = new YouthModelDialog(this, null);

View File

@@ -266,7 +266,7 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
} else {
mBinding.headerInfo.tvCpNum.setText(String.valueOf(xd));
}
mBinding.headerInfo.cpAnim.setMute(true);
mBinding.headerInfo.cpAnim.setSource(userInfo.getCp_info().pendant, 1);

View File

@@ -177,14 +177,7 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
public void onClick(View view) {
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("点击了~" + viewName);
if (id == R.id.ll_visit) {
@@ -294,7 +287,14 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
Intent intent=new Intent(getContext(), UserFamilyActivity.class);
startActivity(intent);
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("点击了~" + viewName);
}
private void copyComment(String content) {

View File

@@ -62,6 +62,12 @@ public class ExpandColumnAdapter extends BaseQuickAdapter<ExpandColumnBean, Base
tvName.setEndColor(Color.parseColor(item.getNickname_color()));
tvName.setShine(true);
tvName.setShineType(0);
}else {
tvName.setStartColor(Color.BLACK);
tvName.setShineColor(Color.BLACK);
tvName.setEndColor(Color.BLACK);
tvName.setShine(true);
tvName.setShineType(1);
}
// helper.setTextColor(R.id.dy_name_text,(item.getNickname_color()!=null && !item.getNickname_color().isEmpty())? Color.parseColor(item.getNickname_color()):Color.parseColor("#333333"));
helper.setText(R.id.tv_address, item.getLoginip());

View File

@@ -374,14 +374,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
private void onClisk(View view) {
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("GiftLotteryDFragment","点击了" + viewName );
if (id == R.id.ll_one) {
if (!isDrawing) {
@@ -453,6 +446,14 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
// ARouter.getInstance().build(ARouteConstants.CURRENCY).navigation();
RechargeDialogFragment.show(roomId, null, getActivity().getSupportFragmentManager(),"0","0");
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("GiftLotteryDFragment","点击了" + viewName );
}
private void setBackground() {

View File

@@ -190,14 +190,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
private void onClick(View view) {
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("roomUserInfoFragment","点击了" + viewName );
if (id == R.id.room_m_cz) {
if (mBinding.roomMCz.getText().equals("上麦")) {
MvpPre.applyPit(room_id, "");
@@ -281,6 +274,15 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
dismiss();
}
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("roomUserInfoFragment","点击了" + viewName );
}
/**
@@ -559,8 +561,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
mBinding.tvCpNum.setText(String.valueOf(xd));
}
mBinding.cpAnim.setMute(true);
mBinding.cpAnim.setSource(userInfo.getCp_info().pendant, 1);
if (userInfo.getProfile().isEmpty()) {
mBinding.jianj.setText("");
mBinding.jianj.setVisibility(GONE);

View File

@@ -252,14 +252,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
private void onClick(View view) {
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("tourClubDFragment","点击了" + viewName );
if (id == R.id.tv_jc) {
if (giftLists != null && !giftLists.isEmpty()) {
PrizePoolDialog prizePoolDialog = new PrizePoolDialog(ActivityUtils.getTopActivity());
@@ -327,6 +320,15 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
mBinding.vCheckbox.setSelected(!mBinding.vCheckbox.isSelected());
vCheckbox=mBinding.vCheckbox.isSelected();
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("tourClubDFragment","点击了" + viewName );
}
@Override

View File

@@ -165,14 +165,7 @@ public class WheatFeedingDialogFragment extends BaseMvpDialogFragment<WheatPrese
private void onClick(View view) {
int id = view.getId();
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("wheatFeedingDF","点击了" + viewName );
if (id == R.id.tv_3) {
if (mBinding.tv3.getText().equals("设置")) {
RoomWheatGiftSettingFragment.show(roomId, getChildFragmentManager());
@@ -195,6 +188,14 @@ public class WheatFeedingDialogFragment extends BaseMvpDialogFragment<WheatPrese
} else if (id == R.id.tv_qk) {
MvpPre.clearApply(roomId);
}
// 通过 ID 获取资源名称
String viewName = "";
try {
viewName = view.getContext().getResources().getResourceEntryName(id);
} catch (Exception e) {
viewName = "未知View ID: " + id;
}
LogUtils.e("wheatFeedingDF","点击了" + viewName );
}
/**

View File

@@ -69,9 +69,10 @@ class RoomMentorShipWheatView : BaseWheatView {
"9" -> {
if (bean.user_id != "0") {
mCharmView.visibility = VISIBLE
mTvName.visibility = GONE
hostTv?.visibility = VISIBLE
mTvName.visibility = VISIBLE
hostTv?.visibility = GONE
hostTv?.text = bean.nickname
mTvName?.text = bean.nickname
} else {
mTvName.visibility = VISIBLE
mCharmView.visibility = GONE

View File

@@ -168,8 +168,9 @@
<ImageView
android:id="@+id/iv_experience_bg"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/icon_heart_ex_bg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -18,7 +18,7 @@
app:layout_constraintGuide_begin="@dimen/dp_8" />
<ImageView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/icon_mentor_ship_bg"
@@ -39,61 +39,66 @@
<ImageView
android:id="@+id/iv_help"
android:paddingEnd="@dimen/dp_10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="@dimen/dp_10"
android:src="@mipmap/icon_heart_help"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/gl_top" />
<TextView
android:id="@+id/tv_time"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="倒计时 00:00"
android:textColor="@color/white"
android:textSize="@dimen/sp_12"
android:visibility="invisible"
android:orientation="horizontal"
android:layout_marginTop="@dimen/dp_2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
app:layout_constraintTop_toBottomOf="@id/tv_title">
<TextView
android:id="@+id/tv_time_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_3"
android:background="@drawable/shape_15"
android:backgroundTint="#3ABC6D"
android:gravity="center"
android:paddingHorizontal="@dimen/dp_8"
android:paddingVertical="@dimen/dp_1"
android:text="开始"
android:textColor="@color/white"
android:textSize="@dimen/sp_13"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tv_time"
app:layout_constraintEnd_toStartOf="@id/tv_time"
app:layout_constraintTop_toTopOf="@id/tv_time" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="倒计时 00:00"
android:textColor="@color/white"
android:textSize="@dimen/sp_12"
android:visibility="gone" />
<TextView
android:id="@+id/tv_time_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_3"
android:background="@drawable/shape_15"
android:backgroundTint="#3ABC6D"
android:gravity="center"
android:paddingHorizontal="@dimen/dp_8"
android:paddingVertical="@dimen/dp_1"
android:text="开始"
android:textColor="@color/white"
android:textSize="@dimen/sp_13"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@id/tv_time"
app:layout_constraintEnd_toStartOf="@id/tv_time"
app:layout_constraintTop_toTopOf="@id/tv_time" />
<TextView
android:id="@+id/tv_time_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_3"
android:background="@drawable/shape_15"
android:backgroundTint="#33FFFFFF"
android:gravity="center"
android:paddingHorizontal="@dimen/dp_8"
android:paddingVertical="@dimen/dp_1"
android:text="结束"
android:textColor="@color/white"
android:textSize="@dimen/sp_13"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@id/tv_time"
app:layout_constraintStart_toEndOf="@id/tv_time"
app:layout_constraintTop_toTopOf="@id/tv_time" />
<TextView
android:id="@+id/tv_time_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_3"
android:background="@drawable/shape_15"
android:backgroundTint="#33FFFFFF"
android:gravity="center"
android:paddingHorizontal="@dimen/dp_8"
android:paddingVertical="@dimen/dp_1"
android:text="结束"
android:textColor="@color/white"
android:textSize="@dimen/sp_13"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tv_time"
app:layout_constraintStart_toEndOf="@id/tv_time"
app:layout_constraintTop_toTopOf="@id/tv_time" />
</LinearLayout>
<com.xscm.modulemain.widget.RoomMentorShipWheatView
@@ -101,7 +106,7 @@
android:layout_width="@dimen/dp_42"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_10"
app:layout_constraintDimensionRatio="1:1.25"
app:layout_constraintDimensionRatio="1:1.42"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/gl_top" />
@@ -148,16 +153,22 @@
android:layout_height="wrap_content"
app:constraint_referenced_ids="view_left_price,iv_left_price_gold_bg,tv_left_price_top,tv_left_price" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_left_price_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.3" />
<View
android:id="@+id/view_left_price"
android:layout_width="@dimen/dp_84"
android:layout_height="@dimen/dp_86"
android:layout_height="@dimen/dp_75"
android:background="@drawable/shape_dialog"
android:backgroundTint="#33000000"
app:layout_constraintEnd_toStartOf="@id/iv_apply_for_mai"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/gl_left_price" />
app:layout_constraintTop_toTopOf="@id/gl_left_price_2" />
<ImageView
@@ -181,10 +192,10 @@
android:text="起拍价格"
android:textColor="@color/black"
android:textSize="@dimen/sp_10"
app:layout_constraintBottom_toBottomOf="@id/gl_left_price"
app:layout_constraintBottom_toBottomOf="@id/gl_left_price_2"
app:layout_constraintEnd_toStartOf="@id/iv_apply_for_mai"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/gl_left_price" />
app:layout_constraintTop_toTopOf="@id/gl_left_price_2" />
<TextView
android:id="@+id/tv_left_price"

View File

@@ -3,6 +3,7 @@
// build.gradle (Project-level)
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
@@ -16,7 +17,7 @@ buildscript {
// ✅ 添加 ARouter 插件依赖
classpath 'com.alibaba:arouter-register:1.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
}
}

View File

@@ -63,3 +63,4 @@ include ':tuicore'
//include ':moduleroom'
include ':Loadinglibrary'
include 'locktableview'
include ':animplayer'