|
@@ -24,6 +24,7 @@ import com.swago.baseswago.model.live.gift.IMGiftModel
|
|
|
import com.swago.baseswago.util.AppContext
|
|
|
import com.swago.baseswago.util.DpPxUtil
|
|
|
import com.swago.baseswago.util.LogUtil
|
|
|
+import com.swago.baseswago.util.SwagoInfo
|
|
|
import com.swago.baseswago.util.UserInfo
|
|
|
import com.swago.room.BuildConfig
|
|
|
import com.swago.room.R
|
|
@@ -37,6 +38,7 @@ import java.io.File
|
|
|
class GiftDanDaoView : FrameLayout {
|
|
|
|
|
|
var isBusy = false
|
|
|
+ var isDevicesRtl = false
|
|
|
private var binding: ViewItemGiftBinding? = null
|
|
|
private var svgParser: SVGAParser? = null
|
|
|
private var svgParser2: SVGAParser? = null
|
|
@@ -70,6 +72,7 @@ class GiftDanDaoView : FrameLayout {
|
|
|
val imageView = ImageView(context)
|
|
|
imageViewData.add(imageView)
|
|
|
}
|
|
|
+ isDevicesRtl = SwagoInfo.isMirror()
|
|
|
}
|
|
|
|
|
|
fun addData(imGiftModel: IMGiftModel) {
|
|
@@ -117,13 +120,23 @@ class GiftDanDaoView : FrameLayout {
|
|
|
if (giftCount in 1..198){
|
|
|
ivBg.visibility = View.VISIBLE
|
|
|
tvNum.visibility = View.VISIBLE
|
|
|
- tvNum.text = "x${giftCount}"
|
|
|
+ tvNum.text = "x${giftCount} "
|
|
|
+ if (isDevicesRtl){
|
|
|
+ ivBg.scaleX = -1f
|
|
|
+ } else {
|
|
|
+ ivBg.scaleX = 1f
|
|
|
+ }
|
|
|
ivBg.setImageResource(R.mipmap.bg_dan_dao_one)
|
|
|
}
|
|
|
if (giftCount in 199..498){
|
|
|
ivBg.visibility = View.VISIBLE
|
|
|
tvNum.visibility = View.VISIBLE
|
|
|
- tvNum.text = "x${giftCount}"
|
|
|
+ tvNum.text = "x${giftCount} "
|
|
|
+ if (isDevicesRtl){
|
|
|
+ ivBg.scaleX = -1f
|
|
|
+ } else {
|
|
|
+ ivBg.scaleX = 1f
|
|
|
+ }
|
|
|
ivBg.setImageResource(R.mipmap.bg_dan_dao_two)
|
|
|
}
|
|
|
if (giftCount in 499..998){
|