1.守护榜页面需美化

2.直播间功能栏美化
3.游戏房间界面需美化
This commit is contained in:
Martin 2024-06-26 17:27:29 +08:00
parent dd7eb2326a
commit b68c7f1c46
20 changed files with 212 additions and 115 deletions

View File

@ -15,6 +15,7 @@ import com.yunbao.common.event.CustomDrawerPopupEvent;
import com.yunbao.common.event.LiveNewRoleEvent;
import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.InteractionGamesChildBottomViewHolder;
import com.yunbao.common.views.InteractionGamesChildViewHolder;
import java.util.ArrayList;
@ -34,14 +35,14 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false);
return new InteractionGamesChildViewHolder(runGamesView);
return new InteractionGamesChildBottomViewHolder(runGamesView,mContext);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
InteractionGamesChildViewHolder childViewHolder = (InteractionGamesChildViewHolder) holder;
InteractionGamesChildBottomViewHolder childViewHolder = (InteractionGamesChildBottomViewHolder) holder;
childViewHolder.setData(child.get(position), rigts);
childViewHolder.setItemViewClicks(new InteractionGamesChildViewHolder.InteractionGamesCallBack() {
childViewHolder.setItemViewClicks(new InteractionGamesChildBottomViewHolder.InteractionGamesCallBack() {
@Override
public void onItemViewClicks(CustomSidebarChildModel model, boolean rigts) {

View File

@ -45,7 +45,7 @@ public class LiveNewRolerPopupAdapter extends RecyclerView.Adapter {
return new LiveNewRoleRigtsInterestsViewHolder(rightsInterestsView,showRed);
default:
View gamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_interaction_games_view, parent, false);
return new LiveNewRoleInteractionGamesViewHolder(gamesView);
return new LiveNewRoleInteractionGamesViewHolder(gamesView,mContext);
}
}

View File

@ -0,0 +1,68 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class InteractionGamesChildBottomViewHolder extends RecyclerView.ViewHolder {
private ImageView funGamePic;
private TextView funGameName;
private Context mContext;
public InteractionGamesChildBottomViewHolder(@NonNull View itemView, Context context) {
super(itemView);
this.mContext = context;
funGamePic = itemView.findViewById(R.id.fun_game_pic);
funGameName = itemView.findViewById(R.id.fun_game_name);
}
public void setData(CustomSidebarChildModel model, boolean rigts) {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams((int)
(mContext.getResources().getDisplayMetrics().widthPixels / 4.5),
ViewGroup.LayoutParams.WRAP_CONTENT);
itemView.setLayoutParams(layoutParams);
if (rigts) {
ImgLoader.display(itemView.getContext(), model.getIcon(), funGamePic);
} else {
ImgLoader.display(itemView.getContext(), model.getResIcon(), funGamePic);
}
funGameName.setText(model.getTitle());
if (!TextUtils.isEmpty(model.getSudGameIsNew())&&TextUtils.equals(model.getSudGameIsNew(),"1")){
itemView.findViewById(R.id.icon_new_game).setVisibility(View.VISIBLE);
}else {
itemView.findViewById(R.id.icon_new_game).setVisibility(View.GONE);
}
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (interactionGamesCallBack != null) {
interactionGamesCallBack.onItemViewClicks(model, rigts);
}
}
});
}
private InteractionGamesCallBack interactionGamesCallBack;
public void setItemViewClicks(InteractionGamesCallBack callBack) {
interactionGamesCallBack = callBack;
}
public interface InteractionGamesCallBack {
void onItemViewClicks(CustomSidebarChildModel model, boolean rigts);
}
}

View File

@ -1,11 +1,13 @@
package com.yunbao.common.views;
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
@ -21,14 +23,14 @@ public class LiveNewRoleInteractionGamesViewHolder extends RecyclerView.ViewHold
private RecyclerView childList;
private ImageView selectMoreIcon;
boolean isShowMore = true;
public LiveNewRoleInteractionGamesViewHolder(@NonNull View itemView) {
public LiveNewRoleInteractionGamesViewHolder(@NonNull View itemView, Context context) {
super(itemView);
sendGoodGift = itemView.findViewById(R.id.send_good_gift);
childList = itemView.findViewById(R.id.child_list);
selectMoreIcon = itemView.findViewById(R.id.select_more_icon);
funGamesAdapter = new LiveNewRoleInteractionGamesAdapter(itemView.getContext(), true);
childList.setLayoutManager(new GridLayoutManager(itemView.getContext(), 4));
LinearLayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
childList.setLayoutManager(layoutManager);
childList.setAdapter(funGamesAdapter);
}

View File

@ -98,7 +98,7 @@ public class LiveSudGamePopup extends BottomPopupView {
gameTitle.setText(mCreateSudRoomModel.getSudGameName());
roomName.setText(mCreateSudRoomModel.getRoomName());
roomNumber.setText(mCreateSudRoomModel.getSudGameRoomId());
ImgLoader.display(getContext(), mCreateSudRoomModel.getAvatar(), mAvatar);
//ImgLoader.display(getContext(), mCreateSudRoomModel.getAvatar(), mAvatar);
}
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override

View File

@ -27,7 +27,7 @@ public class RigtsInterestsViewHolder extends RecyclerView.ViewHolder {
sendGoodGift = itemView.findViewById(R.id.send_good_gift);
childList = itemView.findViewById(R.id.child_list);
funGamesAdapter = new FunGamesAdapter(itemView.getContext(), false);
childList.setLayoutManager(new GridLayoutManager(itemView.getContext(), 3));
childList.setLayoutManager(new GridLayoutManager(itemView.getContext(), 4));
childList.setAdapter(funGamesAdapter);
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="360dp" />
<corners android:radius="8dp" />
<solid android:color="#B3414141" />
</shape>

View File

@ -0,0 +1,9 @@
<?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>

View File

@ -2,6 +2,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#201E1A"
android:orientation="vertical">
@ -14,7 +16,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<LinearLayout
@ -24,7 +25,16 @@
android:layout_marginTop="48dp"
android:background="@drawable/bg_live_sud_game_top_new"
android:gravity="start|center_vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="10dp"
android:scaleType="centerCrop"
android:src="@mipmap/live_dialog_top_game_icon"
android:visibility="visible"
tools:visibility="visible"
app:riv_oval="true" />
<LinearLayout
android:layout_width="wrap_content"

View File

@ -3,17 +3,19 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="650dp"
xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/bg_live_sud_list"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="14dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical">
<TextView
android:id="@+id/game_title"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
@ -22,67 +24,29 @@
android:textSize="16sp"
android:textStyle="bold" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/sud_history"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="14dp"
android:src="@mipmap/icon_sud_history_live_new" />
<ImageView
android:id="@+id/min_game"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="16dp"
android:src="@mipmap/icon_min_game_new"
android:visibility="visible" />
<TextView
android:id="@+id/exit"
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@drawable/bg_live_sud_game_back_new2"
android:gravity="center"
android:text="@string/video_exit"
android:textColor="#FFFFFF"
android:textSize="8sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/game_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:layout_marginLeft="10dp"
android:layout_width="175dp"
android:layout_height="50dp"
android:layout_marginStart="15dp"
android:layout_marginTop="16dp"
android:background="@drawable/bg_live_sud_game_top"
android:padding="2dp"
android:background="@drawable/dialog_live_sud_game_name_bg"
android:gravity="center_vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="6dp"
android:scaleType="centerCrop"
android:visibility="gone"
android:src="@mipmap/live_dialog_top_game_icon"
android:visibility="visible"
tools:visibility="visible"
app:riv_oval="true" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:layout_marginStart="10dp"
android:orientation="vertical">
<LinearLayout
@ -130,6 +94,48 @@
</LinearLayout>
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/sud_history"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="14dp"
android:src="@mipmap/icon_sud_history_live_new" />
<ImageView
android:id="@+id/min_game"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="16dp"
android:src="@mipmap/icon_min_game_new"
android:visibility="visible" />
<ImageView
android:id="@+id/exit"
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@mipmap/bg_live_sud_game_back_new2"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="8sp" />
</LinearLayout>
<RelativeLayout
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/game_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</LinearLayout>

View File

@ -41,7 +41,6 @@
android:id="@+id/child_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp" />
<LinearLayout

View File

@ -32,7 +32,7 @@
android:id="@+id/child_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginBottom="16dp" />
<LinearLayout

View File

@ -2,65 +2,67 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="7dp"
android:gravity="center"
android:gravity="start"
android:orientation="vertical">
<FrameLayout
android:layout_width="60dp"
<LinearLayout
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/fun_game_pic"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/live_more_icon_guard" />
<RelativeLayout
android:layout_width="60dp"
android:layout_height="wrap_content">
<View
android:id="@+id/red_point"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_gravity="end"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:background="@drawable/bg_red_point"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="gone" />
<ImageView
android:id="@+id/fun_game_pic"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_centerHorizontal="true"
android:src="@mipmap/live_more_icon_guard" />
<ImageView
android:id="@+id/icon_new_game"
android:layout_width="26dp"
android:layout_height="13dp"
android:layout_gravity="end"
<View
android:id="@+id/red_point"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_gravity="end"
android:layout_alignParentEnd="true"
android:background="@drawable/bg_red_point"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<ImageView
android:id="@+id/icon_new_game"
android:layout_width="26dp"
android:layout_height="13dp"
android:layout_gravity="end"
android:layout_alignParentEnd="true"
android:visibility="gone"
tools:visibility="visible"
android:src="@mipmap/icon_new_game" />
</RelativeLayout>
<TextView
android:id="@+id/fun_game_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:visibility="gone"
android:layout_marginEnd="5dp"
android:src="@mipmap/icon_new_game" />
</FrameLayout>
android:gravity="center"
android:maxLines="1"
android:text="@string/guard_guard"
android:textColor="#9A9A9A"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/fun_game_name"
android:layout_width="match_parent"
android:gravity="center"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="1"
android:text="@string/guard_guard"
android:textColor="#9A9A9A"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:textSize="14sp" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -169,9 +169,8 @@
android:id="@+id/guard_imageView"
android:layout_width="58dp"
android:layout_height="58dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginTop="20dp"
android:scaleType="centerCrop"
android:src="@mipmap/guardian_img_wings"
android:visibility="visible"

View File

@ -515,7 +515,7 @@
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="150dp"
android:layout_marginEnd="144dp"
android:layout_marginBottom="-2dp"
android:text="99"
android:textColor="#FFB403"

View File

@ -745,8 +745,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="100dp"
android:visibility="gone" />
android:layout_marginTop="140dp"
android:visibility="gone"
tools:visibility="visible"/>
<FrameLayout
android:id="@+id/btn_prize_pool_level"