|
@@ -20,6 +20,7 @@ import com.swago.baseswago.util.SwagoInfo
|
|
|
import com.swago.room.R
|
|
|
import com.swago.room.databinding.ViewItemGiftBinding
|
|
|
import com.swago.room.databinding.ViewWaftBinding
|
|
|
+import com.swago.room.sound.SoundPoolPlayer
|
|
|
import com.swago.room.widget.MarqueeTextView
|
|
|
import java.util.*
|
|
|
|
|
@@ -121,6 +122,10 @@ class WaftView : FrameLayout {
|
|
|
val multiple = "<font color='#FFDB43'>${next.multiple}</font>"
|
|
|
binding?.ll?.setBackgroundResource(R.mipmap.waft_big_prize)
|
|
|
binding?.marqueeTextView?.text = Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.big_prize).format(sendName,giftName,multiple)}")
|
|
|
+ with(SoundPoolPlayer){
|
|
|
+ init(context)
|
|
|
+ playSound()
|
|
|
+ }
|
|
|
}else{
|
|
|
val sendName = "<font color='#FFDB43'>${next.senderName}</font>"
|
|
|
val giftName = "<font color='#FFDB43'>${localName}</font>"
|
|
@@ -165,6 +170,9 @@ class WaftView : FrameLayout {
|
|
|
imGiftModelList.clear()
|
|
|
animatorSet = null
|
|
|
binding?.ll?.visibility = View.INVISIBLE
|
|
|
+ with( SoundPoolPlayer){
|
|
|
+ release()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|