1、游戏房间界面需美化
This commit is contained in:
@@ -4,6 +4,7 @@ import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -25,15 +26,19 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
private FrameLayout user_layout;
|
||||
private RoundedImageView sud_game_user;
|
||||
private LinearLayout layout;
|
||||
private TextView userName;
|
||||
private FrameLayout vacancy_sud_gameLayout;
|
||||
|
||||
public SudGameUserListViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
vacancy_sud_game = itemView.findViewById(R.id.vacancy_sud_game);
|
||||
vacancy_sud_gameLayout = itemView.findViewById(R.id.vacancy_sud_gameLayout);
|
||||
sud_game_user = itemView.findViewById(R.id.sud_game_user);
|
||||
user_layout = itemView.findViewById(R.id.user_layout);
|
||||
mic_status = itemView.findViewById(R.id.mic_status);
|
||||
layout = itemView.findViewById(R.id.layout);
|
||||
game_status = itemView.findViewById(R.id.game_status);
|
||||
userName= itemView.findViewById(R.id.userName);
|
||||
}
|
||||
|
||||
public void upData(SudGameUserModel sudGameUserModel, SudGameUserListAdapter.SudGameSmallCallBack sudGameSmallCallBack, int position) {
|
||||
@@ -46,7 +51,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
// }
|
||||
// });
|
||||
if (sudGameUserModel.isNullUser()) {
|
||||
vacancy_sud_game.setVisibility(View.VISIBLE);
|
||||
vacancy_sud_gameLayout.setVisibility(View.VISIBLE);
|
||||
user_layout.setVisibility(View.GONE);
|
||||
ViewClicksAntiShake.clicksAntiShake(vacancy_sud_game, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
@@ -55,7 +60,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
vacancy_sud_game.setVisibility(View.GONE);
|
||||
vacancy_sud_gameLayout.setVisibility(View.GONE);
|
||||
user_layout.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display2(itemView.getContext(), sudGameUserModel.getAvatar(), sud_game_user);
|
||||
if (sudGameUserModel.getMicStatus() == 2) {
|
||||
@@ -71,6 +76,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
} else {
|
||||
game_status.setVisibility(View.GONE);
|
||||
}
|
||||
userName.setText(sudGameUserModel.getUserNicename());
|
||||
ViewClicksAntiShake.clicksAntiShake(user_layout, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="8dp" />
|
||||
<corners android:radius="10dp" />
|
||||
<solid android:color="#B3414141" />
|
||||
</shape>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:topLeftRadius="12dp" android:topRightRadius="12dp" />
|
||||
<solid android:color="#201E1A" />
|
||||
<solid android:color="#292929" />
|
||||
</shape>
|
||||
@@ -1,9 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="7dp" />
|
||||
<solid android:color="#3D3D3D" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="7dp" />
|
||||
<solid android:color="#B3414141" />
|
||||
</shape>
|
||||
@@ -19,8 +19,8 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="138dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:background="@drawable/bg_live_sud_game_top_new"
|
||||
@@ -79,30 +79,27 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="98dp"
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="49dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginTop="55dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_history"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live_new" />
|
||||
|
||||
<TextView
|
||||
<ImageView
|
||||
android:id="@+id/exit"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/bg_live_sud_game_back_new"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@mipmap/bg_live_sud_game_back_new2"
|
||||
android:gravity="center"
|
||||
android:text="@string/video_exit"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -141,10 +138,8 @@
|
||||
android:id="@+id/game_seat"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
|
||||
android:src="@mipmap/icon_game_seat" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@@ -156,13 +151,13 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="98dp">
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="93dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_list"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_width="175dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="121dp"
|
||||
android:layout_height="39dp"
|
||||
android:padding="2dp"
|
||||
android:background="@drawable/dialog_live_sud_game_name_bg"
|
||||
android:gravity="center_vertical">
|
||||
@@ -44,7 +44,7 @@
|
||||
app:riv_oval="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
@@ -52,11 +52,13 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp">
|
||||
android:layout_marginTop="1dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/interactive_game_create_room_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
@@ -75,7 +77,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp">
|
||||
android:layout_marginTop="2dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -118,6 +120,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/exit"
|
||||
android:layout_width="30dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@mipmap/bg_live_sud_game_back_new2"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -38,7 +38,9 @@
|
||||
<ImageView
|
||||
android:id="@+id/btn_close"
|
||||
android:layout_width="50dp"
|
||||
android:layout_marginLeft="-35dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_toRightOf="@+id/layout"
|
||||
android:paddingBottom="30dp"
|
||||
android:src="@mipmap/icon_live_close_3" />
|
||||
|
||||
|
||||
@@ -3,50 +3,72 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/vacancy_sud_game"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@mipmap/icon_vacancy_sud_game"
|
||||
android:visibility="visible" />
|
||||
<FrameLayout
|
||||
android:id="@+id/vacancy_sud_gameLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/vacancy_sud_game"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="50dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@mipmap/icon_vacancy_sud_game" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/user_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:layout_height="50dp"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/sud_game_user"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_vacancy_sud_game"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/mic_status"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="9dp"
|
||||
android:layout_height="9dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@mipmap/icon_game_close_wheat_mute" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/game_status"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="11dp"
|
||||
android:layout_marginTop="31dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@mipmap/icon_game_status" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userName"
|
||||
android:text="用户名"
|
||||
android:layout_marginTop="40dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:gravity="center"
|
||||
android:textColor="#333333"
|
||||
android:layout_marginStart="8dp"
|
||||
android:textSize="8dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@@ -1332,7 +1332,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="interactive_game_room_all">All Game</string>
|
||||
<string name="interactive_game_create_room">Create a room</string>
|
||||
<string name="interactive_game_create_room_name">"Room Name: "</string>
|
||||
<string name="interactive_game_create_room_number">Room ID:</string>
|
||||
<string name="interactive_game_create_room_number">ID:</string>
|
||||
<string name="interactive_game_create_room_name_input">Please enter a room name</string>
|
||||
<string name="interactive_game_create_game_type">Game type:</string>
|
||||
<string name="interactive_game_create_game_sill">Game threshold:</string>
|
||||
|
||||
@@ -1329,7 +1329,7 @@
|
||||
<string name="interactive_game_room_all">所有遊戲</string>
|
||||
<string name="interactive_game_create_room">創建房間</string>
|
||||
<string name="interactive_game_create_room_name">房間名稱:</string>
|
||||
<string name="interactive_game_create_room_number">房間號:</string>
|
||||
<string name="interactive_game_create_room_number">ID:</string>
|
||||
<string name="interactive_game_create_room_name_input">請輸入房間名</string>
|
||||
<string name="interactive_game_create_game_type">游戲類型:</string>
|
||||
<string name="interactive_game_create_game_sill">游戲門檻:</string>
|
||||
|
||||
@@ -1328,7 +1328,7 @@
|
||||
<string name="interactive_game_room_all">所有遊戲</string>
|
||||
<string name="interactive_game_create_room">創建房間</string>
|
||||
<string name="interactive_game_create_room_name">房間名稱:</string>
|
||||
<string name="interactive_game_create_room_number">房間號:</string>
|
||||
<string name="interactive_game_create_room_number">ID:</string>
|
||||
<string name="interactive_game_create_room_name_input">請輸入房間名</string>
|
||||
<string name="interactive_game_create_game_type">游戲類型:</string>
|
||||
<string name="interactive_game_create_game_sill">游戲門檻:</string>
|
||||
|
||||
@@ -1327,7 +1327,7 @@
|
||||
<string name="interactive_game_room_all">所有遊戲</string>
|
||||
<string name="interactive_game_create_room">創建房間</string>
|
||||
<string name="interactive_game_create_room_name">房間名稱:</string>
|
||||
<string name="interactive_game_create_room_number">房間號:</string>
|
||||
<string name="interactive_game_create_room_number">ID:</string>
|
||||
<string name="interactive_game_create_room_name_input">請輸入房間名</string>
|
||||
<string name="interactive_game_create_game_type">游戲類型:</string>
|
||||
<string name="interactive_game_create_game_sill">游戲門檻:</string>
|
||||
|
||||
@@ -1335,7 +1335,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="interactive_game_room_all">All Game</string>
|
||||
<string name="interactive_game_create_room">Create a room</string>
|
||||
<string name="interactive_game_create_room_name">"Room Name: "</string>
|
||||
<string name="interactive_game_create_room_number">Room ID:</string>
|
||||
<string name="interactive_game_create_room_number">ID:</string>
|
||||
<string name="interactive_game_create_room_name_input">Please enter a room name</string>
|
||||
<string name="interactive_game_create_game_type">Game type:</string>
|
||||
<string name="interactive_game_create_game_sill">Game threshold:</string>
|
||||
|
||||
Reference in New Issue
Block a user