1:优化礼物播放和下载方式

2:优化转盘展示效果
This commit is contained in:
2025-08-29 01:14:35 +08:00
parent ae4dc34da4
commit 6a0379e418
8 changed files with 236 additions and 148 deletions

View File

@@ -9,7 +9,9 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.view.Window; import android.view.Window;
import android.widget.GridView; import android.widget.GridView;
@@ -133,7 +135,29 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
setupUIBasedOnUserType(); setupUIBasedOnUserType();
} }
@Override
protected void initDialogStyle(Window window) {
super.initDialogStyle(window);
window.setGravity(Gravity.BOTTOM);
}
@Override
public void onStart() {
super.onStart();
Window window = getDialog().getWindow();
if (window != null) {
// 获取屏幕高度
android.util.DisplayMetrics displayMetrics = new android.util.DisplayMetrics();
requireActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int screenHeight = displayMetrics.heightPixels;
// 设置高度为屏幕高度的100%(全屏)
int heightInPx = (int) (screenHeight * 0.8);;
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, heightInPx);
window.setBackgroundDrawableResource(android.R.color.transparent);
// 可选:设置动画样式(从底部弹出)
window.setWindowAnimations(R.style.CommonShowDialogBottom);
}
}
private void setupUIBasedOnUserType() { private void setupUIBasedOnUserType() {
switch (userIdType) { switch (userIdType) {
case MIRROR_SKY://天空之境 case MIRROR_SKY://天空之境
@@ -383,6 +407,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
for (GiftCardView gridView : allViewsArray) { for (GiftCardView gridView : allViewsArray) {
gridView.setSelected(false); gridView.setSelected(false);
gridView.stopPulseAnimationWithLayer(); gridView.stopPulseAnimationWithLayer();
gridView.setVisibilitymResultTextView(false);
} }
currentGiftCardView = allViewsArray.get(0); currentGiftCardView = allViewsArray.get(0);
currentGiftCardView.setSelected(true); currentGiftCardView.setSelected(true);

View File

@@ -3,6 +3,7 @@ package com.xscm.moduleutil.dialog.giftLottery;
import android.app.Dialog; import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.view.Gravity;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.Window; import android.view.Window;
@@ -70,9 +71,8 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
android.util.DisplayMetrics displayMetrics = new android.util.DisplayMetrics(); android.util.DisplayMetrics displayMetrics = new android.util.DisplayMetrics();
requireActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); requireActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int screenHeight = displayMetrics.heightPixels; int screenHeight = displayMetrics.heightPixels;
// 设置高度为屏幕高度的100%(全屏) // 设置高度为屏幕高度的100%(全屏)
int heightInPx = screenHeight; int heightInPx = (int) (screenHeight * 0.8);;
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, heightInPx); window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, heightInPx);
window.setBackgroundDrawableResource(android.R.color.transparent); window.setBackgroundDrawableResource(android.R.color.transparent);
@@ -80,6 +80,12 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
window.setWindowAnimations(R.style.CommonShowDialogBottom); window.setWindowAnimations(R.style.CommonShowDialogBottom);
} }
} }
@Override
protected void initDialogStyle(Window window) {
super.initDialogStyle(window);
window.setGravity(Gravity.BOTTOM);
}
@Override @Override
public void onAttach(@NonNull Context context) { public void onAttach(@NonNull Context context) {
super.onAttach(context); super.onAttach(context);
@@ -111,13 +117,14 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() { mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
@Override @Override
public void onRefresh(@NonNull RefreshLayout refreshLayout) { public void onRefresh(@NonNull RefreshLayout refreshLayout) {
page++; page = 1;
MvpPre.getMyRecord(giftBagId, page+"", "20",type); MvpPre.getMyRecord(giftBagId, page+"", "20",type);
} }
@Override @Override
public void onLoadMore(@NonNull RefreshLayout refreshLayout) { public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
page = 1; page++;
MvpPre.getMyRecord(giftBagId, page+"", "20",type); MvpPre.getMyRecord(giftBagId, page+"", "20",type);
} }
}); });
@@ -170,6 +177,7 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
setTextViewStyle(mBinding.textView2, true); setTextViewStyle(mBinding.textView2, true);
setTextViewStyle(mBinding.textView1, false); setTextViewStyle(mBinding.textView1, false);
} }
page=1;
data.clear(); data.clear();
MvpPre.getMyRecord(giftBagId, page+"", "20",type); MvpPre.getMyRecord(giftBagId, page+"", "20",type);
} }
@@ -210,6 +218,10 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
}else { }else {
adapter.addData(data); adapter.addData(data);
} }
}else {
if (page == 1) {
adapter.setNewData(null);
}
} }
} }
@@ -221,6 +233,10 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
}else { }else {
adapter.addData(data); adapter.addData(data);
} }
}else {
if (page == 1) {
adapter.setNewData(null);
}
} }
} }

View File

@@ -2,6 +2,7 @@ package com.xscm.moduleutil.dialog.giftLottery;
import android.content.Context; import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.view.WindowManager;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@@ -21,18 +22,36 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
*@author qx * @author qx
*@data 2025/8/28 * @data 2025/8/28
*@description: 盲盒转盘奖池弹窗 * @description: 盲盒转盘奖池弹窗
*/ */
public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> { public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> {
private Context mContext; private Context mContext;
private List<GiftBean> gift_list; private List<GiftBean> gift_list;
private int type ; private int type;
public PrizePoolDialog(@NonNull Context context) { public PrizePoolDialog(@NonNull Context context) {
super(context); super(context);
this.mContext = context; this.mContext = context;
// 设置对话框从底部弹出并紧贴底部
if (getWindow() != null) {
getWindow().setGravity(android.view.Gravity.BOTTOM);
}
}
@Override
public void onStart() {
super.onStart();
if (getWindow() != null) {
// 获取屏幕尺寸
android.util.DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
// 设置高度为屏幕高度的80%
android.view.WindowManager.LayoutParams params = getWindow().getAttributes();
params.height = (int) (displayMetrics.heightPixels * 0.8);
params.width = android.view.ViewGroup.LayoutParams.MATCH_PARENT;
getWindow().setAttributes(params);
}
} }
@@ -43,8 +62,6 @@ public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> {
@Override @Override
public void initView() { public void initView() {
} }
@@ -60,14 +77,14 @@ public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> {
} }
// 提供更新数据的方法 // 提供更新数据的方法
public void updateData(List<GiftBean> newData ,int type) { public void updateData(List<GiftBean> newData, int type) {
if (type==10){ if (type == 10) {
mBinding.clPrize.setBackgroundResource(R.mipmap.tkzj); mBinding.clPrize.setBackgroundResource(R.mipmap.tkzj);
mBinding.imJc.setImageResource(R.mipmap.jiangc); mBinding.imJc.setImageResource(R.mipmap.jiangc);
}else if (type==11){ } else if (type == 11) {
mBinding.clPrize.setBackgroundResource(R.mipmap.syzc); mBinding.clPrize.setBackgroundResource(R.mipmap.syzc);
mBinding.imJc.setImageResource(R.mipmap.syzc_jc); mBinding.imJc.setImageResource(R.mipmap.syzc_jc);
}else if (type==12){ } else if (type == 12) {
mBinding.clPrize.setBackgroundResource(R.mipmap.skzj); mBinding.clPrize.setBackgroundResource(R.mipmap.skzj);
mBinding.imJc.setImageResource(R.mipmap.skzl_jc); mBinding.imJc.setImageResource(R.mipmap.skzl_jc);
} }
@@ -77,13 +94,13 @@ public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> {
float density = mContext.getResources().getDisplayMetrics().density; float density = mContext.getResources().getDisplayMetrics().density;
if (density <= 2.0) { // 低密度屏幕如mdpi, hdpi if (density <= 2.0) { // 低密度屏幕如mdpi, hdpi
rows = 3; rows = 5;
columns = 2; columns = 3;
} else if (density <= 3.0) { // 中密度屏幕如xhdpi } else if (density <= 3.0) { // 中密度屏幕如xhdpi
rows = 3; rows = 5;
columns = 3; columns = 3;
} else { // 高密度屏幕如xxhdpi, xxxhdpi } else { // 高密度屏幕如xxhdpi, xxxhdpi
rows = 4; rows = 5;
columns = 3; columns = 3;
} }

View File

@@ -48,6 +48,7 @@ import com.xscm.moduleutil.utils.SpUtil;
import com.xscm.moduleutil.utils.logger.Logger; import com.xscm.moduleutil.utils.logger.Logger;
import java.io.File; import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.net.URL; import java.net.URL;
@@ -56,6 +57,13 @@ import java.util.LinkedList;
import java.util.Map; import java.util.Map;
import java.util.Queue; import java.util.Queue;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
public class AvatarFrameView extends FrameLayout implements IAnimListener { public class AvatarFrameView extends FrameLayout implements IAnimListener {
@Override @Override
@@ -322,142 +330,151 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
return memoryUsage > 0.8 || usedMemory > MAX_MEMORY_THRESHOLD; return memoryUsage > 0.8 || usedMemory > MAX_MEMORY_THRESHOLD;
} }
// public void setSource(String url, int type2) {
// if (SpUtil.getOpenEffect()==1) {
// playQueue.offer(new PlayItem(url, type2));
// if (!isPlaying) {
// playNextFromQueue();
// }
// }else {
// playQueue.clear();
// isPlaying = false;
// }
//
//// RenderType type = null;
//// if ("svga".equalsIgnoreCase(getFileExtension(url))){
//// type = RenderType.SVGA;
//// }else if ("mp4".equalsIgnoreCase(getFileExtension(url))){
//// type = RenderType.MP4;
//// }
////
//// clearPrevious();
//// renderType = type;
//// mType = type2;
//// switch (type) {
//// case SVGA:
//// mBinding.playView.stopPlay();
//// mBinding.playView.setVisibility(View.GONE);
//// loadSVGA(url);
//// break;
//// case MP4:
////// loadMP4(url);
//// mBinding.playView.setVisibility(View.VISIBLE);
//// downloadAndPlayMp4(url);
//// break;
//// }
// }
boolean isTxk = false;
private void downloadAndPlayMp4(String url) { private void downloadAndPlayMp4(String url) {
String filePath = PathUtils.getInternalAppCachePath() + Md5Utils.getStringMD5(url) + ".mp4";
// 提取文件名
String fileName = url.substring(url.lastIndexOf("/"));
String filePath = getContext().getCacheDir().getAbsolutePath() + fileName;
File file = new File(filePath); File file = new File(filePath);
if (file.exists() && file.length() > 0) { if (!file.exists()) {
playMp4(file); LogUtils.e("无缓存");
mFile = file; // 使用OkHttp进行下载
} else { OkHttpClient client = new OkHttpClient();
// 删除可能存在的损坏文件 Request request = new Request.Builder()
// if (file.exists()) { .url(url)
// file.delete();
// }
DownloadTask task = new DownloadTask.Builder(url, PathUtils.getInternalAppCachePath()
, Md5Utils.getStringMD5(url) + ".mp4")
.setMinIntervalMillisCallbackProcess(300)
.setPassIfAlreadyCompleted(true)
.setAutoCallbackToUIThread(true)
.setConnectionCount(3) // 增加连接数提高稳定性
.setReadBufferSize(1024 * 8) // 增大缓冲区
.build(); .build();
if (StatusUtil.isCompleted(task)) {
playMp4(task.getFile());
mFile = task.getFile();
} else if (StatusUtil.isSameTaskPendingOrRunning(task)) {
// 如果任务正在进行中,等待完成
// 可以通过监听器处理
attachToExistingTask(task);
} else {
task.enqueue(new DownloadListener1() {
@Override
public void taskStart(@NonNull DownloadTask task, @NonNull Listener1Assist.Listener1Model model) {
Logger.e("AvatarFrameView1", model);
}
@Override client.newCall(request).enqueue(new Callback() {
public void retry(@NonNull DownloadTask task, @NonNull ResumeFailedCause cause) { @Override
Logger.e("AvatarFrameView2", cause); public void onFailure(Call call, IOException e) {
Log.d("sssssssssss", e.toString());
}
} @Override
public void onResponse(Call call, Response response) throws IOException {
@Override if (response.isSuccessful()) {
public void connected(@NonNull DownloadTask task, int blockCount, long currentOffset, long totalLength) { // 保存文件到缓存目录
Logger.e("AvatarFrameView3", blockCount); try (ResponseBody responseBody = response.body()) {
} if (responseBody != null) {
File downloadedFile = new File(filePath);
@Override FileOutputStream fos = new FileOutputStream(downloadedFile);
public void progress(@NonNull DownloadTask task, long currentOffset, long totalLength) { fos.write(responseBody.bytes());
Logger.e("AvatarFrameView4", currentOffset); fos.close();
} isTxk=true;
// 在主线程中播放动画
@Override mainHandler.post(() -> {
public void taskEnd(@NonNull DownloadTask task, @NonNull EndCause cause, @Nullable Exception realCause, @NonNull Listener1Assist.Listener1Model model) { if (isTxk) {
Logger.e("AvatarFrameView5", model); mBinding.playView.setLoop(20);
// playMp4(task.getFile()); }
// mFile = task.getFile(); mBinding.playView.startPlay(downloadedFile);
// if (cause != null && cause != EndCause.COMPLETED) { });
//// CrashReport.postCatchedException(new RuntimeException("下载任务结束:" + cause == null ? "" : cause.name() + "_realCause:" + realCause == null ? "" : realCause.getMessage()));
// }
if (cause == EndCause.COMPLETED) {
File downloadedFile = task.getFile();
if (downloadedFile != null && downloadedFile.exists() && downloadedFile.length() > 0) {
playMp4(downloadedFile);
mFile = downloadedFile;
} else {
Logger.e(TAG, "Downloaded file is invalid");
handleDownloadFailure(url, cause, new IOException("Downloaded file is invalid"));
} }
} else {
handleDownloadFailure(url, cause, realCause);
} }
} }
}); }
});
} else {
isTxk=true;
LogUtils.e("有缓存");
// 直接播放缓存文件
if (isTxk) {
mBinding.playView.setLoop(20);
} }
mBinding.playView.startPlay(file);
} }
} }
private void handleDownloadFailure(String url, EndCause cause, Exception realCause) {
Logger.e(TAG, "Download failed: " + cause + ", real cause: " + realCause);
// 尝试重试一次 // private void downloadAndPlayMp4(String url) {
mainHandler.postDelayed(() -> { // String filePath = PathUtils.getInternalAppCachePath() + Md5Utils.getStringMD5(url) + ".mp4";
// 检查队列是否仍然包含这个项目 // File file = new File(filePath);
boolean shouldRetry = false; //
for (PlayItem item : playQueue) { // if (file.exists() && file.length() > 0) {
if (item.url.equals(url)) { // playMp4(file);
shouldRetry = true; // mFile = file;
break; // } else {
} // // 删除可能存在的损坏文件
} //// if (file.exists()) {
//// file.delete();
if (shouldRetry) { //// }
// 重新添加到队列开头 //
playQueue.add(new PlayItem(url, mType)); // DownloadTask task = new DownloadTask.Builder(url, PathUtils.getInternalAppCachePath()
playNextFromQueue(); // , Md5Utils.getStringMD5(url) + ".mp4")
} else { // .setMinIntervalMillisCallbackProcess(300)
isPlaying = false; // .setPassIfAlreadyCompleted(true)
playNextFromQueue(); // .setAutoCallbackToUIThread(true)
} // .setConnectionCount(3) // 增加连接数提高稳定性
}, 1000); // 1秒后重试 // .setReadBufferSize(1024 * 8) // 增大缓冲区
} // .build();
// if (StatusUtil.isCompleted(task)) {
// playMp4(task.getFile());
// mFile = task.getFile();
// } else if (StatusUtil.isSameTaskPendingOrRunning(task)) {
// Logger.d(TAG, "Task is pending or running, checking if it's stuck");
// // 检查任务是否可能卡住了
// // 添加超时机制,如果任务长时间没有进展,则重新开始
// checkAndHandleStuckTask(task, url);
// } else {
// Logger.d(TAG, "Starting new download task");
// startNewDownload(task, url);
// }
//
//// else if (StatusUtil.isSameTaskPendingOrRunning(task)) {
//// // 如果任务正在进行中,等待完成
//// // 可以通过监听器处理
//// attachToExistingTask(task);
//// } else {
//// task.enqueue(new DownloadListener1() {
//// @Override
//// public void taskStart(@NonNull DownloadTask task, @NonNull Listener1Assist.Listener1Model model) {
//// Logger.e("AvatarFrameView1", model);
//// }
////
//// @Override
//// public void retry(@NonNull DownloadTask task, @NonNull ResumeFailedCause cause) {
//// Logger.e("AvatarFrameView2", cause);
////
//// }
////
//// @Override
//// public void connected(@NonNull DownloadTask task, int blockCount, long currentOffset, long totalLength) {
//// Logger.e("AvatarFrameView3", blockCount);
//// }
////
//// @Override
//// public void progress(@NonNull DownloadTask task, long currentOffset, long totalLength) {
//// Logger.e("AvatarFrameView4", currentOffset);
//// }
////
//// @Override
//// public void taskEnd(@NonNull DownloadTask task, @NonNull EndCause cause, @Nullable Exception realCause, @NonNull Listener1Assist.Listener1Model model) {
//// Logger.e("AvatarFrameView5", model);
////// playMp4(task.getFile());
////// mFile = task.getFile();
////// if (cause != null && cause != EndCause.COMPLETED) {
//////// CrashReport.postCatchedException(new RuntimeException("下载任务结束:" + cause == null ? "" : cause.name() + "_realCause:" + realCause == null ? "" : realCause.getMessage()));
////// }
////
//// if (cause == EndCause.COMPLETED) {
//// File downloadedFile = task.getFile();
//// if (downloadedFile != null && downloadedFile.exists() && downloadedFile.length() > 0) {
//// playMp4(downloadedFile);
//// mFile = downloadedFile;
//// } else {
//// Logger.e(TAG, "Downloaded file is invalid");
//// handleDownloadFailure(url, cause, new IOException("Downloaded file is invalid"));
//// }
//// } else {
//// handleDownloadFailure(url, cause, realCause);
//// }
//// }
//// });
//// }
// }
// }
// 添加检查进行中任务的方法 // 添加检查进行中任务的方法
private void attachToExistingTask(DownloadTask task) { private void attachToExistingTask(DownloadTask task) {
// 为已经在队列中的任务附加监听器 // 为已经在队列中的任务附加监听器
@@ -802,7 +819,7 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
} }
@Override @Override
protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { protected boolean removeEldestEntry(Entry<K, V> eldest) {
return size() > maxSize; return size() > maxSize;
} }
} }

View File

@@ -154,6 +154,7 @@ public class GiftCardView extends FrameLayout {
} }
} }
} }
private android.animation.AnimatorSet animatorSet;
public void startPulseAnimationWithLayer() { public void startPulseAnimationWithLayer() {
if (pulseAnimator != null && pulseAnimator.isRunning()) { if (pulseAnimator != null && pulseAnimator.isRunning()) {
@@ -169,7 +170,7 @@ public class GiftCardView extends FrameLayout {
scaleYAnimator.setRepeatMode(ObjectAnimator.REVERSE); scaleYAnimator.setRepeatMode(ObjectAnimator.REVERSE);
// 组合动画 // 组合动画
android.animation.AnimatorSet animatorSet = new android.animation.AnimatorSet(); animatorSet = new android.animation.AnimatorSet();
animatorSet.playTogether(pulseAnimator, scaleYAnimator); animatorSet.playTogether(pulseAnimator, scaleYAnimator);
animatorSet.start(); animatorSet.start();
} }
@@ -178,8 +179,22 @@ public class GiftCardView extends FrameLayout {
if (pulseAnimator != null) { if (pulseAnimator != null) {
pulseAnimator.cancel(); pulseAnimator.cancel();
} }
// 停止组合动画
if (animatorSet != null && animatorSet.isRunning()) {
animatorSet.cancel();
}
// 清除引用
animatorSet = null;
pulseAnimator = null;
// 重置缩放
this.setScaleX(1f); this.setScaleX(1f);
this.setScaleY(1f); this.setScaleY(1f);
// 强制重新绘制
this.invalidate();
} }
/** /**
* 设置礼物名称 * 设置礼物名称

View File

@@ -27,7 +27,6 @@
android:layout_marginStart="@dimen/dp_16" android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_16" android:layout_marginEnd="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_30"
android:background="#80000000" android:background="#80000000"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
@@ -77,7 +76,6 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginTop="@dimen/dp_16" android:layout_marginTop="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_30"
app:srlEnableLoadMore="true" app:srlEnableLoadMore="true"
app:srlEnableRefresh="true"> app:srlEnableRefresh="true">

View File

@@ -12,7 +12,7 @@
android:id="@+id/lottery_buttons_layout" android:id="@+id/lottery_buttons_layout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_16" android:layout_margin="@dimen/dp_10"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View File

@@ -6,8 +6,8 @@
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<ImageView <ImageView
android:layout_width="@dimen/dp_100" android:layout_width="@dimen/dp_90"
android:layout_height="@dimen/dp_100" android:layout_height="@dimen/dp_90"
android:id="@+id/iv_prize_pool" android:id="@+id/iv_prize_pool"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@mipmap/tkzj_z" android:src="@mipmap/tkzj_z"
@@ -17,8 +17,8 @@
<ImageView <ImageView
android:id="@+id/iv_gift_image" android:id="@+id/iv_gift_image"
android:layout_width="@dimen/dp_62" android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_62" android:layout_height="@dimen/dp_60"
app:layout_constraintTop_toTopOf="@+id/iv_prize_pool" app:layout_constraintTop_toTopOf="@+id/iv_prize_pool"
app:layout_constraintBottom_toBottomOf="@+id/iv_prize_pool" app:layout_constraintBottom_toBottomOf="@+id/iv_prize_pool"
app:layout_constraintStart_toStartOf="@+id/iv_prize_pool" app:layout_constraintStart_toStartOf="@+id/iv_prize_pool"