1、新版 广场界面 完成
2、新版 娱乐界面 完成
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
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.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.yunbao.common.bean.BattlePassPoints;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class NewGameRoomTopAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private final Context mContext;
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
|
||||
OnItemClickListener<CustomSidebarChildModel> onItemClickListener;
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<CustomSidebarChildModel> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public NewGameRoomTopAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
public void setList(List<CustomSidebarChildModel> mList) {
|
||||
if (mList == null) {
|
||||
return;
|
||||
}
|
||||
this.customSidebarChildModels.clear();
|
||||
this.customSidebarChildModels.addAll(mList);
|
||||
|
||||
CustomSidebarChildModel allBean = new CustomSidebarChildModel();
|
||||
allBean.setId("0");
|
||||
allBean.setClick(true);
|
||||
|
||||
this.customSidebarChildModels.add(0,allBean);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
if (viewType == 0) {
|
||||
return new NewGameRoomTopNormalViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_game_room_type_1, parent, false));
|
||||
} else {
|
||||
return new NewGameRoomTopSelectedViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_game_room_type_2, parent, false));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
CustomSidebarChildModel data = this.customSidebarChildModels.get(position);
|
||||
if (holder instanceof NewGameRoomTopNormalViewHolder) {
|
||||
if (position == 0) {
|
||||
((NewGameRoomTopNormalViewHolder) holder).itemName.setText(mContext.getString(com.yunbao.common.R.string.interactive_game_room_all));
|
||||
Glide.with(mContext).load(R.mipmap.game).into(((NewGameRoomTopNormalViewHolder) holder).itemImage);
|
||||
} else {
|
||||
((NewGameRoomTopNormalViewHolder) holder).itemName.setText(data.getTitle());
|
||||
Glide.with(mContext).load(data.getIcon()).into(((NewGameRoomTopNormalViewHolder) holder).itemImage);
|
||||
}
|
||||
|
||||
} else if (holder instanceof NewGameRoomTopSelectedViewHolder) {
|
||||
if (position == 0) {
|
||||
((NewGameRoomTopSelectedViewHolder) holder).itemName.setText(mContext.getString(com.yunbao.common.R.string.interactive_game_room_all));
|
||||
Glide.with(mContext).load(R.mipmap.game).into(((NewGameRoomTopSelectedViewHolder) holder).itemImage);
|
||||
} else {
|
||||
((NewGameRoomTopSelectedViewHolder) holder).itemName.setText(data.getTitle());
|
||||
Glide.with(mContext).load(data.getIcon()).into(((NewGameRoomTopSelectedViewHolder) holder).itemImage);
|
||||
}
|
||||
}
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int currentPosition = holder.getAdapterPosition();
|
||||
for (int i = 0; i < customSidebarChildModels.size(); i++) {
|
||||
customSidebarChildModels.get(i).setClick(i == currentPosition);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
onItemClickListener.onItemClick(data,currentPosition);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return customSidebarChildModels.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if (this.customSidebarChildModels.get(position).isClick()) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
class NewGameRoomTopNormalViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView itemImage;
|
||||
TextView itemName;
|
||||
|
||||
public NewGameRoomTopNormalViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
itemImage = itemView.findViewById(R.id.item_image);
|
||||
itemName = itemView.findViewById(R.id.item_name);
|
||||
}
|
||||
}
|
||||
|
||||
class NewGameRoomTopSelectedViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView itemImage;
|
||||
TextView itemName;
|
||||
|
||||
public NewGameRoomTopSelectedViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
itemImage = itemView.findViewById(R.id.item_image);
|
||||
itemName = itemView.findViewById(R.id.item_name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
public class GridSpacingItemDecoration extends RecyclerView.ItemDecoration {
|
||||
|
||||
private final int spanCount;
|
||||
private final int spacing;
|
||||
private final boolean includeEdge;
|
||||
|
||||
public GridSpacingItemDecoration(int spanCount, int spacing, boolean includeEdge) {
|
||||
this.spanCount = spanCount;
|
||||
this.spacing = spacing;
|
||||
this.includeEdge = includeEdge;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||
int position = parent.getChildAdapterPosition(view); // item position
|
||||
int column = position % spanCount; // item column
|
||||
|
||||
if (includeEdge) {
|
||||
outRect.left = spacing - column * spacing / spanCount;
|
||||
outRect.right = (column + 1) * spacing / spanCount;
|
||||
|
||||
if (position < spanCount) { // top edge
|
||||
outRect.top = spacing;
|
||||
}
|
||||
outRect.bottom = spacing; // item bottom
|
||||
} else {
|
||||
outRect.left = column * spacing / spanCount;
|
||||
outRect.right = spacing - (column + 1) * spacing / spanCount;
|
||||
|
||||
if (position >= spanCount) {
|
||||
outRect.top = spacing; // item top
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,9 @@ import android.view.animation.LinearInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
@@ -46,6 +48,9 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.LiveSudGameHistoryPopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.NewGameRoomTopAdapter;
|
||||
|
||||
import net.lucode.hackware.magicindicator.buildins.UIUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@@ -62,8 +67,8 @@ import java.util.Locale;
|
||||
public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implements OnItemClickListener<LiveBean> {
|
||||
|
||||
private CommonRefreshView mRefreshView;
|
||||
private ImageView roomGameArrow, roomSillArrow, houseOwnerArrow;
|
||||
private TextView gameTitle, sillTitle, houseOwnerTitle;
|
||||
private ImageView roomSillArrow, houseOwnerArrow;
|
||||
private TextView sillTitle, houseOwnerTitle;
|
||||
private long interactionID = 0;
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
private String mSill = "0,0,0", mSillName, roomHolderType = "0", roomHolderTypeName;
|
||||
@@ -71,6 +76,9 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
private String id = "0";
|
||||
private SudGameListAdapter sudGameListAdapter;
|
||||
private AbsActivity context;
|
||||
private RecyclerView topRecyclerView;
|
||||
private NewGameRoomTopAdapter newGameRoomTopAdapter;
|
||||
|
||||
|
||||
public MainHomeGameViewHolder(AbsActivity context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
@@ -80,7 +88,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_main_home_sud_game_list;
|
||||
return R.layout.new_gram_room;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,14 +99,30 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
mSill = "0,0,0";
|
||||
roomHolderType = "0";
|
||||
id = "0";
|
||||
roomGameArrow = (ImageView) findViewById(R.id.room_game_arrow);
|
||||
|
||||
topRecyclerView = (RecyclerView) findViewById(R.id.game_type_recyclerview);
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
|
||||
linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
topRecyclerView.setLayoutManager(linearLayoutManager);
|
||||
newGameRoomTopAdapter = new NewGameRoomTopAdapter(mContext);
|
||||
topRecyclerView.setAdapter(newGameRoomTopAdapter);
|
||||
newGameRoomTopAdapter.setOnItemClickListener(new OnItemClickListener<CustomSidebarChildModel>() {
|
||||
@Override
|
||||
public void onItemClick(CustomSidebarChildModel bean, int position) {
|
||||
id = bean.getId();
|
||||
mRefreshView.initData();
|
||||
}
|
||||
});
|
||||
|
||||
roomSillArrow = (ImageView) findViewById(R.id.room_sill_arrow);
|
||||
houseOwnerArrow = (ImageView) findViewById(R.id.house_owner_arrow);
|
||||
gameTitle = (TextView) findViewById(R.id.game_title);
|
||||
sillTitle = (TextView) findViewById(R.id.room_sill_text);
|
||||
houseOwnerTitle = (TextView) findViewById(R.id.house_owner_text);
|
||||
mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView);
|
||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
mRefreshView.setLayoutManager(new GridLayoutManager(mContext, 2));
|
||||
int dip2px = UIUtil.dip2px(mContext, 10);
|
||||
mRefreshView.addItemDecoration(new GridSpacingItemDecoration(2, dip2px, false));
|
||||
|
||||
sudGameListAdapter = new SudGameListAdapter(mContext, true);
|
||||
mRefreshView.setLoadMoreEnable(true);
|
||||
mRefreshView.setRecyclerViewAdapter(sudGameListAdapter);
|
||||
@@ -150,7 +174,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
});
|
||||
mRefreshView.initData();
|
||||
mRefreshView.setEmptyLayoutId(R.layout.sud_no_data);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(com.yunbao.common.R.id.random_start), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
/* ViewClicksAntiShake.clicksAntiShake(findViewById(com.yunbao.common.R.id.random_start), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
LiveNetManager.get(mContext)
|
||||
@@ -198,8 +222,8 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.interactive_game_room_game), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
});*/
|
||||
/* ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.interactive_game_room_game), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomGameArrow, "rotation", 0f, 90f);
|
||||
@@ -223,7 +247,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
});*/
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.room_sill), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
@@ -298,6 +322,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
for (CustomSidebarInfoModel datum : data) {
|
||||
if (datum.getType().equals("6")) {
|
||||
customSidebarChildModels = datum.getChild();
|
||||
newGameRoomTopAdapter.setList(customSidebarChildModels);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -308,7 +333,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
/* ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_rule), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(mContext)
|
||||
@@ -316,7 +341,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
||||
.asCustom(new SudGameRulePopup(mContext)).show();
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
@@ -324,28 +349,6 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameListEvent(SudGameListEvent event) {
|
||||
interactionID = event.getInteractionID();
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
gameTitle.setText(event.getTitle());
|
||||
} else {
|
||||
if (event.getTitle().contains("All")) {
|
||||
gameTitle.setText("All");
|
||||
} else {
|
||||
if ((event.getTitle().length() > 6)) {
|
||||
gameTitle.setText(event.getTitle());
|
||||
} else {
|
||||
gameTitle.setText(event.getTitle());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
id = event.getId();
|
||||
mRefreshView.initData();
|
||||
closeAnimSudGameListEvent();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameListSillEvent(SudGameListSillEvent event) {
|
||||
@@ -369,12 +372,6 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
closeAnimRoomHolderTypeEvent();
|
||||
}
|
||||
|
||||
private void closeAnimSudGameListEvent() {
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomGameArrow, "rotation", 90f, 0f);
|
||||
animator.setDuration(animDuration);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
}
|
||||
|
||||
private void closeAnimSudGameListSillEvent() {
|
||||
ObjectAnimator backAnimator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f);
|
||||
|
||||
@@ -403,6 +403,15 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
case 17:
|
||||
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
// 精彩短劇
|
||||
|
||||
break;
|
||||
case 101:
|
||||
// 消息中心
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//21 在线客服
|
||||
|
||||
9
main/src/main/res/drawable/white_alpa_shape.xml
Normal file
9
main/src/main/res/drawable/white_alpa_shape.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="19dp" />
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:endColor="#FFFFFFFF"
|
||||
android:startColor="#00FFFFFF" />
|
||||
</shape>
|
||||
53
main/src/main/res/layout/item_game_room_type_1.xml
Normal file
53
main/src/main/res/layout/item_game_room_type_1.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?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"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:id="@+id/item_image"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:id="@+id/item_name"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
41
main/src/main/res/layout/item_game_room_type_2.xml
Normal file
41
main/src/main/res/layout/item_game_room_type_2.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginStart="10dp"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:id="@+id/item_image"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="所有游戏"
|
||||
android:textColor="#111111"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:id="@+id/item_name"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
134
main/src/main/res/layout/item_new_game_room.xml
Normal file
134
main/src/main/res/layout/item_new_game_room.xml
Normal file
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="168dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0dp"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
android:id="@+id/top_view_1"
|
||||
android:layout_height="25dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@mipmap/image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:id="@+id/gold_coin"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1,000"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/gold_coin"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:id="@+id/golden_bean_number"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff000000"
|
||||
android:textSize="15sp"
|
||||
android:text="@string/interactive_game_create_room_name"
|
||||
android:id="@+id/room_name"
|
||||
app:layout_constraintStart_toStartOf="@id/top_view_1"
|
||||
app:layout_constraintTop_toBottomOf="@id/top_view_1"
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff777777"
|
||||
android:textSize="10sp"
|
||||
android:id="@+id/player_we_are_2"
|
||||
android:text="@string/interactive_game_player_we_are_2"
|
||||
app:layout_constraintStart_toStartOf="@id/top_view_1"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_name"
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="21dp"
|
||||
android:background="@drawable/white_alpa_shape"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginStart="37dp"
|
||||
android:id="@+id/tmp_view"
|
||||
/>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="47dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tmp_view"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="16dp"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sex"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/avatar"
|
||||
app:layout_constraintEnd_toEndOf="@id/avatar"
|
||||
android:src="@mipmap/girl"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff777777"
|
||||
android:textSize="10sp"
|
||||
android:id="@+id/player_we_are"
|
||||
android:text="@string/interactive_game_player_we_are"
|
||||
app:layout_constraintEnd_toEndOf="@id/tmp_view"
|
||||
app:layout_constraintTop_toTopOf="@id/tmp_view"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tmp_view"
|
||||
android:layout_marginEnd="6dp"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -10,7 +10,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="240dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/bg1"
|
||||
android:src="@mipmap/bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="17dp"
|
||||
android:layout_marginTop="52dp"
|
||||
android:text="@string/interactive_game_room_list"
|
||||
android:text="@string/interactive_game_room_list_new"
|
||||
android:textColor="#000"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -168,9 +168,13 @@
|
||||
android:layout_marginTop="15dp"
|
||||
android:id="@+id/refreshView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/select_game_type"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -4,6 +4,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="50dp"
|
||||
android:id="@+id/rootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backgroup_iv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="240dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
BIN
main/src/main/res/mipmap-xxxhdpi/bg.webp
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/bg.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 570 KiB |
BIN
main/src/main/res/mipmap-xxxhdpi/game.webp
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/game.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
main/src/main/res/mipmap-xxxhdpi/girl.webp
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/girl.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
main/src/main/res/mipmap-xxxhdpi/man.webp
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/man.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user