修改巡乐会动画
This commit is contained in:
@@ -434,7 +434,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
// startService(mqttServiceIntent);
|
// startService(mqttServiceIntent);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
mqttConnect=MqttConnect.getInstance(this,"tcp://62.234.12.147","android-"+ MqttClient.generateClientId());
|
mqttConnect=MqttConnect.getInstance(this,"tcp://1.13.181.248","android-"+ MqttClient.generateClientId());
|
||||||
|
// mqttConnect=MqttConnect.getInstance(this,"tcp://62.234.12.147","android-"+ MqttClient.generateClientId());
|
||||||
mqttConnect.mqttClient();
|
mqttConnect.mqttClient();
|
||||||
|
|
||||||
// 每次启动应用时重置状态
|
// 每次启动应用时重置状态
|
||||||
|
|||||||
@@ -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.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
@@ -181,7 +182,8 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
|||||||
mBinding.recycleView.scrollToPosition(middlePosition);
|
mBinding.recycleView.scrollToPosition(middlePosition);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mBinding.tvNumber.setText("x0");
|
||||||
|
mBinding.tvNumber.setTypeface(android.graphics.Typeface.create("sans-serif-condensed", Typeface.BOLD));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加自动滚动相关的方法
|
// 添加自动滚动相关的方法
|
||||||
@@ -361,7 +363,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
|||||||
// mBinding.tvGiftName.setText(blindBoxBean.getLocking_gift().getGift_name());
|
// mBinding.tvGiftName.setText(blindBoxBean.getLocking_gift().getGift_name());
|
||||||
// mBinding.tvGiftPrice.setText(blindBoxBean.getLocking_gift().getGift_price());
|
// mBinding.tvGiftPrice.setText(blindBoxBean.getLocking_gift().getGift_price());
|
||||||
// mBinding.tvGiftCount.setText(blindBoxBean.getLocking_gift().getGift_num());
|
// mBinding.tvGiftCount.setText(blindBoxBean.getLocking_gift().getGift_num());
|
||||||
|
mBinding.tvNumber.setText("x"+(blindBoxBean.getLocking_gift().getGift_num()!=null ?blindBoxBean.getLocking_gift().getGift_num():"0"));
|
||||||
mBinding.gvSdlw.setModel(blindBoxBean.getLocking_gift());
|
mBinding.gvSdlw.setModel(blindBoxBean.getLocking_gift());
|
||||||
mBinding.gvSdlw.setIsLockGift(true);
|
mBinding.gvSdlw.setIsLockGift(true);
|
||||||
mBinding.gvSdlw.stopAnimation();
|
mBinding.gvSdlw.stopAnimation();
|
||||||
@@ -410,10 +412,17 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
|||||||
if (message.getMsgType() == 1057) {
|
if (message.getMsgType() == 1057) {
|
||||||
// UpView(message.getText().getXlh_data());
|
// UpView(message.getText().getXlh_data());
|
||||||
endTime = Long.parseLong(message.getText().getEnd_time() != null ? message.getText().getEnd_time() : "0");
|
endTime = Long.parseLong(message.getText().getEnd_time() != null ? message.getText().getEnd_time() : "0");
|
||||||
startCountdown();
|
// startCountdown();
|
||||||
mBinding.tvGiftCount.setText(message.getText().getGift_num() != null ? message.getText().getGift_num() : "0");
|
// mBinding.tvGiftCount.setText(message.getText().getGift_num() != null ? message.getText().getGift_num() : "0");
|
||||||
mBinding.userName.setText(message.getText().getFromUserInfo().getNickname() != null ? message.getText().getFromUserInfo().getNickname() : "");
|
// mBinding.userName.setText(message.getText().getFromUserInfo().getNickname() != null ? message.getText().getFromUserInfo().getNickname() : "");
|
||||||
ImageUtils.loadHeadCC(message.getText().getFromUserInfo().getAvatar(), mBinding.userPic);
|
// ImageUtils.loadHeadCC(message.getText().getFromUserInfo().getAvatar(), mBinding.userPic);
|
||||||
|
BlindBoxBean.xlhUser xlhUser = new BlindBoxBean.xlhUser();
|
||||||
|
xlhUser.setAvatar(message.getText().getFromUserInfo().getAvatar());
|
||||||
|
xlhUser.setNickname(message.getText().getFromUserInfo().getNickname());
|
||||||
|
mBinding.gvXyz.setModel(xlhUser);
|
||||||
|
mBinding.qxDjs.setEndTime(endTime);
|
||||||
|
mBinding.tvNumber.setText("x"+(message.getText().getGift_num() != null ? message.getText().getGift_num() : "0"));
|
||||||
|
|
||||||
isDrawing=false;
|
isDrawing=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ public class QXMeetGiftView extends RelativeLayout {
|
|||||||
giftImageView = new ImageView(context);
|
giftImageView = new ImageView(context);
|
||||||
giftImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
giftImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||||
LayoutParams giftImageParams = new LayoutParams(
|
LayoutParams giftImageParams = new LayoutParams(
|
||||||
dpToPx(60), // 固定宽度
|
dpToPx(62), // 固定宽度
|
||||||
dpToPx(60) // 固定高度
|
dpToPx(62) // 固定高度
|
||||||
);
|
);
|
||||||
giftImageParams.addRule(CENTER_IN_PARENT);
|
giftImageParams.addRule(CENTER_IN_PARENT);
|
||||||
giftImageParams.topMargin = dpToPx(10);
|
giftImageParams.topMargin = dpToPx(10);
|
||||||
@@ -79,9 +79,24 @@ public class QXMeetGiftView extends RelativeLayout {
|
|||||||
);
|
);
|
||||||
addView(giftBgImageView, giftBgParams);
|
addView(giftBgImageView, giftBgParams);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 创建价格背景视图
|
||||||
|
giftPriceBgView = new ImageView(context);
|
||||||
|
giftPriceBgView.setImageResource(R.drawable.ac_meet_gift_name_bg);
|
||||||
|
LayoutParams priceBgParams = new LayoutParams(
|
||||||
|
LayoutParams.MATCH_PARENT,
|
||||||
|
dpToPx(15)
|
||||||
|
);
|
||||||
|
priceBgParams.addRule(CENTER_HORIZONTAL);
|
||||||
|
priceBgParams.addRule(ALIGN_PARENT_BOTTOM);
|
||||||
|
priceBgParams.bottomMargin = dpToPx(10); // 在名称标签上方
|
||||||
|
addView(giftPriceBgView, priceBgParams);
|
||||||
|
|
||||||
|
|
||||||
// 创建金币按钮
|
// 创建金币按钮
|
||||||
giftCoin = new Button(context);
|
giftCoin = new Button(context);
|
||||||
giftCoin.setTextColor(0xFFC7BF62);
|
giftCoin.setTextColor(0xFFC7BF62); // 使用直接的颜色值
|
||||||
// 设置按钮图标
|
// 设置按钮图标
|
||||||
Drawable coinDrawable = getResources().getDrawable(R.mipmap.jinb);
|
Drawable coinDrawable = getResources().getDrawable(R.mipmap.jinb);
|
||||||
coinDrawable.setBounds(0, 0, dpToPx(1), dpToPx(1));
|
coinDrawable.setBounds(0, 0, dpToPx(1), dpToPx(1));
|
||||||
@@ -94,7 +109,7 @@ public class QXMeetGiftView extends RelativeLayout {
|
|||||||
);
|
);
|
||||||
coinParams.addRule(CENTER_HORIZONTAL);
|
coinParams.addRule(CENTER_HORIZONTAL);
|
||||||
coinParams.addRule(ALIGN_PARENT_BOTTOM);
|
coinParams.addRule(ALIGN_PARENT_BOTTOM);
|
||||||
coinParams.bottomMargin = dpToPx(25);
|
coinParams.bottomMargin = -dpToPx(2);
|
||||||
addView(giftCoin, coinParams);
|
addView(giftCoin, coinParams);
|
||||||
|
|
||||||
// 创建礼物名称标签
|
// 创建礼物名称标签
|
||||||
@@ -109,8 +124,8 @@ public class QXMeetGiftView extends RelativeLayout {
|
|||||||
LayoutParams.WRAP_CONTENT
|
LayoutParams.WRAP_CONTENT
|
||||||
);
|
);
|
||||||
nameParams.addRule(CENTER_HORIZONTAL);
|
nameParams.addRule(CENTER_HORIZONTAL);
|
||||||
nameParams.addRule(BELOW, giftCoin.getId());
|
nameParams.addRule(ALIGN_PARENT_BOTTOM);
|
||||||
nameParams.topMargin = dpToPx(5);
|
nameParams.bottomMargin = dpToPx(1);
|
||||||
addView(giftNameLabel, nameParams);
|
addView(giftNameLabel, nameParams);
|
||||||
|
|
||||||
// 调整视图层级 - 确保正确的层级关系
|
// 调整视图层级 - 确保正确的层级关系
|
||||||
|
|||||||
@@ -105,6 +105,18 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/gv_fz"
|
app:layout_constraintTop_toBottomOf="@+id/gv_fz"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_34"
|
||||||
|
android:src="@mipmap/xlhxd"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/gv_sdlw"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/gv_xyz"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:translationY="-70dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.view.QXMeetGiftView
|
<com.xscm.moduleutil.view.QXMeetGiftView
|
||||||
android:id="@+id/gv_fzlw"
|
android:id="@+id/gv_fzlw"
|
||||||
@@ -116,6 +128,20 @@
|
|||||||
android:translationY="@dimen/dp_78"
|
android:translationY="@dimen/dp_78"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_number"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="-5dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/gv_sdlw"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/gv_sdlw"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/gv_sdlw"
|
||||||
|
android:translationY="@dimen/dp_68"
|
||||||
|
android:textSize="@dimen/dp_28"
|
||||||
|
android:textColor="#FFBB00"
|
||||||
|
tools:text="1"
|
||||||
|
/>
|
||||||
|
|
||||||
<com.xscm.moduleutil.view.QXMeetGiftView
|
<com.xscm.moduleutil.view.QXMeetGiftView
|
||||||
android:id="@+id/gv_sdlw"
|
android:id="@+id/gv_sdlw"
|
||||||
|
|||||||
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/xlhxd.png
Normal file
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/xlhxd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Reference in New Issue
Block a user