游戏修改,粉丝团提示修改
This commit is contained in:
parent
69c0d5f28a
commit
c1d6b67322
@ -33,7 +33,7 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
@NonNull
|
||||
@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_view, parent, false);
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false);
|
||||
return new InteractionGamesChildViewHolder(runGamesView);
|
||||
}
|
||||
|
||||
|
@ -106,14 +106,14 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
String name = roomName.getText().toString();
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
if (name.length() > 10) {
|
||||
ToastUtil.show("房间名太长");
|
||||
ToastUtil.show("房間名长度为[1-10]");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() != Locale.SIMPLIFIED_CHINESE) {
|
||||
if (name.length() > 15) {
|
||||
ToastUtil.show("The room name is too long");
|
||||
ToastUtil.show("Room name length is [1-15]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
search(value);
|
||||
|
||||
} else {
|
||||
findViewById(R.id.layout_history_empty).setVisibility(GONE);
|
||||
switchList(true);
|
||||
}
|
||||
}
|
||||
@ -144,7 +145,9 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initHistoryData() {
|
||||
searchHistory.removeAllViews();
|
||||
String value = SpUtil.getStringValue(SP_HISTORY);
|
||||
historyList = new ArrayList<>();
|
||||
if (!StringUtil.isEmpty(value)) {
|
||||
@ -158,18 +161,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
}
|
||||
|
||||
private void search(String value) {
|
||||
boolean isValue = false;
|
||||
for (String str : historyList) {
|
||||
if (!isValue) {
|
||||
isValue = TextUtils.equals(value, str);
|
||||
}
|
||||
|
||||
}
|
||||
if (!isValue) {
|
||||
historyList.add(value);
|
||||
SpUtil.setStringValue(SP_HISTORY, JSONArray.toJSONString(historyList));
|
||||
addHistoryData(value);
|
||||
}
|
||||
LiveNetManager.get(mContext)
|
||||
.searchRoomList("0", "0,0", "0", value, 0, new HttpCallback<List<SudRoomListModel>>() {
|
||||
@Override
|
||||
@ -178,14 +170,42 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
||||
switchList(false);
|
||||
sudGameListAdapter.setList(data);
|
||||
|
||||
findViewById(R.id.layout_history_empty).setVisibility(GONE);
|
||||
boolean isValue = false;
|
||||
for (String str : historyList) {
|
||||
if (!isValue) {
|
||||
isValue = TextUtils.equals(value, str);
|
||||
}
|
||||
|
||||
}
|
||||
if (!isValue) {
|
||||
|
||||
if (historyList.size() < 6) {
|
||||
if (historyList.size() == 5) {
|
||||
historyList.remove(0);
|
||||
}
|
||||
historyList.add(value);
|
||||
SpUtil.setStringValue(SP_HISTORY, JSONArray.toJSONString(historyList));
|
||||
searchHistory.removeAllViews();
|
||||
|
||||
for (String str : historyList) {
|
||||
addHistoryData(str);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else {
|
||||
findViewById(R.id.layout_history_empty).setVisibility(VISIBLE);
|
||||
listRoom.setVisibility(GONE);
|
||||
history.setVisibility(GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
findViewById(R.id.layout_history_empty).setVisibility(VISIBLE);
|
||||
switchList(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -2228,7 +2228,7 @@ public class LiveNetManager {
|
||||
@Override
|
||||
public void accept(ResponseModel<CreateSudRoomModel> createSudRoomModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
if (createSudRoomModelResponseModel.getData().getCode() == 200) {
|
||||
if (createSudRoomModelResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(createSudRoomModelResponseModel.getData().getInfo());
|
||||
} else {
|
||||
callback.onError(createSudRoomModelResponseModel.getData().getMsg());
|
||||
|
@ -96,31 +96,31 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_history_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_home_search_not"
|
||||
android:gravity="center"
|
||||
android:paddingStart="30dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="30dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/interactive_game_search_room_have_been_found"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_history_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_home_search_not"
|
||||
android:gravity="center"
|
||||
android:paddingStart="30dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="30dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/interactive_game_search_room_have_been_found"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list_room"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -59,11 +59,11 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:hint="@string/interactive_game_search_room_name_input"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#8fff"
|
||||
android:textColorHint="#8fff"
|
||||
android:textSize="10sp" />
|
||||
@ -89,44 +89,46 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list_history"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="3"
|
||||
tools:itemCount="5"
|
||||
tools:layoutManager="GridLayoutManager"
|
||||
tools:listitem="@layout/item_search_history" />
|
||||
|
||||
<com.yunbao.common.views.FlowLayout
|
||||
android:id="@+id/search_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_history_empty"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_history_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_home_search_not"
|
||||
android:gravity="center"
|
||||
android:paddingStart="30dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="30dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/interactive_game_search_room_have_been_found"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/bg_home_search_not"
|
||||
android:gravity="center"
|
||||
android:paddingStart="30dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="30dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/interactive_game_search_room_have_been_found"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="60dp"
|
||||
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" />
|
||||
|
||||
<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:layout_width="26dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@mipmap/icon_new_game" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fun_game_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:maxLines="1"
|
||||
android:text="@string/guard_guard"
|
||||
android:textColor="#9A9A9A"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
BIN
common/src/main/res/mipmap-xxhdpi/icon_new_game.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_new_game.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Loading…
Reference in New Issue
Block a user