游戏部分功能修改完成
@ -0,0 +1,137 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||||
|
import com.yunbao.common.bean.GameTypeItemBean;
|
||||||
|
import com.yunbao.common.bean.UserItemBean;
|
||||||
|
import com.yunbao.common.event.SudGameListEvent;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.views.SudTitleSelectViewHolder;
|
||||||
|
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.UIUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class GameTypeItemAdapter extends RecyclerView.Adapter<GameTypeItemAdapter.GameTypeViewHolder> implements View.OnClickListener {
|
||||||
|
|
||||||
|
private List<CustomSidebarChildModel> itemList;
|
||||||
|
private Context mContext;
|
||||||
|
private int mChoice;
|
||||||
|
// public GameTypeItemAdapter(List<GameTypeItemBean> itemList, Context context) {
|
||||||
|
// this.itemList = itemList;
|
||||||
|
// mContext=context;
|
||||||
|
// }
|
||||||
|
|
||||||
|
public GameTypeItemAdapter(List<CustomSidebarChildModel> customSidebarChildModels, Context context) {
|
||||||
|
this.itemList = customSidebarChildModels;
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Object object =v.getTag();
|
||||||
|
if (object!=null && object instanceof Integer){
|
||||||
|
if (mChoice != (int) object) {
|
||||||
|
mChoice = (int) object;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
if (mChoice == 0){
|
||||||
|
Bus.get().post(new SudGameListEvent()
|
||||||
|
.setInteractionID(0L)
|
||||||
|
.setId("0")
|
||||||
|
.setTitle(mContext.getString(R.string.interactive_game_room_all)));
|
||||||
|
}else {
|
||||||
|
Bus.get().post(new SudGameListEvent()
|
||||||
|
.setInteractionID(Long.parseLong(itemList.get(mChoice-1).getSrc()))
|
||||||
|
.setId(itemList.get(mChoice-1).getId())
|
||||||
|
.setTitle(itemList.get(mChoice-1).getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public GameTypeViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_game_type_select_view, parent, false);
|
||||||
|
UIUtil.getScreenWidth(mContext);
|
||||||
|
itemView.setLayoutParams(new ViewGroup.LayoutParams(UIUtil.getScreenWidth(mContext) / 4, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
itemView.setOnClickListener(this);
|
||||||
|
return new GameTypeViewHolder(itemView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull GameTypeViewHolder holder, int position) {
|
||||||
|
holder.itemView.setTag(position);
|
||||||
|
if (position == 0) {
|
||||||
|
holder.gameBg.setImageResource(getGameBgResId(position));
|
||||||
|
holder.gameName.setText(R.string.interactive_game_room_all);
|
||||||
|
holder.gameIcon.setImageResource(R.mipmap.ic_yola_game_1);
|
||||||
|
} else {
|
||||||
|
CustomSidebarChildModel item = itemList.get(position - 1);
|
||||||
|
holder.gameBg.setImageResource(getGameBgResId(position));
|
||||||
|
ImgLoader.display(holder.gameIcon.getContext(), item.getIcon(), holder.gameIcon);
|
||||||
|
holder.gameName.setText(item.getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mChoice == position) {
|
||||||
|
holder.gameName.setTypeface(null, Typeface.BOLD);
|
||||||
|
holder.gameName.setTextColor(ContextCompat.getColor(mContext,R.color.color_111111));
|
||||||
|
}else {
|
||||||
|
holder.gameName.setTypeface(null, Typeface.NORMAL);
|
||||||
|
holder.gameName.setTextColor(ContextCompat.getColor(mContext,R.color.color_605c58));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getGameBgResId(int position) {
|
||||||
|
Integer p = position % 4;
|
||||||
|
switch (p) {
|
||||||
|
case 0:
|
||||||
|
return R.mipmap.ic_yola_game_bg_1;
|
||||||
|
case 1:
|
||||||
|
return R.mipmap.ic_yola_game_bg_2;
|
||||||
|
case 2:
|
||||||
|
return R.mipmap.ic_yola_game_bg_3;
|
||||||
|
case 3:
|
||||||
|
return R.mipmap.ic_yola_game_bg_4;
|
||||||
|
default:
|
||||||
|
return R.mipmap.ic_yola_game_bg_1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return itemList.size() + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class GameTypeViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
public ImageView gameBg;
|
||||||
|
public ImageView gameIcon;
|
||||||
|
public TextView gameName;
|
||||||
|
|
||||||
|
public GameTypeViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
gameBg = itemView.findViewById(R.id.gameBg);
|
||||||
|
gameIcon = itemView.findViewById(R.id.gameIcon);
|
||||||
|
gameName = itemView.findViewById(R.id.gameName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
public class GameTypeItemBean {
|
||||||
|
|
||||||
|
private String gameName;
|
||||||
|
private String iconUrl;
|
||||||
|
private int iconId=-1;
|
||||||
|
private int gameBgResId;
|
||||||
|
|
||||||
|
public GameTypeItemBean(String gameName, String gameIconUrl, int gameBgResId) {
|
||||||
|
this.gameName = gameName;
|
||||||
|
this.iconUrl = gameIconUrl;
|
||||||
|
this.gameBgResId = gameBgResId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIconId() {
|
||||||
|
return iconId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIconId(int iconId) {
|
||||||
|
this.iconId = iconId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameName() {
|
||||||
|
return gameName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIconUrl() {
|
||||||
|
return iconUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGameBgResId() {
|
||||||
|
return gameBgResId;
|
||||||
|
}
|
||||||
|
}
|
@ -127,14 +127,14 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (mType == 1) {
|
} else if (mType == 1) {
|
||||||
selectString.add(getContext().getString(R.string.interactive_game_create_unlimited));
|
selectString.add(getContext().getString(R.string.unlimited_threshold));
|
||||||
selectString.add(getContext().getString(R.string.interactive_game_create_0_1));
|
selectString.add(getContext().getString(R.string.interactive_game_create_0_1));
|
||||||
selectString.add(getContext().getString(R.string.interactive_game_create_1_2));
|
selectString.add(getContext().getString(R.string.interactive_game_create_1_2));
|
||||||
selectString.add(getContext().getString(R.string.interactive_game_create_5));
|
selectString.add(getContext().getString(R.string.interactive_game_create_5));
|
||||||
selectString.add(getContext().getString(R.string.room_sill0_100));
|
selectString.add(getContext().getString(R.string.room_sill0_100));
|
||||||
selectString.add(getContext().getString(R.string.room_sill100_500));
|
selectString.add(getContext().getString(R.string.room_sill100_500));
|
||||||
selectString.add(getContext().getString(R.string.room_sill500_m));
|
selectString.add(getContext().getString(R.string.room_sill500_m));
|
||||||
selectSill.put(getContext().getString(R.string.interactive_game_create_unlimited), "0,0,0");
|
selectSill.put(getContext().getString(R.string.unlimited_threshold), "0,0,0");
|
||||||
selectSill.put(getContext().getString(R.string.interactive_game_create_0_1), "0,1,3");
|
selectSill.put(getContext().getString(R.string.interactive_game_create_0_1), "0,1,3");
|
||||||
selectSill.put(getContext().getString(R.string.interactive_game_create_1_2), "1,5,3");
|
selectSill.put(getContext().getString(R.string.interactive_game_create_1_2), "1,5,3");
|
||||||
selectSill.put(getContext().getString(R.string.interactive_game_create_5), "5,0,3");
|
selectSill.put(getContext().getString(R.string.interactive_game_create_5), "5,0,3");
|
||||||
@ -161,10 +161,10 @@ public class SudGameListSelectPopup extends AttachPopupView {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (mType == 2) {
|
} else if (mType == 2) {
|
||||||
selectString.add(getContext().getString(R.string.interactive_game_create_unlimited));
|
selectString.add(getContext().getString(R.string.unrestricted_players));
|
||||||
selectString.add(getContext().getString(R.string.live_anchor));
|
selectString.add(getContext().getString(R.string.live_anchor));
|
||||||
selectString.add(getContext().getString(R.string.interactive_game_player));
|
selectString.add(getContext().getString(R.string.interactive_game_player));
|
||||||
selectSill.put(getContext().getString(R.string.interactive_game_create_unlimited), "0");
|
selectSill.put(getContext().getString(R.string.unrestricted_players), "0");
|
||||||
selectSill.put(getContext().getString(R.string.live_anchor), "1");
|
selectSill.put(getContext().getString(R.string.live_anchor), "1");
|
||||||
selectSill.put(getContext().getString(R.string.interactive_game_player), "2");
|
selectSill.put(getContext().getString(R.string.interactive_game_player), "2");
|
||||||
index = 0;
|
index = 0;
|
||||||
|
@ -0,0 +1,189 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.SudRoomListModel;
|
||||||
|
import com.yunbao.common.event.LiveOpenSudRoomEvent;
|
||||||
|
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||||
|
import com.yunbao.common.event.SudGameListDissMissEvent;
|
||||||
|
import com.yunbao.common.event.SudGameListRefreshEvent;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class SudGameListViewHolder2 extends RecyclerView.ViewHolder {
|
||||||
|
private RoundedImageView mAvatar;
|
||||||
|
private TextView roomName, playerWeAre, playerWeAre2, goldenBeanNumber;
|
||||||
|
private RoundedImageView avatarList1, avatarList2, avatarList3, avatarList4, avatarList5;
|
||||||
|
private ImageView gifImageView;
|
||||||
|
private ImageView sex, game_icon, gold_coin;
|
||||||
|
|
||||||
|
|
||||||
|
public SudGameListViewHolder2(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
mAvatar = itemView.findViewById(R.id.avatar);
|
||||||
|
roomName = itemView.findViewById(R.id.room_name);
|
||||||
|
playerWeAre = itemView.findViewById(R.id.player_we_are);
|
||||||
|
playerWeAre2 = itemView.findViewById(R.id.player_we_are_2);
|
||||||
|
game_icon = itemView.findViewById(R.id.game_icon);
|
||||||
|
goldenBeanNumber = itemView.findViewById(R.id.golden_bean_number);
|
||||||
|
gifImageView = itemView.findViewById(R.id.btn_live);
|
||||||
|
avatarList1 = itemView.findViewById(R.id.avatar_list1);
|
||||||
|
avatarList2 = itemView.findViewById(R.id.avatar_list2);
|
||||||
|
avatarList3 = itemView.findViewById(R.id.avatar_list3);
|
||||||
|
avatarList4 = itemView.findViewById(R.id.avatar_list4);
|
||||||
|
avatarList5 = itemView.findViewById(R.id.avatar_list5);
|
||||||
|
gold_coin = itemView.findViewById(R.id.gold_coin);
|
||||||
|
sex = itemView.findViewById(R.id.sex);
|
||||||
|
avatarList1.setVisibility(View.GONE);
|
||||||
|
avatarList2.setVisibility(View.GONE);
|
||||||
|
avatarList3.setVisibility(View.GONE);
|
||||||
|
avatarList4.setVisibility(View.GONE);
|
||||||
|
avatarList5.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(SudRoomListModel model, boolean isHome) {
|
||||||
|
ImgLoader.display(itemView.getContext(), model.getAvatar(), mAvatar);
|
||||||
|
roomName.setText(model.getRoomName());
|
||||||
|
playerWeAre.setText(String.format(itemView.getContext().getString(R.string.interactive_game_player_we_are), model.getPlayerTotal()));
|
||||||
|
playerWeAre2.setText(String.format(itemView.getContext().getString(R.string.interactive_game_player_we_are_2), model.getTotal()));
|
||||||
|
goldenBeanNumber.setText(model.getGoldenBeanNumber());
|
||||||
|
gifImageView.setVisibility(TextUtils.equals(model.getLiveUid(), "0") ? View.GONE : View.VISIBLE);
|
||||||
|
if (TextUtils.equals(model.getSex(), "1")) {
|
||||||
|
ImgLoader.display(itemView.getContext(), R.mipmap.icon_sex_man, sex);
|
||||||
|
} else if (TextUtils.equals(model.getSex(), "2")) {
|
||||||
|
ImgLoader.display(itemView.getContext(), R.mipmap.icon_sex_woman, sex);
|
||||||
|
}
|
||||||
|
if (TextUtils.equals(model.getCurrencyType(), "2")) {
|
||||||
|
ImgLoader.display(itemView.getContext(), R.mipmap.icon_collectibles, gold_coin);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(itemView.getContext(), R.mipmap.gold_coin, gold_coin);
|
||||||
|
}
|
||||||
|
ImgLoader.display(itemView.getContext(), model.getSudgameicon(), game_icon);
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.layout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
LiveNetManager.get(itemView.getContext()).checkRoomStatus(model.getId(), new com.yunbao.common.http.base.HttpCallback<CreateSudRoomModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(CreateSudRoomModel data) {
|
||||||
|
if (TextUtils.equals(data.getRoomStatus(), "0")) {
|
||||||
|
if (IMLoginManager.get(itemView.getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
|
ToastUtil.show("房间不存在");
|
||||||
|
} else {
|
||||||
|
ToastUtil.show("The room does not exist");
|
||||||
|
}
|
||||||
|
Bus.get().post(new SudGameListRefreshEvent());
|
||||||
|
} else {
|
||||||
|
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
|
||||||
|
createSudRoomModel.setSudGameId(model.getSudGameId());
|
||||||
|
createSudRoomModel.setSudGameRoomId(model.getSudGameRoomId());
|
||||||
|
createSudRoomModel.setAvatar(model.getAvatar());
|
||||||
|
createSudRoomModel.setRoomName(model.getRoomName());
|
||||||
|
createSudRoomModel.setSudGameName(model.getSudGameName());
|
||||||
|
if (isHome) {
|
||||||
|
if (TextUtils.equals(model.getLiveUid(), "0")) {
|
||||||
|
if(CommonAppConfig.getInstance().getConfig().isSw()){
|
||||||
|
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(createSudRoomModel),true,isHome);
|
||||||
|
}else{
|
||||||
|
RouteUtil.forwardRySudGameActivity(new Gson().toJson(createSudRoomModel),true,isHome);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
String yes = "是";
|
||||||
|
if (IMLoginManager.get(itemView.getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
|
yes = "是";
|
||||||
|
} else {
|
||||||
|
yes = "Yes";
|
||||||
|
}
|
||||||
|
new XPopup.Builder(itemView.getContext())
|
||||||
|
.asCustom(new HintCustomPopup(itemView.getContext(),
|
||||||
|
itemView.getContext().getString(R.string.interactive_game_search_room_currently_live),
|
||||||
|
itemView.getContext().getString(R.string.interactive_game_search_room_broadcast_room))
|
||||||
|
.setLiveOpenOk(yes)
|
||||||
|
.setLiveOpenCancel(itemView.getContext().getString(R.string.interactive_game_search_room_bhe_game))
|
||||||
|
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onSure() {
|
||||||
|
LiveHttpUtil.getLiveInfo(model.getLiveUid() + "", new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if (code == 0 && info.length > 0) {
|
||||||
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
|
new LiveRoomCheckLivePresenter(itemView.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||||
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal),isSw);
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Bus.get().post(new LiveOpenSudRoomEvent().setCreateSudRoomModel(createSudRoomModel));
|
||||||
|
}
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCheckError(String contextError) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
RouteUtil.forwardUserHome(itemView.getContext(), model.getLiveUid(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCancel() {
|
||||||
|
if(CommonAppConfig.getInstance().getConfig().isSw()){
|
||||||
|
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(createSudRoomModel),true,isHome);
|
||||||
|
}else{
|
||||||
|
RouteUtil.forwardRySudGameActivity(new Gson().toJson(createSudRoomModel),true,isHome);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(createSudRoomModel));
|
||||||
|
Bus.get().post(new SudGameListDissMissEvent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
59
common/src/main/res/layout/item_game_type_select_view.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:layout_width="94dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/gameBg"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:src="@mipmap/ic_yola_game_bg_1"
|
||||||
|
app:layout_constraintDimensionRatio="1.32"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/line" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/gameIcon"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:src="@mipmap/ic_yola_game_1"
|
||||||
|
app:layout_constraintDimensionRatio="1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintWidth_percent="0.48" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/gameIcon"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/gameIcon"
|
||||||
|
app:layout_constraintVertical_bias="0.36" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/gameName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/interactive_game_room_all"
|
||||||
|
android:textColor="@color/color_111111"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/gameBg"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/gameBg"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/gameBg"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/gameIcon"
|
||||||
|
app:layout_constraintVertical_bias="0.39" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
104
common/src/main/res/layout/item_home_sud_game_list2.xml
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:background="@mipmap/background_home_sud_game_list">
|
||||||
|
|
||||||
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
|
android:id="@+id/avatar"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="1"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintWidth_percent="0.14"
|
||||||
|
app:riv_oval="true" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/avatar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/avatar"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/avatar"
|
||||||
|
android:layout_marginBottom="-8dp"
|
||||||
|
android:id="@+id/btn_live"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@mipmap/icon_user_game_living"
|
||||||
|
tools:visibility="gone"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/topBgImg"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
app:layout_constraintWidth_percent="0.14"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintDimensionRatio="2.66"
|
||||||
|
android:src="@mipmap/ic_yola_game_radus"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_marginEnd="2dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/gold_coin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@mipmap/ic_yola_game_dou"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/topBgImg"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/topBgImg"
|
||||||
|
app:layout_constraintHorizontal_bias="0.81"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/topBgImg"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/topBgImg" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/golden_bean_number"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="1dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/topBgImg"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/gold_coin"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/topBgImg"
|
||||||
|
tools:text="1000"
|
||||||
|
android:textColor="#FFBA8232"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/room_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/interactive_game_create_room_name"
|
||||||
|
android:textColor="#222"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/avatar"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/avatar"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/avatar"
|
||||||
|
app:layout_constraintVertical_bias="0.25" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/room_number"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="遊戲人數:2"
|
||||||
|
android:textColor="#777"
|
||||||
|
android:textSize="11sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/avatar"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/room_name"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/room_name" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_1.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_2.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_3.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_4.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_5.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_6.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_7.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_8.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_bg_1.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_bg_2.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_bg_3.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_bg_4.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_bot_arrow.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_create.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_dou.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_end_2.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_end_3.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_end_4.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_end_5.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_end_6.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_end_7.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_end_8.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_line.png
Normal file
After Width: | Height: | Size: 110 B |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_radus.png
Normal file
After Width: | Height: | Size: 504 B |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_record.png
Normal file
After Width: | Height: | Size: 915 B |
BIN
common/src/main/res/mipmap-hdpi/ic_yola_game_top_arrow.png
Normal file
After Width: | Height: | Size: 471 B |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_1.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_2.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_3.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_4.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_5.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_6.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_7.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_8.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_bg_1.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_bg_2.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_bg_3.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_bg_4.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_bot_arrow.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_create.png
Normal file
After Width: | Height: | Size: 595 B |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_dou.png
Normal file
After Width: | Height: | Size: 607 B |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_end_2.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_end_3.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_end_4.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_end_5.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_end_6.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_end_7.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_end_8.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_line.png
Normal file
After Width: | Height: | Size: 98 B |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_radus.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_record.png
Normal file
After Width: | Height: | Size: 504 B |
BIN
common/src/main/res/mipmap-mdpi/ic_yola_game_top_arrow.png
Normal file
After Width: | Height: | Size: 291 B |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_1.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_2.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_3.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_4.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_5.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_6.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_7.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_8.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_bg_1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_bg_2.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_bg_3.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_bg_4.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_bot_arrow.png
Normal file
After Width: | Height: | Size: 521 B |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_create.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_dou.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_end_2.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_end_3.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_end_4.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_end_5.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_end_6.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_end_7.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_end_8.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_line.png
Normal file
After Width: | Height: | Size: 130 B |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_radus.png
Normal file
After Width: | Height: | Size: 576 B |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_record.png
Normal file
After Width: | Height: | Size: 914 B |
BIN
common/src/main/res/mipmap-xhdpi/ic_yola_game_top_arrow.png
Normal file
After Width: | Height: | Size: 534 B |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_1.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_2.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_3.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_4.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_5.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_6.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_7.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_8.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_bg_1.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_bg_2.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_bg_3.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_bg_4.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_bot_arrow.png
Normal file
After Width: | Height: | Size: 859 B |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_create.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_dou.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_yola_game_end_2.png
Normal file
After Width: | Height: | Size: 11 KiB |