1:修改测试出来的bug,关于:身价、我的家族、歌手认证、挚友、房间心跳、
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package com.xscm.modulemain.activity.room.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.os.Vibrator
|
||||
import android.view.Gravity
|
||||
import android.view.HapticFeedbackConstants
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.PopupWindow
|
||||
@@ -411,7 +414,6 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
override fun signCoinList(list: List<String>) {
|
||||
MvpPre!!.wallet(list)
|
||||
}
|
||||
|
||||
override fun wallet(list: List<String>, walletBean: WalletBean?) {
|
||||
if (dialogMentorShip == null) {
|
||||
dialogMentorShip = DialogMentorShip(ActivityUtils.getTopActivity())
|
||||
@@ -419,6 +421,10 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
|
||||
dialogMentorShip?.show(list, mSignPitBean, walletBean,
|
||||
object : DialogMentorShip.OnItemClickListener {
|
||||
override fun onItemClick(coin: String) {
|
||||
// 触发轻微震动
|
||||
view?.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY)
|
||||
|
||||
|
||||
MvpPre!!.signCoin(mSignId!!, coin)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -164,7 +164,7 @@ public class NobleDetailsActivity extends BaseMvpActivity<NobleTitlePresenter, A
|
||||
mBinding.tvNobleMob.setText(nobilitLists.getPay_price()+" / "+nobilitLists.getDay()+"天");
|
||||
|
||||
gridView.setAdapter(mGiftWallAdapter);
|
||||
lid=nobilitLists.getLid()+"";
|
||||
|
||||
// 观察数据变化并更新 GridView
|
||||
mGiftWallAdapter.updateData(nobilitLists.getPower().getList());
|
||||
if (position>=index){
|
||||
@@ -182,7 +182,7 @@ public class NobleDetailsActivity extends BaseMvpActivity<NobleTitlePresenter, A
|
||||
mBinding.imLjkt.setImageResource(com.xscm.moduleutil.R.mipmap.noble_h_kt);
|
||||
mBinding.imLjkt.setClickable( false);
|
||||
}
|
||||
|
||||
// lid=nobilitLists.getLid()+"";
|
||||
xlid=nobilitLists.getLid()+"";
|
||||
}
|
||||
private void applyGradientToTextView(TextView textView) {
|
||||
|
||||
@@ -24,12 +24,16 @@ import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.user.conacts.SingerVerificationContract;
|
||||
import com.xscm.modulemain.activity.user.presenter.SingerVerificationPresenter;
|
||||
import com.xscm.modulemain.databinding.ActivitySingerVerificationBinding;
|
||||
import com.xscm.modulemain.dialog.DialogWebView;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.widget.CustomTopBar;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -180,6 +184,16 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("歌手认证");
|
||||
mBinding.topBar.setColor(getResources().getColor(R.color.white));
|
||||
mBinding.topBar.setRightIcon(R.mipmap.icon_heart_help);
|
||||
mBinding.topBar.setImgPaddingRight(35);
|
||||
mBinding.topBar.setRightImgVIsible(true);
|
||||
mBinding.topBar.addIntentListener(new CustomTopBar.OnCallBackRightIcon() {
|
||||
@Override
|
||||
public void onIntent() {
|
||||
DialogWebView dialogWebView=new DialogWebView(ActivityUtils.getTopActivity());
|
||||
dialogWebView.show(CommonAppContext.getInstance().currentEnvironment.getServerUrl()+"api/Page/page_show?id=33");
|
||||
}
|
||||
});
|
||||
isSinger= getIntent().getIntExtra("isSinger",-1);
|
||||
if (isSinger==-1){
|
||||
mBinding.clCorner.setVisibility(VISIBLE);
|
||||
@@ -330,6 +344,8 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
if (recordingSegments.size() > 1) {
|
||||
// 如果有多个录音片段,合并它们
|
||||
mergeAudioFiles();
|
||||
// 更新录音时长为所有片段的总时长
|
||||
updateRecordingDuration();
|
||||
} else if (recordingSegments.size() == 1) {
|
||||
// 只有一个录音片段,直接使用
|
||||
recordingFile = recordingSegments.get(0);
|
||||
@@ -373,9 +389,11 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查录音时长是否达到最小要求(60秒)
|
||||
if (recordingDuration < 60 * 1000) {
|
||||
Toast.makeText(this, "录音时间太短,请至少录制60秒", Toast.LENGTH_SHORT).show();
|
||||
// 移除试听时间限制,允许试听任何长度的录音
|
||||
if (recordingDuration <= 0) {
|
||||
Toast.makeText(this, "没有可试听的内容", Toast.LENGTH_SHORT).show();
|
||||
mBinding.playButton.setText("试听");
|
||||
mBinding.playButton.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.but_st, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -523,7 +541,7 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
|
||||
// 检查录音时长是否达到最小要求(60秒)
|
||||
if (recordingDuration < 60 * 1000) {
|
||||
Toast.makeText(this, "录音时间太短,请至少录制60秒", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, "录音时间不足60秒,无法提交认证", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -819,6 +837,31 @@ public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificati
|
||||
}, 2000); // 延迟2秒删除,确保合并文件已经完全写入
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新录音时长为所有片段的总时长
|
||||
* 当合并多个录音片段后,需要更新总的录音时长
|
||||
*/
|
||||
private void updateRecordingDuration() {
|
||||
if (recordingFile == null || !recordingFile.exists()) {
|
||||
Log.e("SingerVerification", "录音文件不存在,无法更新时长");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// 使用MediaPlayer获取文件时长
|
||||
MediaPlayer mp = new MediaPlayer();
|
||||
mp.setDataSource(recordingFile.getAbsolutePath());
|
||||
mp.prepare();
|
||||
recordingDuration = mp.getDuration();
|
||||
mp.release();
|
||||
|
||||
Log.d("SingerVerification", "更新录音时长为: " + recordingDuration + "ms");
|
||||
updateUI();
|
||||
} catch (Exception e) {
|
||||
Log.e("SingerVerification", "获取录音时长失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 这些WAV处理方法已不再需要,因为我们现在使用MediaMuxer处理M4A文件
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ class UserFamilyActivity : BaseMvpActivity<UserFamilyPresenter, ActivityUserFami
|
||||
if (type == 2) {
|
||||
ToastUtils.showLong("您还没有加入任何家族")
|
||||
// 切换回"我的家族"tab
|
||||
mBinding.tabLayout.selectTab(mBinding.tabLayout.getTabAt(0))
|
||||
// mBinding.tabLayout.selectTab(mBinding.tabLayout.getTabAt(0))
|
||||
} else {
|
||||
ToastUtils.showLong("没有数据")
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import com.xscm.modulemain.activity.user.conacts.SingerVerificationContract;
|
||||
import com.xscm.modulemain.activity.user.presenter.SingerVerificationPresenter;
|
||||
import com.xscm.modulemain.databinding.ActivityUserPlaylistBinding;
|
||||
import com.xscm.modulemain.dialog.CustomInputDialog;
|
||||
import com.xscm.modulemain.dialog.DialogWebView;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
|
||||
@@ -80,8 +82,11 @@ public class UserPlaylistActivity extends BaseMvpActivity<SingerVerificationPres
|
||||
}
|
||||
});
|
||||
customInputDialog.show();
|
||||
});
|
||||
|
||||
|
||||
mBinding.imHelp.setOnClickListener(v -> {
|
||||
new DialogWebView(this).show(CommonAppContext.getInstance().currentEnvironment.getServerUrl()
|
||||
+ "api/Page/page_show?id=34");
|
||||
});
|
||||
|
||||
// 设置删除点击事件
|
||||
|
||||
@@ -36,7 +36,10 @@ class JoinedFamilyFragment(var data: MyFamilyBean) : BaseFragment<FragmentJoined
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
myFamily1(data)
|
||||
// 确保data不为null再调用myFamily1
|
||||
if (data != null) {
|
||||
myFamily1(data)
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
@@ -81,43 +84,77 @@ class JoinedFamilyFragment(var data: MyFamilyBean) : BaseFragment<FragmentJoined
|
||||
*/
|
||||
fun setMyFamilyBean(myBean: MyFamilyBean) {
|
||||
this.myFamilyBean = myBean
|
||||
|
||||
myFamily1(myBean)
|
||||
}
|
||||
|
||||
fun myFamily1(data: MyFamilyBean) {
|
||||
if (data == null) return
|
||||
|
||||
myFamilyBean= data
|
||||
userId = data.user_id
|
||||
dataList.clear()
|
||||
dataList.addAll(data.group_members_lists)
|
||||
|
||||
mBinding.headView.setData(data.group_owner_info?.avatar,data.group_owner_info?.dress,data.group_owner_info?.nobility_image)
|
||||
mBinding.tvUserName.text = data.group_owner_info?.nickname
|
||||
if (data.group_owner_info?.nickname_color?.isNotEmpty()==true){
|
||||
mBinding.tvUserName.startColor = Color.parseColor(data.group_owner_info?.nickname_color)
|
||||
mBinding.tvUserName.shineColor = Color.parseColor(data.group_owner_info?.nickname_color)
|
||||
mBinding.tvUserName.endColor = Color.parseColor(data.group_owner_info?.nickname_color)
|
||||
mBinding.tvUserName.isShine = true
|
||||
mBinding.tvUserName.shineType = 0
|
||||
// 安全地处理group_owner_info可能为null的情况
|
||||
val groupOwnerInfo = data.group_owner_info
|
||||
if (groupOwnerInfo == null || groupOwnerInfo.nickname.isNullOrEmpty()) {
|
||||
mBinding.clZu.visibility = View.GONE
|
||||
mBinding.tvMeJz.visibility= View.GONE
|
||||
} else {
|
||||
mBinding.clZu.visibility = View.VISIBLE
|
||||
mBinding.tvMeJz.visibility= View.VISIBLE
|
||||
}
|
||||
|
||||
mBinding.tvUserId.setText("ID: ${data.group_owner_info?.user_code}")
|
||||
mBinding.tvZsyNum.text = data.group_earnings
|
||||
mBinding.tvSignNum.setText("群组人数:${data.group_members_num}")
|
||||
// 安全地设置headView数据
|
||||
if (groupOwnerInfo != null) {
|
||||
mBinding.headView.setData(
|
||||
groupOwnerInfo.avatar,
|
||||
groupOwnerInfo.dress,
|
||||
groupOwnerInfo.nobility_image
|
||||
)
|
||||
}
|
||||
// 安全地设置用户名
|
||||
mBinding.tvUserName.text = groupOwnerInfo?.nickname ?: ""
|
||||
|
||||
adapter = MyFamilyAdapter(activity!!,userId, R.layout.item_family_members, dataList)
|
||||
mBinding.recyclerView.adapter = adapter
|
||||
val commonEmptyView = CommonEmptyView(activity!!)
|
||||
commonEmptyView.setImg(R.mipmap.ic_empty)
|
||||
commonEmptyView.setTextColor(getResources().getColor(com.xscm.moduleutil.R.color.color_FFBDBDBC))
|
||||
adapter?.bindToRecyclerView(mBinding.recyclerView)
|
||||
adapter?.setEmptyView(commonEmptyView)
|
||||
adapter?.setOnItemChildClickListener { adapter, view, position ->
|
||||
if (view.id == R.id.iv_head) {
|
||||
val item = dataList[position]
|
||||
val intent = Intent(activity, UserHomepageActivity::class.java)
|
||||
intent.putExtra("userId", item.user_id.toString() + "")
|
||||
startActivity(intent)
|
||||
// 安全地设置用户名颜色
|
||||
if (groupOwnerInfo != null && !groupOwnerInfo.nickname_color.isNullOrEmpty()) {
|
||||
try {
|
||||
mBinding.tvUserName.startColor = Color.parseColor(groupOwnerInfo.nickname_color)
|
||||
mBinding.tvUserName.shineColor = Color.parseColor(groupOwnerInfo.nickname_color)
|
||||
mBinding.tvUserName.endColor = Color.parseColor(groupOwnerInfo.nickname_color)
|
||||
mBinding.tvUserName.isShine = true
|
||||
mBinding.tvUserName.shineType = 0
|
||||
} catch (e: IllegalArgumentException) {
|
||||
// 如果颜色解析失败,使用默认颜色
|
||||
e.printStackTrace()
|
||||
mBinding.tvUserName.setTextColor(Color.parseColor("#212121"))
|
||||
mBinding.tvUserName.isShine = false
|
||||
}
|
||||
}
|
||||
|
||||
// 安全地设置用户ID
|
||||
mBinding.tvUserId.setText("ID: ${groupOwnerInfo?.user_code ?: ""}")
|
||||
mBinding.tvZsyNum.text = data.group_earnings ?: "0"
|
||||
// 安全地设置群组人数
|
||||
mBinding.tvSignNum.setText("群组人数:${data.group_members_num ?: 0}")
|
||||
|
||||
// 确保activity不为null
|
||||
if (activity != null) {
|
||||
adapter = MyFamilyAdapter(activity!!, userId, R.layout.item_family_members, dataList)
|
||||
mBinding.recyclerView.adapter = adapter
|
||||
val commonEmptyView = CommonEmptyView(activity!!)
|
||||
commonEmptyView.setImg(R.mipmap.ic_empty)
|
||||
commonEmptyView.setTextColor(getResources().getColor(com.xscm.moduleutil.R.color.color_FFBDBDBC))
|
||||
adapter?.bindToRecyclerView(mBinding.recyclerView)
|
||||
adapter?.setEmptyView(commonEmptyView)
|
||||
adapter?.setOnItemChildClickListener { adapter, view, position ->
|
||||
if (view.id == R.id.iv_head) {
|
||||
val item = dataList[position]
|
||||
val intent = Intent(activity, UserHomepageActivity::class.java)
|
||||
intent.putExtra("userId", item.user_id.toString() + "")
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,8 +205,9 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
break;
|
||||
case 2:
|
||||
AdaptiveImageView emojiImageView = helper.getView(com.xscm.moduleutil.R.id.im_emj);
|
||||
emojiImageView.setTag("");
|
||||
// 清除之前的图片加载任务,防止图片显示在错误的位置
|
||||
Glide.with(mContext).clear(emojiImageView);
|
||||
emojiImageView.setTag(null);
|
||||
emojiImageView.setVisibility(View.VISIBLE);
|
||||
helper.getView(com.xscm.moduleutil.R.id.tv_content).setVisibility(View.GONE);
|
||||
|
||||
@@ -214,6 +215,9 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
avatar.setData(emMessage.getText().getFromUserInfo().getAvatar(), "", emMessage.getText().getFromUserInfo().getNobility_image());
|
||||
// ImageUtils.loadHeadCC(emMessage.getText().getFromUserInfo().getAvatar(), helper.getView(com.xscm.moduleutil.R.id.avatar));
|
||||
ShineTextView tvName = helper.getView(com.xscm.moduleutil.R.id.tv_name);
|
||||
// 先重置tvName状态,防止复用时出现混乱
|
||||
tvName.setShine(false);
|
||||
tvName.clearAnimation();
|
||||
tvName.setText(emMessage.getText().getFromUserInfo().getNickname());
|
||||
|
||||
if (!emMessage.getText().getFromUserInfo().getNickname_color().isEmpty()) {
|
||||
@@ -222,6 +226,12 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
tvName.setEndColor(Color.parseColor(emMessage.getText().getFromUserInfo().getNickname_color()));
|
||||
tvName.setShine(true);
|
||||
tvName.setShineType(0);
|
||||
}else {
|
||||
tvName.setStartColor(Color.parseColor("#FFFFFFFF"));
|
||||
tvName.setShineColor(Color.parseColor("#FFFFFFFF"));
|
||||
tvName.setEndColor(Color.parseColor("#FFFFFFFF"));
|
||||
tvName.setShine(true);
|
||||
tvName.setShineType(1);
|
||||
}
|
||||
|
||||
// helper.setTextColor(com.xscm.moduleutil.R.id.tv_name, emMessage.getText().getFromUserInfo().getNickname_color() != null && !emMessage.getText().getFromUserInfo().getNickname_color().isEmpty() ? Color.parseColor(emMessage.getText().getFromUserInfo().getNickname_color()) : Color.parseColor("#CCA882"));
|
||||
@@ -249,6 +259,11 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
}
|
||||
}
|
||||
|
||||
// 为聊天气泡设置唯一标识,防止异步加载后应用到错误的视图
|
||||
String bubbleId = emMessage.getRoomId() + "_" + helper.getLayoutPosition() + "_bubble";
|
||||
View bubbleView = helper.getView(com.xscm.moduleutil.R.id.bubble);
|
||||
bubbleView.setTag(bubbleId);
|
||||
|
||||
if (emMessage.getText().getFromUserInfo().getChat_bubble() != null && !emMessage.getText().getFromUserInfo().getChat_bubble().isEmpty()) {
|
||||
// 使用 Glide 加载图片并设置名称
|
||||
String imageUrl = emMessage.getText().getFromUserInfo().getChat_bubble();
|
||||
@@ -257,30 +272,39 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
.into(new SimpleTarget<Drawable>() {
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||
// 将资源转换为 Bitmap
|
||||
if (resource instanceof BitmapDrawable) {
|
||||
Bitmap bitmap = ((BitmapDrawable) resource).getBitmap();
|
||||
// 创建新的文件名
|
||||
Drawable fakeNinePatch = new FakeNinePatchDrawable(bitmap, 0.4f, 0.4f, 0.6f, 0.5f);
|
||||
// 检查视图是否仍属于当前数据项
|
||||
if (bubbleId.equals(bubbleView.getTag())) {
|
||||
// 将资源转换为 Bitmap
|
||||
if (resource instanceof BitmapDrawable) {
|
||||
Bitmap bitmap = ((BitmapDrawable) resource).getBitmap();
|
||||
// 创建新的文件名
|
||||
Drawable fakeNinePatch = new FakeNinePatchDrawable(bitmap, 0.4f, 0.4f, 0.6f, 0.5f);
|
||||
|
||||
// 保存图片到本地
|
||||
helper.getView(com.xscm.moduleutil.R.id.bubble).setBackground(fakeNinePatch);
|
||||
// 设置背景
|
||||
bubbleView.setBackground(fakeNinePatch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
// 加载失败处理
|
||||
// 检查视图是否仍属于当前数据项
|
||||
if (bubbleId.equals(bubbleView.getTag())) {
|
||||
// 加载失败时使用默认背景
|
||||
bubbleView.setBackgroundResource(com.xscm.moduleutil.R.drawable.ease_row_pubilc_user_bg);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
helper.getView(com.xscm.moduleutil.R.id.bubble).setBackgroundResource(com.xscm.moduleutil.R.drawable.ease_row_pubilc_user_bg);
|
||||
// 检查视图是否仍属于当前数据项
|
||||
if (bubbleId.equals(bubbleView.getTag())) {
|
||||
bubbleView.setBackgroundResource(com.xscm.moduleutil.R.drawable.ease_row_pubilc_user_bg);
|
||||
}
|
||||
}
|
||||
if (emMessage.getText().getEmoji() != null && emMessage.getText().getEmoji().getAnimate_image() != null) {
|
||||
|
||||
|
||||
// 为每个加载任务设置唯一标识
|
||||
String uniqueId = emMessage.getRoomId() + "_" + helper.getLayoutPosition();
|
||||
String uniqueId = emMessage.getRoomId() + "_" + helper.getLayoutPosition() + "_emoji";
|
||||
emojiImageView.setTag(uniqueId);
|
||||
|
||||
//这段代码使用 Optional 链式调用安全地获取 emMessage 中的 animate_image 字段,避免空指针异常。如果任意环节为 null,则返回空字符串。
|
||||
@@ -324,19 +348,31 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target,
|
||||
boolean isFirstResource) {
|
||||
|
||||
// 加载失败时检查视图是否仍属于当前数据项
|
||||
if (uniqueId.equals(emojiImageView.getTag())) {
|
||||
// 加载静态表情作为备选
|
||||
Glide.with(mContext)
|
||||
.load(emMessage.getText().getEmoji().getImage())
|
||||
.into(emojiImageView);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.into(emojiImageView);
|
||||
} else {
|
||||
Glide.with(mContext)
|
||||
.load(emMessage.getText().getEmoji().getImage())
|
||||
.into(emojiImageView);
|
||||
// 检查视图是否仍属于当前数据项
|
||||
if (uniqueId.equals(emojiImageView.getTag())) {
|
||||
Glide.with(mContext)
|
||||
.load(emMessage.getText().getEmoji().getImage())
|
||||
.into(emojiImageView);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 确保在非表情情况下,重置视图状态
|
||||
helper.getView(com.xscm.moduleutil.R.id.tv_content).setVisibility(View.VISIBLE);
|
||||
emojiImageView.setVisibility(View.GONE);
|
||||
// 清除可能存在的异步加载任务
|
||||
Glide.with(mContext).clear(emojiImageView);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
@@ -412,6 +448,13 @@ public class EaseChatAdapter extends BaseMultiItemQuickAdapter<EMMessageInfo, Ba
|
||||
ivCharm.setImageDrawable(null);
|
||||
Glide.with(ivCharm.getContext()).clear(ivCharm);
|
||||
}
|
||||
|
||||
// 重置tvName的闪动状态,防止复用时出现混乱
|
||||
ShineTextView tvName = holder.getView(com.xscm.moduleutil.R.id.tv_name);
|
||||
if (tvName != null) {
|
||||
tvName.setShine(false);
|
||||
tvName.clearAnimation();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class CustomInputDialog extends BaseDialog<DialogCustomInputBinding> {
|
||||
public void onGiftConfirm(String giftId, String name, String giftNum) {
|
||||
mGiftId = giftId;
|
||||
mGiftNum = giftNum;
|
||||
mBinding.tvClickable.setText(name);
|
||||
mBinding.tvClickable.setText(name+" x"+giftNum);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class UserNetWorthDialog(context: Context) :
|
||||
private fun setupViews() {
|
||||
userInfo= SpUtil.getUserInfo()
|
||||
mBinding.tv2.setText(userInfo.market_value.toString())
|
||||
mBinding.tvSlsjValue.text="收礼身价,等于 通过累计收礼的价值,每${userInfo.market_value_coin}个金币等于${userInfo.market_value_market}身价"
|
||||
}
|
||||
|
||||
private fun setupWindow() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Intent
|
||||
import android.os.IBinder
|
||||
import android.util.Log
|
||||
import com.tencent.imsdk.v2.V2TIMManager
|
||||
import com.xscm.moduleutil.base.CommonAppContext
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import java.util.*
|
||||
|
||||
@@ -21,7 +22,7 @@ class ForegroundService : Service() {
|
||||
timer?.schedule(object : TimerTask() {
|
||||
override fun run() {
|
||||
Log.d("ForegroundService", "Timer task ${logInt++}")
|
||||
RetrofitClient.getInstance().keepXintiao();
|
||||
RetrofitClient.getInstance().keepXintiao(CommonAppContext.getInstance().playId);
|
||||
}
|
||||
}, 0L, 60000L)
|
||||
}
|
||||
|
||||
@@ -22,8 +22,20 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:textColor="@color/color_666666"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_help"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/icon_heart_help"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_num"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:tint="@color/color_666666"
|
||||
android:layout_marginEnd="@dimen/dp_16"/>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -31,7 +43,7 @@
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_num"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:srlEnableLoadMore="true"
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="x1"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -246,11 +247,11 @@
|
||||
android:id="@+id/rv_my_relationship"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="@dimen/dp_200"
|
||||
tools:listitem="@layout/item_relationship_list" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
@@ -10,15 +10,14 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
<ScrollView
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
app:srlEnableLoadMore="false"
|
||||
app:srlEnableRefresh="false">
|
||||
>
|
||||
<!-- 使用 LinearLayout 作为 SmartRefreshLayout 的唯一子布局 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -26,6 +25,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_zu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r12_c5ffc9_f9e9ff_c7ecfa">
|
||||
@@ -155,6 +155,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_me_jz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@@ -178,7 +179,7 @@
|
||||
app:spanCount="1"
|
||||
tools:listitem="@layout/item_family_members" />
|
||||
</LinearLayout>
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
|
||||
@@ -10,15 +10,14 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
<ScrollView
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
app:srlEnableLoadMore="false"
|
||||
app:srlEnableRefresh="false">
|
||||
>
|
||||
<!-- 使用 LinearLayout 作为 SmartRefreshLayout 的唯一子布局 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -178,6 +177,6 @@
|
||||
app:spanCount="1"
|
||||
tools:listitem="@layout/item_family_members" />
|
||||
</LinearLayout>
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_dialog_u_cp_left_top"
|
||||
android:gravity="center"
|
||||
android:text="CP"
|
||||
android:text="心动"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -54,6 +54,14 @@
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="@dimen/dp_21"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
tools:src="@mipmap/arrow_right"
|
||||
android:scaleType="fitCenter"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@@ -64,7 +72,7 @@
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:drawableLeft="@mipmap/jinb"
|
||||
android:gravity="end|center_vertical"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="价值" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user