Parcourir la source

feat: 本地化

tongmengxiao il y a 5 mois
Parent
commit
dfbf99f975
32 fichiers modifiés avec 224 ajouts et 66 suppressions
  1. 8 0
      .idea/misc.xml
  2. 8 6
      app/src/main/java/com/swago/app/SplashActivity.kt
  3. 1 1
      baseswago/src/main/java/com/swago/baseswago/PersonDataDFragment.kt
  4. 1 3
      baseswago/src/main/java/com/swago/glide.kt
  5. 12 1
      baseswago/src/main/res/values-ar/strings.xml
  6. 11 0
      baseswago/src/main/res/values-in/strings.xml
  7. 11 0
      baseswago/src/main/res/values-ms/strings.xml
  8. 12 1
      baseswago/src/main/res/values-zh/strings.xml
  9. 11 0
      baseswago/src/main/res/values/strings.xml
  10. 1 1
      home/src/main/java/com/swago/home/HomeFragment.kt
  11. 1 1
      home/src/main/java/com/swago/home/MessageFragment.kt
  12. 1 1
      login/src/main/java/com/swago/login/FBLogin.kt
  13. 8 8
      login/src/main/java/com/swago/login/LoginActivity.kt
  14. 1 1
      room/src/main/java/com/swago/room/anchor/AnchorRoomActivity.kt
  15. 1 1
      room/src/main/java/com/swago/room/audio/UserByAnchorInviteDialog.kt
  16. 1 1
      room/src/main/java/com/swago/room/base/BaseComFragment.kt
  17. 48 17
      room/src/main/java/com/swago/room/giftdandao/GiftDanDaoView.kt
  18. 1 1
      room/src/main/java/com/swago/room/lianmai/UserLianMaiDialog.kt
  19. 27 14
      room/src/main/java/com/swago/room/piaotiao/WaftView.kt
  20. 3 2
      room/src/main/java/com/swago/room/vm/MsgVm.kt
  21. 56 6
      room/src/main/res/layout/view_waft.xml
  22. BIN
      room/src/main/res/mipmap-xxhdpi/bg_waft_big_prize.png
  23. BIN
      room/src/main/res/mipmap-xxhdpi/bg_waft_function.png
  24. BIN
      room/src/main/res/mipmap-xxhdpi/bg_waft_game.png
  25. BIN
      room/src/main/res/mipmap-xxhdpi/bg_waft_send.png
  26. BIN
      room/src/main/res/mipmap-xxhdpi/ic_waft_big_prize.png
  27. BIN
      room/src/main/res/mipmap-xxhdpi/ic_waft_function.png
  28. BIN
      room/src/main/res/mipmap-xxhdpi/ic_waft_game.png
  29. BIN
      room/src/main/res/mipmap-xxhdpi/ic_waft_send.png
  30. BIN
      room/src/main/res/mipmap-xxhdpi/waft_bg.webp
  31. BIN
      room/src/main/res/mipmap-xxhdpi/waft_big_prize.webp
  32. BIN
      room/src/main/res/mipmap-xxhdpi/waft_game_bg.webp

+ 8 - 0
.idea/misc.xml

@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ASMIdeaPluginConfiguration">
     <asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
@@ -313,4 +314,11 @@
   <component name="SuppressionsComponent">
     <option name="suppComments" value="[]" />
   </component>
+  <component name="VisualizationToolProject">
+    <option name="state">
+      <ProjectState>
+        <option name="scale" value="0.67" />
+      </ProjectState>
+    </option>
+  </component>
 </project>

+ 8 - 6
app/src/main/java/com/swago/app/SplashActivity.kt

@@ -19,6 +19,7 @@ import com.swago.baseswago.model.ConfigModel
 import com.swago.baseswago.util.AppContext
 import com.swago.baseswago.util.FileUtil
 import com.swago.baseswago.util.SpUtil
+import com.swago.loadNoPlaceUrl
 import com.swago.loadUrl
 import java.io.File
 import java.text.SimpleDateFormat
@@ -34,7 +35,7 @@ class SplashActivity : AppCompatActivity() {
     private var mSplashImage:ImageView ?= null
     private var mSplashTime:TextView ?= null
     private lateinit var countDownTimer: CountDownTimer
-    private val totalTimeInMillis: Long = 5000
+    private val totalTimeInMillis: Long = 4000
     private var configModel:ConfigModel ?= null
 
     override fun onCreate(savedInstanceState: Bundle?) {
@@ -57,7 +58,7 @@ class SplashActivity : AppCompatActivity() {
                     } else {
                         Toast.makeText(
                             this@SplashActivity,
-                            "These permissions are denied: $deniedList",
+                            getString(com.swago.login.R.string.these_permissions_denied)+" $deniedList",
                             Toast.LENGTH_LONG
                         ).show()
                         ARouter.getInstance().build(ARouteConstant.Login.login).navigation()
@@ -82,7 +83,7 @@ class SplashActivity : AppCompatActivity() {
                     } else {
                         Toast.makeText(
                             this@SplashActivity,
-                            "These permissions are denied: $deniedList",
+                            getString(com.swago.login.R.string.these_permissions_denied)+" $deniedList",
                             Toast.LENGTH_LONG
                         ).show()
                         ARouter.getInstance().build(ARouteConstant.Login.login).navigation()
@@ -106,7 +107,7 @@ class SplashActivity : AppCompatActivity() {
         countDownTimer = object : CountDownTimer(totalTimeInMillis, 1000) {
             override fun onTick(millisUntilFinished: Long) {
                 val secondsRemaining = millisUntilFinished / 1000
-                mSplashTime?.text = "Skip $secondsRemaining"
+                mSplashTime?.text = "Skip ${secondsRemaining + 1}"
             }
 
             override fun onFinish() {
@@ -126,7 +127,7 @@ class SplashActivity : AppCompatActivity() {
                         count++
                         countDownTimer.start()
                         mSplashTime?.visibility = View.VISIBLE
-                        mSplashImage?.loadUrl(this, it.rotation_img_url,R.drawable.default_splash)
+                        mSplashImage?.loadNoPlaceUrl(this, it.rotation_img_url)
                         SpUtil.putInt("splashCount" , count)
                     } else {
                         splashVm.loginByAuto()
@@ -136,7 +137,7 @@ class SplashActivity : AppCompatActivity() {
                     SpUtil.putString("lastShowDate",currentDate)
                     countDownTimer.start()
                     mSplashTime?.visibility = View.VISIBLE
-                    mSplashImage?.loadUrl(this, it.rotation_img_url,R.drawable.default_splash)
+                    mSplashImage?.loadNoPlaceUrl(this, it.rotation_img_url)
                 }
             }
         }
@@ -150,6 +151,7 @@ class SplashActivity : AppCompatActivity() {
         }
 
         mSplashTime?.setOnClickListener {
+            countDownTimer.cancel()
             splashVm.loginByAuto()
         }
     }

+ 1 - 1
baseswago/src/main/java/com/swago/baseswago/PersonDataDFragment.kt

@@ -134,7 +134,7 @@ class PersonDataDFragment : BaseXDFragment<DialogPersonDataBinding>() {
                                 } else {
                                     Toast.makeText(
                                         AppContext.getContext(),
-                                        "These permissions are denied: $deniedList",
+                                        AppContext.getContext().getString(R.string.these_permissions_denied)+" $deniedList",
                                         Toast.LENGTH_LONG
                                     ).show()
                                 }

+ 1 - 3
baseswago/src/main/java/com/swago/glide.kt

@@ -48,12 +48,10 @@ fun ImageView.loadUrl(context: Context,url:String){
         .into(this)
 }
 
-fun ImageView.loadUrl(context: Context,url:String,resourceId: Int){
+fun ImageView.loadNoPlaceUrl(context: Context,url:String){
     Glide.with(context)
         .load(url)
         .centerCrop()
-        .placeholder(resourceId)
-        .error(resourceId)
         .into(this)
 }
 

+ 12 - 1
baseswago/src/main/res/values-ar/strings.xml

@@ -351,5 +351,16 @@
     <string name="no_time_limit">لا يوجد حد زمني</string>
     <string name="already_owned">مملوكة</string>
     <string name="using">استخدام</string>
-    <string name="local_music">Local Music</string>
+    <string name="local_music">موسيقى محلية</string>
+    <string name="congratulations_to_for_start_of_today">تهانينا لـ %s على حصولهم على NO.%s  في STAR OF TODAY</string>
+    <string name="congratulations_to_for_king_of_game">تهانينا لـ %s على حصولهم على NO.%s في KING OF GAME</string>
+    <string name="so_lucky_golden_egg">محظوظ جدا أنت! تهانينا لـ %s للحصول على %s عملة معدنية في حدث Golden Egg Smashing.</string>
+    <string name="prize_pool_golden_egg">لقد وصل مجموع جوائز Golden Egg Smashing إلى %s، سارع الجميع للمشاركة.</string>
+    <string name="hd">HD</string>
+    <string name="sd">SD</string>
+    <string name="login_cancel">إلغاء تسجيل الدخول</string>
+    <string name="these_permissions_denied">تم رفض هذه الأذونات:</string>
+    <string name="login_fail">فشل تسجيل الدخول</string>
+    <string name="user_refused_invitation">رفض المستخدم دعوتك</string>
+    <string name="user_agreed_invitation">وافق المستخدم على دعوتك</string>
 </resources>

+ 11 - 0
baseswago/src/main/res/values-in/strings.xml

@@ -364,4 +364,15 @@
     <string name="already_owned">dimiliki</string>
     <string name="using">digunakan</string>
     <string name="local_music">Local Music</string>
+    <string name="congratulations_to_for_start_of_today">Selamat kepada %s yang telah menjadi NO.%s di STAR OF TODAY</string>
+    <string name="congratulations_to_for_king_of_game">Selamat kepada %s yang telah menjadi NO.%s di KING OF GAME</string>
+    <string name="so_lucky_golden_egg">Beruntung sekali! Selamat kepada %s telah mendapatkan bonus %s koin  di Event Golden Egg.</string>
+    <string name="prize_pool_golden_egg">Jumlah jackpot sudah tercapai %s dalam Event Golden Egg.Ayo,berpartisipasi event ini dan menangkan bonus besar.</string>
+    <string name="hd">HD</string>
+    <string name="sd">SD</string>
+    <string name="login_cancel">Batalkan masuk</string>
+    <string name="these_permissions_denied">Izin ditolak</string>
+    <string name="login_fail">Gagal masuk</string>
+    <string name="user_refused_invitation">Pengguna menolak undangan Anda</string>
+    <string name="user_agreed_invitation">Pengguna menyetujui undangan Anda</string>
 </resources>

+ 11 - 0
baseswago/src/main/res/values-ms/strings.xml

@@ -364,4 +364,15 @@
     <string name="already_owned">dimiliki</string>
     <string name="using">digunakan</string>
     <string name="local_music">Local Music</string>
+    <string name="congratulations_to_for_start_of_today">Tahniah kepada %s kerana menjadi NO.%s di STAR OF TODAY</string>
+    <string name="congratulations_to_for_king_of_game">Tahniah kepada %s kerana menjadi NO.%s dalam KING OF GAME</string>
+    <string name="so_lucky_golden_egg">Sangat bertuah! Tahniah kepada %s kerana mendapat bonus syiling %s di Acara Telur Emas.</string>
+    <string name="prize_pool_golden_egg">Jumlah jackpot sudah tercapai %s dalam Event Golden Egg.Ayo,berpartisipasi event ini dan menangkan bonus besar.</string>
+    <string name="hd">HD</string>
+    <string name="sd">SD</string>
+    <string name="login_cancel">Batalkan log masuk</string>
+    <string name="these_permissions_denied">Kebenaran ditolak</string>
+    <string name="login_fail">Daftar masuk gagal</string>
+    <string name="user_refused_invitation">Pengguna menolak jemputan anda</string>
+    <string name="user_agreed_invitation">Pengguna menerima jemputan anda</string>
 </resources>

+ 12 - 1
baseswago/src/main/res/values-zh/strings.xml

@@ -140,7 +140,7 @@
     <string name="share_to">分享至</string>
     <string name="app_not_install">应用未安装</string>
     <string name="follow_anchor">刚刚关注了主播,再也不用担心错过直播啦~</string>
-    <string name="big_prize">真是幸运!%s送出%s赢得了%s倍奖励,恭喜他!</string>
+    <string name="big_prize">真是幸运!%s送出%s赢得了%s倍\n奖励,恭喜他!</string>
     <string name="update_now">立即更新</string>
 
     <string name="special">特殊</string>
@@ -352,4 +352,15 @@
     <string name="already_owned">已拥有</string>
     <string name="using">使用中</string>
     <string name="local_music">本地音乐</string>
+    <string name="congratulations_to_for_start_of_today">恭喜%s成为本场今日之星活动第%s名</string>
+    <string name="congratulations_to_for_king_of_game">恭喜%s成为本场游戏之王活动第%s名</string>
+    <string name="so_lucky_golden_egg">太幸运啦,恭喜%s在砸金蛋活动中得到%s金币奖励</string>
+    <string name="prize_pool_golden_egg">砸金蛋活动奖池已经达到%s,大家快去参与呀</string>
+    <string name="hd">HD</string>
+    <string name="sd">SD</string>
+    <string name="login_cancel">取消登录</string>
+    <string name="these_permissions_denied">权限被拒绝</string>
+    <string name="login_fail">登录失败</string>
+    <string name="user_refused_invitation">用户拒绝了你的邀请</string>
+    <string name="user_agreed_invitation">用户同意了你的邀请</string>
 </resources>

+ 11 - 0
baseswago/src/main/res/values/strings.xml

@@ -384,4 +384,15 @@
     <string name="already_owned">owned</string>
     <string name="using">using</string>
     <string name="local_music">Local Music</string>
+    <string name="congratulations_to_for_start_of_today">Congratulations to %s for becoming the NO.%s in STAR OF TODAY</string>
+    <string name="congratulations_to_for_king_of_game">Congratulations to %s for becoming the NO.%s in  KING OF GAME</string>
+    <string name="so_lucky_golden_egg">So lucky you are! Congratulations to %s for getting %s coins in the Golden Egg Smashing event.</string>
+    <string name="prize_pool_golden_egg">The prize pool for the Golden Egg Smashing has reached %s, everyone hurry up and participate.</string>
+    <string name="hd">HD</string>
+    <string name="sd">SD</string>
+    <string name="login_cancel">Login cancel</string>
+    <string name="these_permissions_denied">These permissions are denied:</string>
+    <string name="login_fail">login fail</string>
+    <string name="user_refused_invitation">user refused your invitation</string>
+    <string name="user_agreed_invitation">user agreed your invitation</string>
 </resources>

+ 1 - 1
home/src/main/java/com/swago/home/HomeFragment.kt

@@ -127,7 +127,7 @@ class HomeFragment : BaseXFragment<FragmentHomeBinding>() {
                             binding.ivLive.isEnabled = true
                             Toast.makeText(
                                 AppContext.getContext(),
-                                "These permissions are denied: $deniedList",
+                                AppContext.getContext().getString(R.string.these_permissions_denied)+" $deniedList",
                                 Toast.LENGTH_LONG
                             ).show()
                         }

+ 1 - 1
home/src/main/java/com/swago/home/MessageFragment.kt

@@ -49,7 +49,7 @@ class MessageFragment : BaseXFragment<FragmentMessageBinding>() {
                     } else {
                         Toast.makeText(
                             AppContext.getContext(),
-                            "These permissions are denied: $deniedList",
+                            AppContext.getContext().getString(R.string.these_permissions_denied)+" $deniedList",
                             Toast.LENGTH_LONG
                         ).show()
                     }

+ 1 - 1
login/src/main/java/com/swago/login/FBLogin.kt

@@ -20,7 +20,7 @@ object FBLogin {
             .registerCallback(manager, object : FacebookCallback<LoginResult> {
 
                 override fun onCancel() {
-                    Toast.makeText(AppContext.getContext(), "Login Cancel", Toast.LENGTH_SHORT)
+                    Toast.makeText(AppContext.getContext(), AppContext.getContext().getString(R.string.login_cancel), Toast.LENGTH_SHORT)
                         .show()
                 }
 

+ 8 - 8
login/src/main/java/com/swago/login/LoginActivity.kt

@@ -70,7 +70,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                                     FBLogin.login(this@LoginActivity)
                                     Toast.makeText(
                                         this@LoginActivity,
-                                        "These permissions are denied: $deniedList",
+                                        getString(R.string.these_permissions_denied)+ "$deniedList",
                                         Toast.LENGTH_LONG
                                     ).show()
                                 }
@@ -87,7 +87,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                                     FBLogin.login(this@LoginActivity)
                                     Toast.makeText(
                                         this@LoginActivity,
-                                        "These permissions are denied: $deniedList",
+                                        getString(R.string.these_permissions_denied)+ "$deniedList",
                                         Toast.LENGTH_LONG
                                     ).show()
                                 }
@@ -114,7 +114,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                                     GoogleLogin.login(this@LoginActivity)
                                     Toast.makeText(
                                         this@LoginActivity,
-                                        "These permissions are denied: $deniedList",
+                                        getString(R.string.these_permissions_denied)+"$deniedList",
                                         Toast.LENGTH_LONG
                                     ).show()
                                 }
@@ -131,7 +131,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                                     GoogleLogin.login(this@LoginActivity)
                                     Toast.makeText(
                                         this@LoginActivity,
-                                        "These permissions are denied: $deniedList",
+                                        getString(R.string.these_permissions_denied)+"$deniedList",
                                         Toast.LENGTH_LONG
                                     ).show()
                                 }
@@ -201,7 +201,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                                 loginVm.loginByAccount(account, secret)
                                 Toast.makeText(
                                     this@LoginActivity,
-                                    "These permissions are denied: $deniedList",
+                                    getString(R.string.these_permissions_denied)+" $deniedList",
                                     Toast.LENGTH_LONG
                                 ).show()
                             }
@@ -224,7 +224,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                                 loginVm.loginByAccount(account, secret)
                                 Toast.makeText(
                                     this@LoginActivity,
-                                    "These permissions are denied: $deniedList",
+                                    getString(R.string.these_permissions_denied)+" $deniedList",
                                     Toast.LENGTH_LONG
                                 ).show()
                             }
@@ -255,7 +255,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                         GoogleSignInStatusCodes.SIGN_IN_FAILED -> {
                             Toast.makeText(
                                 AppContext.getContext(),
-                                "login fail-${e.statusCode}",
+                                AppContext.getContext().getString(R.string.login_fail)+"-${e.statusCode}",
                                 Toast.LENGTH_SHORT
                             ).show()
                         }
@@ -263,7 +263,7 @@ class LoginActivity : BaseXActivity<ActivityLoginBinding>() {
                         CommonStatusCodes.CANCELED -> {
                             Toast.makeText(
                                 AppContext.getContext(),
-                                "login cancel-${e.statusCode}",
+                                AppContext.getContext().getString(R.string.login_cancel)+"-${e.statusCode}",
                                 Toast.LENGTH_SHORT
                             ).show()
                         }

+ 1 - 1
room/src/main/java/com/swago/room/anchor/AnchorRoomActivity.kt

@@ -283,7 +283,7 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
                                 binding.tvStartLive.isEnabled = true
                                 Toast.makeText(
                                     AppContext.getContext(),
-                                    "These permissions are denied: $deniedList",
+                                    AppContext.getContext().getString(R.string.these_permissions_denied)+" $deniedList",
                                     Toast.LENGTH_LONG
                                 ).show()
                             }

+ 1 - 1
room/src/main/java/com/swago/room/audio/UserByAnchorInviteDialog.kt

@@ -89,7 +89,7 @@ class UserByAnchorInviteDialog  : BaseXDFragment<DialogInvitedByAnchorMicBinding
                                 } else {
                                     Toast.makeText(
                                         AppContext.getContext(),
-                                        "These permissions are denied: $deniedList",
+                                        AppContext.getContext().getString(R.string.these_permissions_denied)+" $deniedList",
                                         Toast.LENGTH_LONG
                                     ).show()
                                 }

+ 1 - 1
room/src/main/java/com/swago/room/base/BaseComFragment.kt

@@ -294,7 +294,7 @@ abstract class BaseComFragment<T : FragmentBaseComBinding> : BaseXFragment<T>(),
                                                 } else {
                                                     Toast.makeText(
                                                         AppContext.getContext(),
-                                                        "These permissions are denied: $deniedList",
+                                                        AppContext.getContext().getString(R.string.these_permissions_denied)+" $deniedList",
                                                         Toast.LENGTH_LONG
                                                     ).show()
                                                 }

+ 48 - 17
room/src/main/java/com/swago/room/giftdandao/GiftDanDaoView.kt

@@ -245,46 +245,77 @@ class GiftDanDaoView : FrameLayout {
             if (imGiftModel.multiple != 0) {
                 when (imGiftModel.multiple) {
                     in 1..99 -> {
-                        clPrize.visibility = View.VISIBLE
-                        ivPrizeBg.visibility = View.INVISIBLE
-                        ivPrizeFrame.setImageResource(R.mipmap.gift_prize_frame_1_99)
+                        iv.visibility = View.VISIBLE
+                        tvWinPrize2.visibility = View.GONE
+                        svgaWinPrize.visibility = View.GONE
+                        clPrize.visibility = View.GONE
+                        val layoutParams = tvWinPrize.layoutParams as ConstraintLayout.LayoutParams
+                        layoutParams.marginStart = DpPxUtil.dip2px(10f)
+                        tvWinPrize.layoutParams = layoutParams
+                        iv.setImageResource(R.mipmap.win_1_50_prize)
+                        clWinPrize.visibility = View.VISIBLE
+                        tvWinPrize.text =
+                            AppContext.getContext().resources.getString(R.string.win_num_prize)
+                                .format(imGiftModel.multiple)
                     }
 
                     in 100..499 -> {
-                        clPrize.visibility = View.VISIBLE
-                        ivPrizeBg.visibility = View.VISIBLE
+                        iv.visibility = View.GONE
                         ivPrizeBg.setImageResource(R.mipmap.gift_bg_prize_100_499)
                         ivPrizeFrame.setImageResource(R.mipmap.gift_prize_frame_100_499)
                     }
 
                     in 500..999 -> {
-                        clPrize.visibility = View.VISIBLE
-                        ivPrizeBg.visibility = View.VISIBLE
+                        iv.visibility = View.GONE
                         ivPrizeBg.setImageResource(R.mipmap.gift_bg_prize_100_499)
                         ivPrizeFrame.setImageResource(R.mipmap.gift_prize_frame_500_999)
                     }
                     else -> {
+                        iv.visibility = View.GONE
                         UserInfo.getUserInfo()?.let {  userInfoModel ->
                             if (userInfoModel.id == imGiftModel.senderId && imGiftModel.giftId.toInt() == 202){
                                 vibrator?.vibrate(2500)
                             }
                         }
-                        clPrize.visibility = View.VISIBLE
-                        ivPrizeBg.visibility = View.VISIBLE
                         ivPrizeBg.setImageResource(R.mipmap.gift_bg_prize_1000)
                         ivPrizeFrame.setImageResource(R.mipmap.gift_prize_frame_1000)
                     }
                 }
+                if (iv.visibility == VISIBLE){
+                    clWinPrize.removeCallbacks(winPrizeRunnable)
+                    clWinPrize.postDelayed(winPrizeRunnable, 1500)
+                } else {
+                    if (giftEnterAnimator.isRunning && handler !=null){
+                        handler.postDelayed({
+                            clPrize.visibility = View.VISIBLE
+                            ivPrizeBg.visibility = View.VISIBLE
+                            clPrize.removeCallbacks(winPrizeRunnable)
+                            clPrize.postDelayed(winPrizeRunnable, 1500)
+                            if (aniamtionRotate?.isRunning ==false){
+                                aniamtionRotate?.start()
+                            }
+                            if (aniamtionScale?.isRunning ==false){
+                                aniamtionScale?.start()
+                            }
+                            loadGiftPrizeNum(imGiftModel.multiple)
+                        },300)
+                    } else {
+                        clPrize.visibility = View.VISIBLE
+                        ivPrizeBg.visibility = View.VISIBLE
+                        clPrize.removeCallbacks(winPrizeRunnable)
+                        clPrize.postDelayed(winPrizeRunnable, 1500)
+                        if (aniamtionRotate?.isRunning ==false){
+                            aniamtionRotate?.start()
+                        }
+                        if (aniamtionScale?.isRunning ==false){
+                            aniamtionScale?.start()
+                        }
+                        loadGiftPrizeNum(imGiftModel.multiple)
+                    }
 
-                clPrize.removeCallbacks(winPrizeRunnable)
-                clPrize.postDelayed(winPrizeRunnable, 1500)
-                if (aniamtionRotate?.isRunning ==false){
-                    aniamtionRotate?.start()
-                }
-                if (aniamtionScale?.isRunning ==false){
-                    aniamtionScale?.start()
                 }
-                loadGiftPrizeNum(imGiftModel.multiple)
+
+
             }
         }
     }

+ 1 - 1
room/src/main/java/com/swago/room/lianmai/UserLianMaiDialog.kt

@@ -80,7 +80,7 @@ class UserLianMaiDialog : BaseXDFragment<DialogUserLianMaiBinding>(),IRoomActive
                             } else {
                                 Toast.makeText(
                                     AppContext.getContext(),
-                                    "These permissions are denied: $deniedList",
+                                    AppContext.getContext().getString(R.string.these_permissions_denied)+" $deniedList",
                                     Toast.LENGTH_LONG
                                 ).show()
                             }

+ 27 - 14
room/src/main/java/com/swago/room/piaotiao/WaftView.kt

@@ -121,14 +121,18 @@ class WaftView : FrameLayout {
                     val sendName = "<font color='#FFDB43'>${next.senderName}</font>"
                     val giftName = "<font color='#FFDB43'>${localName}</font>"
                     val multiple = "<font color='#FFDB43'>${next.multiple}</font>"
-                    binding?.ll?.setBackgroundResource(R.mipmap.waft_big_prize)
+                    binding?.ll?.setBackgroundResource(R.mipmap.bg_waft_big_prize)
+                    binding?.ivPrize?.setImageResource(R.mipmap.ic_waft_big_prize)
+                    binding?.tvPrize?.text = "${next.multiple}"
                     binding?.marqueeTextView?.text = Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.big_prize).format(sendName,giftName,multiple)}")
 
                 }else{
                     val sendName = "<font color='#FFDB43'>${next.senderName}</font>"
                     val giftName = "<font color='#FFDB43'>${localName}</font>"
                     val receiverName = "<font color='#FFDB43'>${next.receiverName}</font>"
-                    binding?.ll?.setBackgroundResource(R.mipmap.waft_bg)
+                    binding?.ll?.setBackgroundResource(R.mipmap.bg_waft_send)
+                    binding?.ivPrize?.setImageResource(R.mipmap.ic_waft_send)
+                    binding?.tvPrize?.text = ""
                     binding?.marqueeTextView?.text = Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.big_gift_msg).format(sendName,giftName,receiverName)}")
                 }
             }
@@ -137,7 +141,9 @@ class WaftView : FrameLayout {
                 val sendName = "<font color='#FFDB43'>${next.senderName}</font>"
                 val gameName = "<font color='#FFDB43'>${next.gameName}</font>"
                 val coin = "<font color='#FFDB43'>${next.coin}</font>"
-                binding?.ll?.setBackgroundResource(R.mipmap.waft_game_bg)
+                binding?.ll?.setBackgroundResource(R.mipmap.bg_waft_game)
+                binding?.tvPrize?.setBackgroundResource(R.mipmap.ic_waft_game)
+                binding?.tvPrize?.text = ""
                 when(SwagoInfo.getLanguageCode()){
                     "id","ms" -> {
                         binding?.marqueeTextView?.text = Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.game_prize).format(sendName,coin,gameName)}")
@@ -152,26 +158,33 @@ class WaftView : FrameLayout {
                     505 -> {
                         val sendName = "<font color='#FFDB43'>${next.userName}</font>"
                         val coin = "<font color='#FFDB43'>${next.sort}</font>"
-                        binding?.ll?.setBackgroundResource(R.mipmap.waft_game_bg)
-                        binding?.marqueeTextView?.text = "恭喜XXXX成为本场今日之星活动第1名"
+                        binding?.ll?.setBackgroundResource(R.mipmap.bg_waft_function)
+                        binding?.ivPrize?.setImageResource(R.mipmap.ic_waft_function)
+                        binding?.tvPrize?.text = ""
+                        binding?.marqueeTextView?.text =  Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.congratulations_to_for_start_of_today).format(sendName,coin)}")
                     }
                     506 -> {
                         val sendName = "<font color='#FFDB43'>${next.userName}</font>"
                         val coin = "<font color='#FFDB43'>${next.sort}</font>"
-                        binding?.ll?.setBackgroundResource(R.mipmap.waft_game_bg)
-                        binding?.marqueeTextView?.text = "恭喜XXXX成为本场游戏之王活动第1名"
+                        binding?.ll?.setBackgroundResource(R.mipmap.bg_waft_function)
+                        binding?.ivPrize?.setImageResource(R.mipmap.ic_waft_function)
+                        binding?.tvPrize?.text = ""
+                        binding?.marqueeTextView?.text =  Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.congratulations_to_for_king_of_game).format(sendName,coin)}")
                     }
                     507 -> {
                         val sendName = "<font color='#FFDB43'>${next.userName}</font>"
-                        val coin = "<font color='#FFDB43'>${next.sort}</font>"
-                        binding?.ll?.setBackgroundResource(R.mipmap.waft_game_bg)
-                        binding?.marqueeTextView?.text = "太幸运啦,恭喜XXXX在砸金蛋活动中得到XXX金币奖励"
+                        val coin = "<font color='#FFDB43'>${next.winCoin}</font>"
+                        binding?.ll?.setBackgroundResource(R.mipmap.bg_waft_function)
+                        binding?.ivPrize?.setImageResource(R.mipmap.ic_waft_function)
+                        binding?.tvPrize?.text = ""
+                        binding?.marqueeTextView?.text =  Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.so_lucky_golden_egg).format(sendName,coin)}")
                     }
                     508 -> {
-                        val sendName = "<font color='#FFDB43'>${next.userName}</font>"
-                        val coin = "<font color='#FFDB43'>${next.sort}</font>"
-                        binding?.ll?.setBackgroundResource(R.mipmap.waft_game_bg)
-                        binding?.marqueeTextView?.text = "砸金蛋活动奖池已经达到xxxx,大家快去参与呀"
+                        val coin = "<font color='#FFDB43'>${next.actCoin}</font>"
+                        binding?.ll?.setBackgroundResource(R.mipmap.bg_waft_function)
+                        binding?.ivPrize?.setImageResource(R.mipmap.ic_waft_function)
+                        binding?.tvPrize?.text = ""
+                        binding?.marqueeTextView?.text =  Html.fromHtml("\u200E${AppContext.getContext().resources.getString(R.string.prize_pool_golden_egg).format(coin)}")
                     }
                 }
 

+ 3 - 2
room/src/main/java/com/swago/room/vm/MsgVm.kt

@@ -62,6 +62,7 @@ import com.swago.baseswago.model.live.gift.IMGiftModel
 import com.swago.baseswago.util.AppContext
 import com.swago.baseswago.util.BitmapUtils
 import com.swago.baseswago.util.UserInfo
+import com.swago.room.R
 import com.swago.room.audio.AudioRoomManager
 import com.swago.room.audio.IAudioRoomListener
 import com.swago.room.bean.UserRoomModel
@@ -511,7 +512,7 @@ class MsgVm(application: Application) : AbsMsgVm(application) {
                             if (userInfoModel.id == it.receiverId) {
                                 Toast.makeText(
                                     AppContext.getContext(),
-                                    "用户同意了您的邀请",
+                                    AppContext.getContext().getString(R.string.user_agreed_invitation),
                                     Toast.LENGTH_SHORT
                                 ).show()
                             }
@@ -533,7 +534,7 @@ class MsgVm(application: Application) : AbsMsgVm(application) {
                                 //被邀请的用户弹窗
                                 Toast.makeText(
                                     AppContext.getContext(),
-                                    "用户拒绝了您的邀请",
+                                    AppContext.getContext().getString(R.string.user_refused_invitation),
                                     Toast.LENGTH_SHORT
                                 ).show()
                             }

+ 56 - 6
room/src/main/res/layout/view_waft.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="350dp"
     android:layout_height="wrap_content"
     xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -10,18 +10,68 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:orientation="horizontal"
     android:gravity="center_vertical"
-    android:background="@mipmap/waft_bg">
+    android:background="@mipmap/bg_waft_big_prize">
+    <ImageView
+        android:id="@+id/iv_prize"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        android:background="@mipmap/ic_waft_big_prize"/>
+
+    <TextView
+        android:id="@+id/tv_prize"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textSize="18sp"
+        tools:text="123"
+        android:typeface="monospace"
+        android:textStyle="bold"
+        android:textColor="#FFF000"
+        android:gravity="center"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="@+id/iv_prize"
+        app:layout_constraintStart_toStartOf="@+id/iv_prize"/>
+
+    <de.hdodenhof.circleimageview.CircleImageView
+        android:id="@+id/ivAvatar"
+        android:src="@mipmap/default_avatar"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        android:layout_marginStart="18dp"
+        android:layout_width="28dp"
+        android:layout_height="28dp"/>
+
+    <com.opensource.svgaplayer.SVGAImageView
+        android:id="@+id/svgAvatar"
+        android:layout_width="34dp"
+        android:layout_height="34dp"
+        android:visibility="visible"
+        android:layout_marginStart="18dp"
+        app:autoPlay="true"
+        app:loopCount="0"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"/>
 
     <com.swago.room.widget.MarqueeTextView
         android:id="@+id/marqueeTextView"
-        android:layout_marginStart="35dp"
-        android:layout_width="290dp"
+        android:layout_width="260dp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toBottomOf="parent"
         android:layout_height="wrap_content"
-        android:textSize="16dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginBottom="20dp"
+        android:textSize="14dp"
         tools:text="ddddd"
         android:layout_gravity="center"
         android:textColor="@color/white"
         app:scroll_first_delay="1000"
         app:scroll_interval="6000"
         app:scroll_mode="mode_forever"/>
-</LinearLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>

BIN
room/src/main/res/mipmap-xxhdpi/bg_waft_big_prize.png


BIN
room/src/main/res/mipmap-xxhdpi/bg_waft_function.png


BIN
room/src/main/res/mipmap-xxhdpi/bg_waft_game.png


BIN
room/src/main/res/mipmap-xxhdpi/bg_waft_send.png


BIN
room/src/main/res/mipmap-xxhdpi/ic_waft_big_prize.png


BIN
room/src/main/res/mipmap-xxhdpi/ic_waft_function.png


BIN
room/src/main/res/mipmap-xxhdpi/ic_waft_game.png


BIN
room/src/main/res/mipmap-xxhdpi/ic_waft_send.png


BIN
room/src/main/res/mipmap-xxhdpi/waft_bg.webp


BIN
room/src/main/res/mipmap-xxhdpi/waft_big_prize.webp


BIN
room/src/main/res/mipmap-xxhdpi/waft_game_bg.webp