1:修改播放礼物特效
2:修改特效按照ios方式更改
This commit is contained in:
@@ -55,7 +55,7 @@ android {
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
@@ -77,7 +77,7 @@ android {
|
||||
|
||||
debug {
|
||||
debuggable true
|
||||
minifyEnabled false
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.debug
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ isBuildModule=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.0.0
|
||||
APP_VERSION_CODE=121
|
||||
APP_VERSION_CODE=125
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
|
||||
@@ -44,6 +44,8 @@ import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
@@ -121,7 +123,7 @@ public class AvatarFrameView extends FrameLayout {
|
||||
private ChannelSplitRenderer1 renderer;
|
||||
private int mType;//1:循环播放 2:播放一次停止播放
|
||||
private File mFile;
|
||||
private final Queue<PlayItem> playQueue = new LinkedList<>();
|
||||
private final BlockingQueue<PlayItem> playQueue = new LinkedBlockingQueue<>();
|
||||
|
||||
private boolean isPlaying = false;
|
||||
// 添加销毁标记
|
||||
@@ -224,7 +226,7 @@ public class AvatarFrameView extends FrameLayout {
|
||||
return "";
|
||||
}
|
||||
|
||||
private void playNextFromQueue() {
|
||||
public void playNextFromQueue() {
|
||||
// if (isDestroyed) return;
|
||||
// 确保在主线程中执行
|
||||
// if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||
@@ -238,10 +240,13 @@ public class AvatarFrameView extends FrameLayout {
|
||||
return;
|
||||
}
|
||||
// 检查是否可以开始新的播放
|
||||
if (!playbackManager.canStartNewPlayback()) {
|
||||
Logger.d("AvatarFrameView", "Max concurrent playbacks reached, waiting...");
|
||||
return;
|
||||
}
|
||||
// if (!playbackManager.canStartNewPlayback()) {
|
||||
// Logger.d("AvatarFrameView", "Max concurrent playbacks reached, waiting...");
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (!isPlaying || !isActuallyPlaying()) {
|
||||
|
||||
|
||||
PlayItem item = playQueue.poll();
|
||||
if (item != null) {
|
||||
@@ -257,14 +262,17 @@ public class AvatarFrameView extends FrameLayout {
|
||||
Logger.d("AvatarFrameView", "Queue is empty, stop playing");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 添加统一的播放完成处理方法
|
||||
public void onPlaybackComplete() {
|
||||
if (isDestroyed) return;
|
||||
mainHandler.post(() -> {
|
||||
// 再次检查是否已销毁
|
||||
if (isDestroyed) return;
|
||||
|
||||
// 通知播放管理器播放完成
|
||||
playbackManager.onFinishPlayback();
|
||||
// // 通知播放管理器播放完成
|
||||
// playbackManager.onFinishPlayback();
|
||||
|
||||
// 重置播放状态
|
||||
isPlaying = false;
|
||||
@@ -280,19 +288,25 @@ public class AvatarFrameView extends FrameLayout {
|
||||
|
||||
private void processPlayItem(PlayItem item) {
|
||||
try {
|
||||
clearPrevious();
|
||||
// clearPrevious();
|
||||
|
||||
String ext = getFileExtension(item.url);
|
||||
if ("svga".equalsIgnoreCase(ext)) {
|
||||
mainHandler.post(() -> {
|
||||
renderType = RenderType.SVGA;
|
||||
mType = item.type;
|
||||
if (mBinding != null) {
|
||||
mBinding.playView.setVisibility(View.GONE);
|
||||
}
|
||||
loadSVGA(item.url);
|
||||
} );
|
||||
} else if ("mp4".equalsIgnoreCase(ext)) {
|
||||
mainHandler.post(() -> {
|
||||
renderType = RenderType.MP4;
|
||||
mType = item.type;
|
||||
mBinding.playView.setVisibility(View.VISIBLE);
|
||||
downloadAndPlayMp4(item.url);
|
||||
} );
|
||||
} else {
|
||||
// 不支持的格式,直接完成
|
||||
handlePlaybackComplete();
|
||||
@@ -315,8 +329,11 @@ public class AvatarFrameView extends FrameLayout {
|
||||
}
|
||||
|
||||
public boolean isPlaying() {
|
||||
if (mBinding!=null && mBinding.playView!=null) {
|
||||
return mBinding.playView.isRunning();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// 在 AvatarFrameView 类中添加以下代码
|
||||
|
||||
private static final int MAX_CONCURRENT_PROCESSING = 3; // 同时处理的最大动画数
|
||||
@@ -330,24 +347,12 @@ public class AvatarFrameView extends FrameLayout {
|
||||
mainHandler.post(() -> setSource(url, type2));
|
||||
return;
|
||||
}
|
||||
// // 检查内存状态
|
||||
// if (isMemoryLow()) {
|
||||
// LogUtils.w(TAG, "Low memory, skipping animation");
|
||||
// clearQueue();
|
||||
// return;
|
||||
// }
|
||||
// 检查特效是否开启
|
||||
// if (SpUtil.getOpenEffect() != 1) {
|
||||
// // 特效关闭时清空队列并停止播放
|
||||
// clearQueue();
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 添加到播放队列
|
||||
playQueue.add(new PlayItem(url, type2));
|
||||
Logger.d("AvatarFrameView", "Added to queue, queue size: " + playQueue.size() + ", url: " + url);
|
||||
|
||||
if (type2 == 3) {
|
||||
if (type2 == 3 || type2 == 1) {
|
||||
// playNextFromQueue();
|
||||
loadSVGA(url);
|
||||
} else {
|
||||
@@ -461,12 +466,22 @@ public class AvatarFrameView extends FrameLayout {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
LogUtils.e("MP4下载失败: " + e.toString());
|
||||
mainHandler.post(() -> {
|
||||
// 检查是否已销毁
|
||||
if (!isDestroyed) {
|
||||
onPlaybackComplete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 更简单的优化版本
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
// 在异步回调中首先检查是否已销毁
|
||||
if (isDestroyed) {
|
||||
LogUtils.w(TAG, "View destroyed before download completed");
|
||||
return;
|
||||
}
|
||||
LogUtils.d("@@@@", "onResponse" + Thread.currentThread().getName());
|
||||
if (response.isSuccessful()) {
|
||||
try (ResponseBody responseBody = response.body()) {
|
||||
@@ -493,31 +508,62 @@ public class AvatarFrameView extends FrameLayout {
|
||||
fos.flush();
|
||||
isTxk = true;
|
||||
mainHandler.post(() -> {
|
||||
// 关键:在执行UI操作前再次检查是否已销毁
|
||||
if (downloadedFile.exists()) {
|
||||
LogUtils.d("@@@@Thread", Thread.currentThread().getName());
|
||||
playMp4File(file);
|
||||
playMp4File(downloadedFile); // 使用正确的文件引用
|
||||
} else {
|
||||
LogUtils.w(TAG, "View destroyed or file not exist after download");
|
||||
onPlaybackComplete();
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
LogUtils.e("MP4文件保存失败: " + e.getMessage());
|
||||
mainHandler.post(() -> {
|
||||
if (!isDestroyed) {
|
||||
onPlaybackComplete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
mainHandler.post(() -> onPlaybackComplete());
|
||||
mainHandler.post(() -> {
|
||||
if (!isDestroyed) {
|
||||
onPlaybackComplete();
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("MP4文件保存失败: " + e.getMessage());
|
||||
mainHandler.post(() -> onPlaybackComplete());
|
||||
mainHandler.post(() -> {
|
||||
if (!isDestroyed) {
|
||||
onPlaybackComplete();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
LogUtils.e("MP4下载响应失败");
|
||||
mainHandler.post(() -> onPlaybackComplete());
|
||||
mainHandler.post(() -> {
|
||||
if (!isDestroyed) {
|
||||
onPlaybackComplete();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
isTxk = true;
|
||||
LogUtils.e("有缓存");
|
||||
mainHandler.post(() -> {
|
||||
// 检查是否已销毁
|
||||
if ( file.exists()) {
|
||||
playMp4File(file);
|
||||
} else {
|
||||
LogUtils.w(TAG, "有缓存2222222222222");
|
||||
// onPlaybackComplete();
|
||||
}
|
||||
});
|
||||
// 直接播放缓存文件
|
||||
// if (isTxk) {
|
||||
// mBinding.playView.setLoop(1);
|
||||
@@ -528,8 +574,20 @@ public class AvatarFrameView extends FrameLayout {
|
||||
|
||||
private void playMp4File(File file) {
|
||||
try {
|
||||
if (mBinding != null && file != null && file.exists()) {
|
||||
// mBinding.playView.setAnimListener(new MP4PlaybackCallback());
|
||||
// 双重检查确保组件未被销毁
|
||||
if (isDestroyed) {
|
||||
LogUtils.w(TAG, "Attempt to play MP4 file after view destroyed");
|
||||
onPlaybackComplete();
|
||||
return;
|
||||
}
|
||||
|
||||
if (mBinding == null || mBinding.playView == null) {
|
||||
LogUtils.w(TAG, "PlayView is null");
|
||||
onPlaybackComplete();
|
||||
return;
|
||||
}
|
||||
|
||||
if (file != null && file.exists()) {
|
||||
// 设置循环次数(根据mType决定)
|
||||
if (mType == 1) {
|
||||
mBinding.playView.setLoop(0); // 无限循环
|
||||
@@ -537,9 +595,15 @@ public class AvatarFrameView extends FrameLayout {
|
||||
mBinding.playView.setLoop(1); // 播放一次
|
||||
}
|
||||
|
||||
// 开始播放
|
||||
// 开始播放前检查视图状态
|
||||
if (!isDestroyed && mBinding != null && mBinding.playView != null) {
|
||||
mBinding.playView.startPlay(file);
|
||||
} else {
|
||||
LogUtils.w(TAG, "View was destroyed before MP4 playback started");
|
||||
onPlaybackComplete();
|
||||
}
|
||||
} else {
|
||||
LogUtils.e("播放MP4文件出错: 文件不存在或已损坏");
|
||||
onPlaybackComplete();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -1265,7 +1329,7 @@ public class AvatarFrameView extends FrameLayout {
|
||||
}
|
||||
|
||||
try {
|
||||
clearPrevious(); // 清除之前的动画
|
||||
// clearPrevious(); // 清除之前的动画
|
||||
svgaSurface.setVisibility(View.VISIBLE);
|
||||
new SVGAParser(getContext()).decodeFromAssets(assetName, new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
@@ -1363,7 +1427,7 @@ public class AvatarFrameView extends FrameLayout {
|
||||
|
||||
// 内存检查
|
||||
if (playQueue.size() % 5 == 0) {
|
||||
performLightMemoryCleanup();
|
||||
// performLightMemoryCleanup();
|
||||
}
|
||||
|
||||
// 播放下一个
|
||||
|
||||
@@ -160,7 +160,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
setCardiac(pitBean.getCharm(), getTzbl());
|
||||
setPitData(bean);
|
||||
if (bean.getIs_online() == 2){
|
||||
if (bean.getIs_online() == 2 && bean.getUser_id()!=null && !bean.getUser_id().equals("0") && !bean.getUser_id().isEmpty()){
|
||||
iv_on_line.setVisibility(VISIBLE);
|
||||
}else {
|
||||
iv_on_line.setVisibility(GONE);
|
||||
|
||||
@@ -238,6 +238,16 @@ public class WheatLayoutManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void updateSingleCharm(RoomPitBean pitBean, int pitNumber) {
|
||||
if (pitList == null || pitList.isEmpty() || pitNumber < 1 || pitNumber > 10) return;
|
||||
if (isSingleMode && this.currentSinglePit != pitNumber) return;
|
||||
|
||||
RoomDefaultWheatView wheatView = findWheatViewByPitNumber(pitNumber);
|
||||
if (wheatView != null) {
|
||||
wheatView.setCharm(pitBean.getCharm());
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private RoomDefaultWheatView findWheatViewByPitNumber(int pitNumber) {
|
||||
for (int i = 0; i < container.getChildCount(); i++) {
|
||||
|
||||
@@ -402,6 +402,24 @@ public class WheatLayoutSingManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void upDataCharm(RoomPitBean pitBean, int pitNumber){
|
||||
// 检查容器状态
|
||||
if (container == null || !isContainerValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pitList == null || pitList.isEmpty() || pitNumber < 1 || pitNumber > 10) return;
|
||||
|
||||
// 如果是单个展示模式且不是当前麦位,不处理
|
||||
if (isSingleMode && this.currentSinglePit != pitNumber) return;
|
||||
|
||||
RoomSingSongWheatView wheatView = findWheatViewByPitNumber(pitNumber);
|
||||
if (wheatView != null) {
|
||||
RoomPitBean bean = pitBean;
|
||||
wheatView.setCharm(bean.getCharm()); // 刷新数据
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private RoomSingSongWheatView findWheatViewByPitNumber(int pitNumber) {
|
||||
// 检查容器状态
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintHeight_percent="1"
|
||||
app:layout_constraintWidth_percent="1.05"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
app:layout_constraintStart_toStartOf="@id/riv"
|
||||
|
||||
@@ -370,6 +370,9 @@ public class HomePresenter extends BasePresenter<HomeContacts.View> implements H
|
||||
|
||||
@Override
|
||||
public void onNext(ThemeBean themeBean) {
|
||||
if (MvpRef==null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getThemeData(themeBean);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -139,6 +139,8 @@ import com.xscm.moduleutil.utils.SystemUtils;
|
||||
import com.xscm.moduleutil.widget.AvatarFrameView;
|
||||
import com.xscm.moduleutil.widget.CircularProgressView;
|
||||
import com.xscm.moduleutil.widget.CustomMusicFloatingView;
|
||||
import com.xscm.moduleutil.widget.GiftAnimView;
|
||||
import com.xscm.moduleutil.widget.QXGiftPlayerManager;
|
||||
import com.xscm.moduleutil.widget.SilentCountDownTimer;
|
||||
import com.xscm.moduleutil.widget.ViewUtils;
|
||||
import com.xscm.moduleutil.widget.floatingView.Floa;
|
||||
@@ -158,6 +160,8 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -301,6 +305,61 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
}
|
||||
}
|
||||
|
||||
private View bgEffectView;
|
||||
|
||||
private void setupEffectView() {
|
||||
if (bgEffectView == null) {
|
||||
// 获取单例管理器
|
||||
QXGiftPlayerManager manager = QXGiftPlayerManager.getInstance(getApplicationContext());
|
||||
|
||||
// 获取背景特效视图并添加到布局中
|
||||
bgEffectView = manager.getDefaultBgEffectView();
|
||||
// 找到 mBinding.svgaGift 的父容器
|
||||
ViewParent parent = mBinding.svgaGift.getParent();
|
||||
if (parent instanceof ViewGroup) {
|
||||
ViewGroup parentViewGroup = (ViewGroup) parent;
|
||||
|
||||
// 将 bgEffectView 添加到父容器中,位置在 mBinding.svgaGift 之后
|
||||
int index = parentViewGroup.indexOfChild(mBinding.svgaGift);
|
||||
parentViewGroup.addView(bgEffectView);
|
||||
|
||||
// 设置布局参数 - 填满父视图
|
||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
|
||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||
FrameLayout.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
bgEffectView.setLayoutParams(params);
|
||||
} else {
|
||||
LogUtils.e("mBinding.svgaGift 没有有效的父容器");
|
||||
return;
|
||||
}
|
||||
// 获取全屏特效视图
|
||||
GiftAnimView fullEffectView = manager.getDefaultFullEffectView();
|
||||
|
||||
// 设置全屏特效视图的布局参数 - 居中并设置尺寸
|
||||
FrameLayout.LayoutParams fullParams = new FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
fullParams.gravity = Gravity.CENTER;
|
||||
fullEffectView.setLayoutParams(fullParams);
|
||||
|
||||
// 获取聊天特效视图
|
||||
GiftAnimView chatEffectView = manager.getDefaultChatEffectView();
|
||||
|
||||
// 设置聊天特效视图的布局参数 - 底部居中并设置尺寸
|
||||
FrameLayout.LayoutParams chatParams = new FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
chatParams.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
|
||||
chatEffectView.setLayoutParams(chatParams);
|
||||
}
|
||||
|
||||
// 从SharedPreferences获取是否关闭特效的设置
|
||||
boolean isClose = SpUtil.getOpenEffect() != 1;
|
||||
QXGiftPlayerManager.getInstance(getApplicationContext()).openOrCloseEffectViewWith(!isClose);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
@@ -317,6 +376,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
|
||||
/// 最小化
|
||||
private void showExitRoomDialog() {
|
||||
ExitRoomBottomSheet bottomSheet = ExitRoomBottomSheet.newInstance();
|
||||
@@ -446,18 +506,23 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
//
|
||||
// @Override
|
||||
// public String doInBackground() throws Throwable {
|
||||
// LogUtils.e("@@@@" + "doInBackground"+"playQueue.size()===="+playQueue.size());
|
||||
// if(!playQueue.isEmpty()){
|
||||
// return playQueue.poll();
|
||||
// if (mBinding.svgaGift.isPlaying()){
|
||||
// Thread.sleep(100); // 短暂等待
|
||||
// return "";
|
||||
// }
|
||||
// if(!roomMessageEventQueue.isEmpty()){
|
||||
// Thread.sleep(100); // 短暂等待
|
||||
// return roomMessageEventQueue.poll();
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(String result) {
|
||||
// LogUtils.e("@@@@" + "onSuccess"+"playQueue.size()===="+playQueue.size());
|
||||
// LogUtils.e("@@@@" + "onSuccess"+"playQueue.size()===="+roomMessageEventQueue.size());
|
||||
// if(!TextUtils.isEmpty(result)){
|
||||
// mBinding.svgaGift.setSource(result, 2);
|
||||
//// mBinding.svgaGift.setSource(result, 2);
|
||||
// mBinding.svgaGift.downloadAndPlayMp4(result);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@@ -487,16 +552,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// 在子线程中执行网络请求
|
||||
performNetworkRequestsAsync();
|
||||
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
|
||||
// .detectDiskReads()
|
||||
// .detectDiskWrites()
|
||||
// .detectNetwork()
|
||||
// .penaltyLog()
|
||||
// .build());
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private void checkAndRestoreMinimizeState() {
|
||||
SharedPreferences prefs = getSharedPreferences("room_minimize_state", Context.MODE_PRIVATE);
|
||||
boolean isMinimized = prefs.getBoolean("is_minimized", false);
|
||||
@@ -513,6 +571,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 在子线程中执行网络请求,避免阻塞主线程
|
||||
*/
|
||||
@@ -548,18 +607,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
});
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 网络请求前的准备工作
|
||||
// */
|
||||
// private void prepareNetworkRequest() {
|
||||
// try {
|
||||
// // 可以在这里做一些轻量级的预处理工作
|
||||
// // 例如:检查网络状态、准备请求参数等
|
||||
// LogUtils.d("Preparing network request for room: " + roomId);
|
||||
// } catch (Exception e) {
|
||||
// LogUtils.e("Error in prepareNetworkRequest: " + e.getMessage());
|
||||
// }
|
||||
// }
|
||||
|
||||
// 提供安全的访问方法
|
||||
public static RoomActivity getCurrentActivity() {
|
||||
@@ -632,11 +679,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
||||
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
||||
mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
||||
|
||||
// ViewGroup.LayoutParams layoutParams2 = mBinding.vpRoomPager.getLayoutParams();
|
||||
// layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
||||
// layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
||||
// mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
||||
// MP4PlaybackCallback mp4PlaybackCallback=MP4PlaybackCallback.getInstance();
|
||||
// mp4PlaybackCallback.setAvatarFrameView(mBinding.svgaGift);
|
||||
// mBinding.svgaGift.setAnimListener(mp4PlaybackCallback);
|
||||
}
|
||||
|
||||
private void onGiftGiveProgressClcik() {
|
||||
@@ -919,16 +964,26 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
private Runnable roomSwitchRunnable;
|
||||
private String pendingRoomId;
|
||||
private String lastSwitchedRoomId = "";
|
||||
private final Object roomMessageLock = new Object();
|
||||
private BlockingQueue<String> roomMessageEventQueue = new LinkedBlockingQueue<>();
|
||||
int i = 0;
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void roomInfoEvent(RoomMessageEvent messageEvent) {
|
||||
if (messageEvent == null) return;
|
||||
|
||||
|
||||
int msgType = messageEvent.getMsgType();
|
||||
RoomMessageEvent.T text = messageEvent.getText();
|
||||
|
||||
if (msgType == 1005) {
|
||||
handleMsgType1005(messageEvent, text);
|
||||
LogUtils.e("@@@@" + "EventBusnujm2"+"playQueue.size()===="+ messageEvent.getText().getGiftInfo());
|
||||
// synchronized (roomMessageLock) {
|
||||
// roomMessageEventQueue.add(messageEvent.getText().getGiftInfo().getPlay_image());
|
||||
// }
|
||||
QXGiftPlayerManager.getInstance(this).displayFullEffectView(messageEvent.getText().getGiftInfo());
|
||||
// handleMsgType1005(messageEvent, text);
|
||||
hand1005(messageEvent, text);
|
||||
} else if (msgType == 123) {
|
||||
EventBus.getDefault().post(new RoomSettingEvent());
|
||||
} else if (msgType == 1014) {
|
||||
@@ -1106,7 +1161,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
}
|
||||
roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||
}
|
||||
private Queue<String> playQueue = new LinkedList<>();
|
||||
|
||||
private static volatile MP4PlaybackCallback sInstance;
|
||||
|
||||
public static class MP4PlaybackCallback implements IAnimListener {
|
||||
@@ -1127,6 +1182,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
}
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
// 设置外部引用的方法
|
||||
public void setAvatarFrameView(AvatarFrameView view) {
|
||||
this.avatarFrameView = view;
|
||||
@@ -1135,9 +1191,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
@Override
|
||||
public void onFailed(int i, @Nullable String s) {
|
||||
LogUtils.e("@@@", "MP4 playback failed: " + s);
|
||||
if (avatarFrameView != null) {
|
||||
avatarFrameView.onPlaybackComplete();
|
||||
}
|
||||
// if (avatarFrameView != null) {
|
||||
// avatarFrameView.onPlaybackComplete();
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1159,10 +1215,11 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
public void onVideoComplete() {
|
||||
LogUtils.e("@@@@" + "EventBus onVideoComplete");
|
||||
|
||||
if (avatarFrameView != null) {
|
||||
avatarFrameView.onPlaybackComplete();
|
||||
}
|
||||
EventBus.getDefault().post(new GiftAvatarBean());
|
||||
// if (avatarFrameView != null) {
|
||||
// avatarFrameView.onPlaybackComplete();
|
||||
// }
|
||||
// avatarFrameView.playNextFromQueue();
|
||||
// EventBus.getDefault().post(new GiftAvatarBean());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1172,26 +1229,24 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
}
|
||||
|
||||
|
||||
private void handleMsgType1005(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
||||
private void handleMsgType1005(String url) {
|
||||
|
||||
if (SpUtil.getOpenEffect() == 1) {
|
||||
// LogUtils.e("@@@@" + "handleMsgType1005"+"mBinding.svgaGift.isPlaying()===="+mBinding.svgaGift.isPlaying());
|
||||
// mBinding.svgaGift.setSource(url, 2);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void hand1005(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
||||
if (text == null || mRoomInfoResp == null || mRoomInfoResp.getRoom_info() == null) return;
|
||||
|
||||
GiftBean giftInfo = text.getGiftInfo();
|
||||
UserInfo toUserInfo = text.getToUserInfo();
|
||||
if (giftInfo == null || toUserInfo == null) return;
|
||||
MP4PlaybackCallback mp4PlaybackCallback=MP4PlaybackCallback.getInstance();
|
||||
mp4PlaybackCallback.setAvatarFrameView(mBinding.svgaGift);
|
||||
mBinding.svgaGift.setAnimListener(mp4PlaybackCallback);
|
||||
if (SpUtil.getOpenEffect() == 1) {
|
||||
// 特效关闭时清空队列并停止播放
|
||||
playQueue.add(giftInfo.getPlay_image());
|
||||
LogUtils.e("@@@@" + "handleMsgType1005"+"playQueue.size()===="+playQueue.size());
|
||||
|
||||
if(!mBinding.svgaGift.isPlaying()){
|
||||
LogUtils.e("@@@@" + "handleMsgType1005"+"mBinding.svgaGift.isPlaying()===="+mBinding.svgaGift.isPlaying());
|
||||
mBinding.svgaGift.setSource(playQueue.poll(), 2);
|
||||
}
|
||||
}
|
||||
|
||||
List<RoomPitBean> pitList = mRoomInfoResp.getRoom_info().getPit_list();
|
||||
if (pitList == null) return;
|
||||
|
||||
@@ -1211,35 +1266,22 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
roomFragment.SingSongEvent(messageEvent);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ("7".equals(typeId)) {//交友房
|
||||
} else if ("7".equals(typeId)) {//交友房
|
||||
roomFragment.friendshipRoomFragmentEvent(messageEvent);
|
||||
return;
|
||||
// for (RoomPitBean roomPitBean : pitList) {
|
||||
// if (roomPitBean.getUser_id().equals(toUserInfo.getUser_id() + "")) {
|
||||
// roomPitBean.setCharm(toUserInfo.getCharm());
|
||||
// try {
|
||||
// pitList.set(Integer.parseInt(roomPitBean.getPit_number()) - 1, roomPitBean);
|
||||
// } catch (NumberFormatException e) {
|
||||
// // Handle exception
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void handleGiftAvatarBean(GiftAvatarBean giftAvatarBean) {
|
||||
LogUtils.e("@@@@" + "EventBus2222222"+"playQueue.size()===="+playQueue.size());
|
||||
if(!playQueue.isEmpty()){
|
||||
String payUrl=playQueue.poll();
|
||||
if(!mBinding.svgaGift.isPlaying()){
|
||||
mBinding.svgaGift.setSource(payUrl, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// public void handleGiftAvatarBean(GiftAvatarBean giftAvatarBean) {
|
||||
// LogUtils.e("@@@@" + "EventBus2222222"+"playQueue.size()===="+roomMessageEventQueue.size());
|
||||
// if(!roomMessageEventQueue.isEmpty()){
|
||||
// String payUrl=roomMessageEventQueue.poll();
|
||||
//// if(!mBinding.svgaGift.isPlaying()){
|
||||
//// mBinding.svgaGift.setSource(payUrl, 2);
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private void handleMsgType1014(RoomMessageEvent messageEvent, RoomMessageEvent.T text) {
|
||||
if (text == null) return;
|
||||
@@ -1931,10 +1973,12 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void setEffectSwitch(EffectEvent event) {
|
||||
if (event.isEffectOn()) {//特效开启
|
||||
QXGiftPlayerManager.getInstance(this).openOrCloseEffectViewWith(true);
|
||||
mBinding.svgaGift.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
// mBinding.svgaGift.closeEffect();
|
||||
mBinding.svgaGift.closeEffect();
|
||||
// mBinding.svgaGift.closeEffect();
|
||||
QXGiftPlayerManager.getInstance(this).openOrCloseEffectViewWith(false);
|
||||
mBinding.svgaGift.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -1950,7 +1994,11 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
return;
|
||||
}
|
||||
if (roomJoinMountModel.getShow_type() != 1) {
|
||||
mBinding.svgaZuoji.setSource(roomJoinMountModel.getRide_url(), 2);
|
||||
GiftBean gift = new GiftBean();
|
||||
gift.setGift_id("");
|
||||
gift.setPlay_image(roomJoinMountModel.getRide_url());
|
||||
QXGiftPlayerManager.getInstance(this).displayChatEffectView(gift);
|
||||
// mBinding.svgaZuoji.setSource(roomJoinMountModel.getRide_url(), 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2148,6 +2196,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
// 添加前后台状态检测
|
||||
private boolean isAppInForeground() {
|
||||
ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
|
||||
@@ -2620,13 +2669,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
AgoraManager.getInstance(this).setBjMusic(true);
|
||||
}
|
||||
|
||||
// if ((roomBean.getType_id().equals("1") && roomBean.getLabel_id().equals("2")) || (roomBean.getType_id().equals("3") && roomBean.getLabel_id().equals("2")
|
||||
// || (roomBean.getType_id().equals("4") && roomBean.getLabel_id().equals("2")))) {
|
||||
// AgoraManager.getInstance(this).setBjMusic(false);
|
||||
//
|
||||
// } else {
|
||||
// AgoraManager.getInstance(this).setBjMusic(true);
|
||||
// }
|
||||
AgoraManager.getInstance(this).stopMuisc();
|
||||
initializeAudio();
|
||||
|
||||
@@ -2634,11 +2676,6 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
toutiao();
|
||||
upRoomInfo(resp);
|
||||
|
||||
// if (mRoomInfoResp.getUser_info().getPit_number() == 9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
// mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||
// }
|
||||
|
||||
if (userIds.length() > 0 && roomId != null) {
|
||||
// MvpPre.userOnlineStatus(userIds.toString(), roomId);
|
||||
@@ -2653,6 +2690,8 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
} else {
|
||||
mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
setupEffectView();
|
||||
}
|
||||
|
||||
private void instView() {//隐藏视图
|
||||
@@ -2954,6 +2993,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private void resumeRoomState() {
|
||||
// 恢复房间相关状态
|
||||
if (MvpPre != null && roomId != null) {
|
||||
@@ -3380,6 +3420,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
// 移除所有 OnClickListener 防止内存泄漏
|
||||
clearClickListeners();
|
||||
}
|
||||
roomMessageEventQueue.clear();
|
||||
ThreadUtils.cancel();
|
||||
QXGiftPlayerManager.getInstance(getApplicationContext()).destroyEffectSvga();
|
||||
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("cleanupResources error: " + e.getMessage());
|
||||
@@ -3419,11 +3462,11 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
try {
|
||||
if (mBinding != null) {
|
||||
if (mBinding.svgaGift != null) {
|
||||
mBinding.svgaGift.release();
|
||||
}
|
||||
if (mBinding.svgaZuoji != null) {
|
||||
mBinding.svgaZuoji.release();
|
||||
// mBinding.svgaGift.release();
|
||||
}
|
||||
// if (mBinding.svgaZuoji != null) {
|
||||
// mBinding.svgaZuoji.release();
|
||||
// }
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("clearSVGAResources error: " + e.getMessage());
|
||||
|
||||
@@ -234,7 +234,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getvjs();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -247,7 +247,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
public void initOverlayButtons() {
|
||||
// if (isButtonsInflated) return;
|
||||
|
||||
stub = requireActivity().findViewById(R.id.stub_buttons);
|
||||
stub = requireActivity().findViewById(R.id.stub_buttons2);
|
||||
if (stub != null) {
|
||||
View inflated = stub.inflate();
|
||||
|
||||
|
||||
@@ -438,7 +438,11 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
((RoomActivity) getActivity()).changeBackground(com.xscm.moduleutil.R.mipmap.cabin_bj);
|
||||
((RoomActivity) getActivity()).setvisibTop(false);
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")) {
|
||||
if (mRoomInfoResp.getRoom_info().getRoom_background()==null || mRoomInfoResp.getRoom_info().getRoom_background().equals("")) {
|
||||
((RoomActivity) getActivity()).changeBackground(com.xscm.moduleutil.R.mipmap.jiaoy_bj);
|
||||
}else {
|
||||
((RoomActivity) getActivity()).changeBackgroundColor(mRoomInfoResp.getRoom_info().getRoom_background());
|
||||
}
|
||||
((RoomActivity) getActivity()).setvisibTop(true);
|
||||
} else {
|
||||
((RoomActivity) getActivity()).changeBackgroundColor(mRoomInfoResp.getRoom_info().getRoom_background());
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.PopupWindow;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
@@ -835,17 +836,17 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
RoomPitBean pitBean = mBinding.muYc.pitBean;
|
||||
if ((messageEvent.getText().getToUserInfo().getUser_id() + "").equals(pitBean.getUser_id())) {
|
||||
pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
mBinding.muYc.setData(pitBean);
|
||||
mBinding.muYc.setCharm(pitBean.getCharm());
|
||||
}
|
||||
|
||||
if ((messageEvent.getText().getToUserInfo().getUser_id() + "").equals(mBinding.muZc.pitBean.getUser_id())) {
|
||||
mBinding.muZc.pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
mBinding.muZc.setData(mBinding.muZc.pitBean);
|
||||
mBinding.muZc.setCharm(mBinding.muZc.pitBean.getCharm());
|
||||
return;
|
||||
}
|
||||
if ((messageEvent.getText().getToUserInfo().getUser_id() + "").equals(mBinding.muJb.pitBean.getUser_id())) {
|
||||
mBinding.muJb.pitBean.setCharm(messageEvent.getText().getToUserInfo().getCharm());
|
||||
mBinding.muJb.setData(mBinding.muJb.pitBean);
|
||||
mBinding.muJb.setCharm(mBinding.muJb.pitBean.getCharm());
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < roomInfoResp.getSong_pit_list().size(); i++) {
|
||||
|
||||
@@ -1375,21 +1375,21 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
||||
wheatLayoutSingManager.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
wheatLayoutSingManager.upDataCharm(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (RoomPitBean pitBean : roomInfoRespPk.getRoom_info().getPit_list()) {
|
||||
if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
||||
wheatLayoutManager2.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
wheatLayoutManager2.updateSingleCharm(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
}
|
||||
}
|
||||
|
||||
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()) {
|
||||
if (pitBean.getUser_id().equals(message.getText().getToUserInfo().getUser_id() + "")) {
|
||||
pitBean.setCharm(message.getText().getToUserInfo().getCharm());
|
||||
wheatLayoutManager1.updateSingleWheat(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
wheatLayoutManager1.updateSingleCharm(pitBean, Integer.parseInt(pitBean.getPit_number()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,23 +342,32 @@
|
||||
|
||||
|
||||
<!-- </ScrollView>-->
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
<View
|
||||
android:id="@+id/svga_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/transparent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_gift"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/svga_zuoji"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.xscm.moduleutil.widget.AvatarFrameView-->
|
||||
<!-- android:id="@+id/svga_zuoji"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="0dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!--礼物连送图标-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -522,14 +522,14 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/stub_buttons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout="@layout/top_overlay_buttons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone"/>
|
||||
<!-- <ViewStub-->
|
||||
<!-- android:id="@+id/stub_buttons"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout="@layout/top_overlay_buttons"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- android:visibility="gone"/>-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
android:layout_marginTop="-55dp"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:clickable="true"
|
||||
android:elevation="10dp"
|
||||
android:elevation="9999dp"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:translationZ="30dp"
|
||||
|
||||
@@ -198,7 +198,8 @@
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r73_33fffff"
|
||||
android:layout_toEndOf="@id/btn_notice"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_qc"
|
||||
@@ -229,11 +230,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_toEndOf="@+id/rl"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_alignTop="@id/btn_notice"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout="@layout/top_overlay_buttons"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@@ -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.getRemaining_day()+"天")
|
||||
.setText(R.id.tv_name_period, item.getTitle());
|
||||
// .setText(R.id.tv_time, "(有效期${item.period}天)")
|
||||
if (item.isIs_select()) {
|
||||
|
||||
Reference in New Issue
Block a user