瀏覽代碼

1.修改直播玩游戏UI

王鹏鹏 2 年之前
父節點
當前提交
fed1f04dad

+ 5 - 0
game/src/main/java/com/yingyangfly/game/play/PlayGameActivity.kt

@@ -122,6 +122,11 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
             binding.tvIntroduce.text = gameShortDesn
         }
         binding.tvGameLevel.show(TextUtils.equals("D", playClass).not())
+        if (TextUtils.equals("D", playClass)) {
+            binding.imagePause.setBackgroundResource(R.mipmap.bg_game_live)
+        } else {
+            binding.imagePause.setBackgroundResource(R.mipmap.bg_game_pause)
+        }
     }
 
     @SuppressLint("ClickableViewAccessibility")

+ 6 - 5
game/src/main/res/layout/activity_play_game.xml

@@ -125,7 +125,7 @@
                             android:id="@+id/tvScores"
                             android:layout_width="@dimen/divider_195px"
                             android:layout_height="@dimen/divider_74px"
-                            android:layout_marginStart="@dimen/divider_200px"
+                            android:layout_marginStart="@dimen/divider_260px"
                             android:layout_marginTop="@dimen/divider_23px"
                             android:background="@drawable/bg_full_game_text"
                             android:fontFamily="@font/lcb"
@@ -284,11 +284,12 @@
 
         <androidx.appcompat.widget.AppCompatImageView
             android:id="@+id/imagePause"
-            android:layout_width="@dimen/divider_270px"
-            android:layout_height="@dimen/divider_284px"
+            android:layout_width="@dimen/divider_180px"
+            android:layout_height="@dimen/divider_118px"
             android:layout_gravity="start|top"
-            android:layout_marginTop="@dimen/divider_4px"
-            android:background="@mipmap/bg_game_pause" />
+            android:layout_marginStart="@dimen/divider_25px"
+            android:layout_marginTop="@dimen/divider_20px"
+            android:scaleType="centerInside" />
 
         <androidx.appcompat.widget.AppCompatTextView
             android:id="@+id/tvFullScreen"

二進制
game/src/main/res/mipmap-xxhdpi/bg_game_live.png


二進制
game/src/main/res/mipmap-xxhdpi/bg_game_pause.png