diff --git a/app/src/main/java/com/chwl/app/application/GlobalHandleManager.java b/app/src/main/java/com/chwl/app/application/GlobalHandleManager.java
index ab1c0782a..59296553c 100644
--- a/app/src/main/java/com/chwl/app/application/GlobalHandleManager.java
+++ b/app/src/main/java/com/chwl/app/application/GlobalHandleManager.java
@@ -97,7 +97,7 @@ public class GlobalHandleManager {
Activity activity = getActivity();
if (activity == null) return;
if (AvRoomDataManager.get().isSelfGamePlaying()) return;
- LevelUpDialog.start(activity, event.getLevelName(), true);
+// LevelUpDialog.start(activity, event.getLevelName(), true);
}
@Subscribe(threadMode = ThreadMode.MAIN)
@@ -105,7 +105,7 @@ public class GlobalHandleManager {
Activity activity = getActivity();
if (activity == null) return;
if (AvRoomDataManager.get().isSelfGamePlaying()) return;
- LevelUpDialog.start(activity, event.getLevelName(), false);
+// LevelUpDialog.start(activity, event.getLevelName(), false);
}
private static final class Helper {
diff --git a/app/src/main/java/com/chwl/app/avroom/widget/GiftV2View.java b/app/src/main/java/com/chwl/app/avroom/widget/GiftV2View.java
index c6903b596..820df05fd 100644
--- a/app/src/main/java/com/chwl/app/avroom/widget/GiftV2View.java
+++ b/app/src/main/java/com/chwl/app/avroom/widget/GiftV2View.java
@@ -698,10 +698,10 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
// 连击 特殊动画
if (ComboUtil.INSTANCE.isChangePoint() && giftInfo.uid == AuthModel.get().getCurrentUid()){
objectAnimator = ObjectAnimator.ofPropertyValuesHolder(imageView, p2c, p3c, p1c, p0c);
- time = 1000;
+ time = 600;
}else {
objectAnimator = ObjectAnimator.ofPropertyValuesHolder(imageView, p2, p3, p1, p0);
- time = 4000;
+ time = 2000;
}
objectAnimator.setDuration(time);
diff --git a/app/src/main/java/com/chwl/app/ui/widget/GiftComboButtonView.kt b/app/src/main/java/com/chwl/app/ui/widget/GiftComboButtonView.kt
index 27e053ca2..3bbee8807 100644
--- a/app/src/main/java/com/chwl/app/ui/widget/GiftComboButtonView.kt
+++ b/app/src/main/java/com/chwl/app/ui/widget/GiftComboButtonView.kt
@@ -87,6 +87,8 @@ class GiftComboButtonView @JvmOverloads constructor(
mBinding.svga.stopAnimation()
mBinding.svga.startAnimation()
+
+
}
private fun onBtnUp(){
@@ -148,6 +150,13 @@ class GiftComboButtonView @JvmOverloads constructor(
comboNum += num
comboCount++
mBinding.tvNum.text = "x$comboCount"
+ mBinding.tvNum.scaleX = 1.3f
+ mBinding.tvNum.scaleY = 1.3f
+ mBinding.tvNum.animate()
+ .setDuration(100)
+ .scaleX(1f)
+ .scaleY(1f)
+ .start()
ComboUtil.comboCount = comboCount+1
}
diff --git a/app/src/main/java/com/chwl/app/ui/widget/GiftComboLayout.kt b/app/src/main/java/com/chwl/app/ui/widget/GiftComboLayout.kt
index bf8eb2e55..4f17da339 100644
--- a/app/src/main/java/com/chwl/app/ui/widget/GiftComboLayout.kt
+++ b/app/src/main/java/com/chwl/app/ui/widget/GiftComboLayout.kt
@@ -2,7 +2,6 @@ package com.chwl.app.ui.widget
import android.animation.ObjectAnimator
import android.animation.PropertyValuesHolder
-import android.animation.ValueAnimator
import android.annotation.SuppressLint
import android.content.Context
import android.os.Handler
@@ -16,9 +15,9 @@ import android.view.animation.AnimationUtils
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
+import androidx.appcompat.widget.AppCompatTextView
import androidx.core.view.isGone
import androidx.core.view.isVisible
-import com.alibaba.fastjson.JSON
import com.chwl.app.R
import com.chwl.app.ui.utils.ImageLoadUtils
import com.chwl.app.ui.utils.SoftPool
@@ -61,26 +60,24 @@ class GiftComboLayout @JvmOverloads constructor(
* 创建
*/
private fun getComboChildView(): View {
- return cacheView.acquire {
+ val view = cacheView.acquire {
inflater.inflate(R.layout.item_gift_combo_view, this, false)
}.apply {
createViewHolder(this)
isVisible = true
}
+ return view
}
/**
* add data
*/
fun add(giftComboInfo: GiftComboInfo?) {
- LogUtils.d(" ComboView add --start")
//没有绑定之前不能添加
if (!isAttachedToWindow) {
- LogUtils.d(" ComboView add isAttachedToWindow --end")
return
}
if (giftComboInfo == null) {
- LogUtils.d(" ComboView add giftComboInfo == null --end")
return
}
@@ -88,7 +85,6 @@ class GiftComboLayout @JvmOverloads constructor(
var addToWaiting = true
for (comboInfo in showingList) {
if(comboInfo.sentUserid == giftComboInfo.sentUserid && comboInfo.giftId == giftComboInfo.giftId){
- LogUtils.d(" ComboView add showingList "+giftComboInfo.sentUserid)
comboInfo.giftNumber = giftComboInfo.giftNumber
comboInfo.comboCount = giftComboInfo.comboCount
comboInfo.receiverNumber = giftComboInfo.receiverNumber
@@ -99,7 +95,6 @@ class GiftComboLayout @JvmOverloads constructor(
for (comboInfo in waitingList) {
if(comboInfo.sentUserid == giftComboInfo.sentUserid && comboInfo.giftId == giftComboInfo.giftId){
- LogUtils.d(" ComboView add waitingList "+giftComboInfo.sentUserid)
comboInfo.giftNumber = giftComboInfo.giftNumber
comboInfo.comboCount = giftComboInfo.comboCount
comboInfo.receiverNumber = giftComboInfo.receiverNumber
@@ -112,22 +107,17 @@ class GiftComboLayout @JvmOverloads constructor(
}
showNext()
- LogUtils.d(" ComboView add --end")
}
/**
* 更新数量
*/
private fun updateNum(giftComboInfo: GiftComboInfo) {
- LogUtils.d(" ComboView updateNum --start")
val view = comboMap[giftComboInfo] ?: return
-
val viewHolder = getViewHolder(view)
viewHolder?.refreshNum(giftComboInfo, true)
handle.removeMessages(1, giftComboInfo)
handle.sendMessageDelayed(Message.obtain(handle, 1, giftComboInfo), COMBO_STAY_TIME * 1000L)
-
- LogUtils.d(" ComboView updateNum --end")
}
@@ -136,9 +126,7 @@ class GiftComboLayout @JvmOverloads constructor(
* 显示下一个
*/
private fun showNext() {
- LogUtils.d(" ComboView showNext --start")
if(waitingList.isEmpty()){
- LogUtils.d(" ComboView showNext isEmpty --end")
return
}
@@ -157,10 +145,8 @@ class GiftComboLayout @JvmOverloads constructor(
if(showingList.size > MAX_SHOWING){
handle.removeMessages(1, showingList[0])
viewOut(showingList.remove(), true)
- LogUtils.d(" ComboView showNext MAX_SHOWING --end")
return
}
- LogUtils.d(" ComboView showNext --end")
}
@@ -169,12 +155,10 @@ class GiftComboLayout @JvmOverloads constructor(
* 移除动画
*/
private fun viewOut(giftComboInfo: GiftComboInfo?, isDirectRemove: Boolean) {
- LogUtils.d(" ComboView viewOut --start")
giftComboInfo ?: return
val comboView = comboMap.remove(giftComboInfo) ?: return
- LogUtils.d(" ComboView viewOut init runnable")
+
val runnable = {
- LogUtils.d(" ComboView viewOut init runnable -- start")
val viewHolder = getViewHolder(comboView)
viewHolder?.clear()
if(!isDirectRemove){
@@ -183,13 +167,11 @@ class GiftComboLayout @JvmOverloads constructor(
removeView(comboView)
cacheView.release(comboView)
showNext()
- LogUtils.d(" ComboView viewOut init runnable -- end")
}
if(isDirectRemove){
comboView.isGone = true
- rootView.post(runnable)
- LogUtils.d(" ComboView viewOut -- isDirectRemove ")
+ post(runnable)
}else{
val animOut = AnimationUtils.loadAnimation(context, R.anim.alpha_out)
animOut.setAnimationListener(object : Animation.AnimationListener {
@@ -197,17 +179,14 @@ class GiftComboLayout @JvmOverloads constructor(
}
override fun onAnimationEnd(animation: Animation?) {
- LogUtils.d(" ComboView viewOut -- onAnimationEnd ")
- rootView.post(runnable)
+ post(runnable)
}
override fun onAnimationRepeat(animation: Animation?) {
}
})
comboView.startAnimation(animOut)
- LogUtils.d(" ComboView viewOut -- animOut ")
}
- LogUtils.d(" ComboView viewOut --end")
}
@@ -216,36 +195,24 @@ class GiftComboLayout @JvmOverloads constructor(
*/
private fun viewAnimationIn(view: View) {
view.alpha = 1f
- view.startAnimation(AnimationUtils.loadAnimation(context,if (UiUtils.isRtl(context)) R.anim.left_to_right else R.anim.right_to_left ))
+ val animIn = AnimationUtils.loadAnimation(context,if (UiUtils.isRtl(context)) R.anim.left_to_right else R.anim.right_to_left )
+// animIn.fillAfter = true
+// animIn.isFillEnabled = true
+ view.startAnimation(animIn)
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
if(isInEditMode) return
-
// RoomMsgManager.addCustomMsgListener(this)
}
-// override fun onRoomCustomMsg(attach: BaseAttach<*>) {
-// if(attach is NormalGiftAttach){
-// val receiveInfo = attach.data ?: return
-// val comboInfo = GiftComboInfo().apply {
-// senderUid = receiveInfo.uid
-// senderName = receiveInfo.nick
-// senderAvatar = receiveInfo.avatar
-// receiverName = receiveInfo.targetNicks?.getOrNull(0)
-// receiverCount = receiveInfo.receiverCount
-// giftCount = receiveInfo.giftComboCount
-// giftUrl = receiveInfo.gift?.giftUrl
-// }
-// add(comboInfo)
-// }
-// }
-
fun onRoomCustomMsg(giftInfo: GiftMultiReceiverInfo?) {
+ LogUtils.d(" GiftComboLayout onRoomCustomMsg " )
if (giftInfo==null) return
+ if (giftInfo.comboCount == 0) return
val comboInfo = GiftComboInfo().apply {
giftId = giftInfo.giftId
sentUserid = giftInfo.uid
@@ -258,8 +225,6 @@ class GiftComboLayout @JvmOverloads constructor(
comboCount = giftInfo.comboCount
isMulti = giftInfo.isMulti
}
- LogUtils.d("礼物联机条幅 giftInfo = "+JSON.toJSONString(giftInfo))
- LogUtils.d("礼物联机条幅 comboInfo = "+JSON.toJSONString(comboInfo))
add(comboInfo)
}
@@ -278,7 +243,7 @@ class GiftComboLayout @JvmOverloads constructor(
}
private inner class ViewHolder(view: View) {
- var tvNumber: TextView = view.findViewById(R.id.giftComboNumber)
+ var tvNumber: AppCompatTextView = view.findViewById(R.id.giftComboNumber)
var ivGift: ImageView = view.findViewById(R.id.giftImg)
var tvNick: TextView = view.findViewById(R.id.sentUserName)
var tvReceiverNick: TextView = view.findViewById(R.id.receiverUserName)
@@ -301,13 +266,12 @@ class GiftComboLayout @JvmOverloads constructor(
tvReceiverNick.text = giftComboInfo.receiverUserName
} else {
if (giftComboInfo.isMulti) {
- tvReceiverNick.text =
- "${giftComboInfo.receiverNumber}" + ResUtil.getString(R.string.guys)
+ tvReceiverNick.text = ResUtil.getString(R.string.Multiplayer)
} else {
tvReceiverNick.text = ResUtil.getString(R.string.All_mic)
}
}
- tvNumber.text = "x${giftComboInfo.giftNumber * giftComboInfo.receiverNumber * giftComboInfo.comboCount}"
+// tvNumber.text = "x${giftComboInfo.giftNumber * giftComboInfo.receiverNumber * giftComboInfo.comboCount}"
ImageLoadUtils.loadImage(ivGift, giftComboInfo.giftImgUrl)
ImageLoadUtils.loadImage(ivAvatar, giftComboInfo.sentAvatar)
ivAvatar.tag = giftComboInfo
@@ -332,14 +296,18 @@ class GiftComboLayout @JvmOverloads constructor(
tvNumber.tag = num
tvNumber.text = "x$num"
if (isAnim) {
- LogUtils.d(" ComboView refreshNum -- isAnim ")
tvNumber.animate().cancel()
- tvNumber.scaleX = 1.3f
- tvNumber.scaleY = 1.3f
- tvNumber.animate()
- .scaleX(1f)
- .scaleY(1f)
- .start()
+ tvNumber.requestLayout()
+ post {
+ val scaleUp: ObjectAnimator = ObjectAnimator.ofPropertyValuesHolder(
+ tvNumber,
+ PropertyValuesHolder.ofFloat(SCALE_X, 1f, 1.3f, 1f),
+ PropertyValuesHolder.ofFloat(SCALE_Y, 1f, 1.3f, 1f)
+ )
+ scaleUp.setDuration(100)
+ scaleUp.start()
+ }
+
}
}
@@ -350,6 +318,8 @@ class GiftComboLayout @JvmOverloads constructor(
fun clear() {
LogUtils.d(" ComboView clear -- clear ")
tvNumber.animate().cancel()
+ tvNumber.scaleX = 1f
+ tvNumber.scaleY = 1f
tvNumber.tag = 0
ivAvatar.tag = null
}
diff --git a/app/src/main/res/anim/alpha_out.xml b/app/src/main/res/anim/alpha_out.xml
index 1b35740f9..62f63e32a 100644
--- a/app/src/main/res/anim/alpha_out.xml
+++ b/app/src/main/res/anim/alpha_out.xml
@@ -2,7 +2,7 @@
diff --git a/app/src/main/res/anim/left_to_right.xml b/app/src/main/res/anim/left_to_right.xml
index 424423f1a..07f88c19a 100644
--- a/app/src/main/res/anim/left_to_right.xml
+++ b/app/src/main/res/anim/left_to_right.xml
@@ -1,7 +1,7 @@
\ No newline at end of file
diff --git a/app/src/main/res/anim/right_to_left.xml b/app/src/main/res/anim/right_to_left.xml
index 8d8d9e2b6..dfc1a77b5 100644
--- a/app/src/main/res/anim/right_to_left.xml
+++ b/app/src/main/res/anim/right_to_left.xml
@@ -1,7 +1,7 @@
\ No newline at end of file
diff --git a/app/src/main/res/drawable-xxhdpi/charge_bg_balance.webp b/app/src/main/res/drawable-xxhdpi/charge_bg_balance.webp
index b382fe4f4..3e7ae2f2f 100644
Binary files a/app/src/main/res/drawable-xxhdpi/charge_bg_balance.webp and b/app/src/main/res/drawable-xxhdpi/charge_bg_balance.webp differ
diff --git a/app/src/main/res/layout/item_gift_combo_view.xml b/app/src/main/res/layout/item_gift_combo_view.xml
index 849d0c24d..c67432c9d 100644
--- a/app/src/main/res/layout/item_gift_combo_view.xml
+++ b/app/src/main/res/layout/item_gift_combo_view.xml
@@ -84,7 +84,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/barrier"/>
-
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index 07e3efd19..9901b9ad9 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -5354,4 +5354,6 @@
لم يتم الحصول على VIP
VIP %s فقط من خلال النشاط
جميع الميكروفونات
+ هل أنت متأكد أنك تريد الذهاب إلى هذه الغرفة؟
+ متعدد اللاعبين
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 00d04848c..2ba24cf2c 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -5295,5 +5295,7 @@
未取得 VIP
VIP %s 僅透過活動獲得
所有麥
+ 你確定要去這個房間嗎?
+ 多人
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 813f68697..869bfd276 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -5335,10 +5335,8 @@ You cannot join again within 24 hours after leaving
VIP %s is only through activity
All mic
-
- guys
- All room
- 您确定要跳转房间吗?
+ Multiplayer
+ Are you sure you want to go to this room?
diff --git a/core/src/main/java/com/chwl/core/gift/GiftModel.java b/core/src/main/java/com/chwl/core/gift/GiftModel.java
index 6dc1c41cd..e5fa6589c 100644
--- a/core/src/main/java/com/chwl/core/gift/GiftModel.java
+++ b/core/src/main/java/com/chwl/core/gift/GiftModel.java
@@ -125,7 +125,7 @@ public class GiftModel extends BaseModel implements IGiftModel {
private void addGiftMessage(CustomAttachment attachment) {
giftQueue.add(attachment);
if (giftQueue.size() == 1) {
- handler.sendEmptyMessageDelayed(0, 200);
+ handler.sendEmptyMessageDelayed(0, 50);
}
}