游戏修改,粉丝团提示修改
This commit is contained in:
parent
69c0d5f28a
commit
c1d6b67322
@ -33,7 +33,7 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
|
|||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
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);
|
return new InteractionGamesChildViewHolder(runGamesView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,14 +106,14 @@ public class CreateSudGamePopup extends BottomPopupView {
|
|||||||
String name = roomName.getText().toString();
|
String name = roomName.getText().toString();
|
||||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
if (name.length() > 10) {
|
if (name.length() > 10) {
|
||||||
ToastUtil.show("房间名太长");
|
ToastUtil.show("房間名长度为[1-10]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() != Locale.SIMPLIFIED_CHINESE) {
|
if (IMLoginManager.get(getContext()).getLocaleLanguage() != Locale.SIMPLIFIED_CHINESE) {
|
||||||
if (name.length() > 15) {
|
if (name.length() > 15) {
|
||||||
ToastUtil.show("The room name is too long");
|
ToastUtil.show("Room name length is [1-15]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
search(value);
|
search(value);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
findViewById(R.id.layout_history_empty).setVisibility(GONE);
|
||||||
switchList(true);
|
switchList(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,7 +145,9 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initHistoryData() {
|
private void initHistoryData() {
|
||||||
|
searchHistory.removeAllViews();
|
||||||
String value = SpUtil.getStringValue(SP_HISTORY);
|
String value = SpUtil.getStringValue(SP_HISTORY);
|
||||||
historyList = new ArrayList<>();
|
historyList = new ArrayList<>();
|
||||||
if (!StringUtil.isEmpty(value)) {
|
if (!StringUtil.isEmpty(value)) {
|
||||||
@ -158,18 +161,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void search(String value) {
|
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)
|
LiveNetManager.get(mContext)
|
||||||
.searchRoomList("0", "0,0", "0", value, 0, new HttpCallback<List<SudRoomListModel>>() {
|
.searchRoomList("0", "0,0", "0", value, 0, new HttpCallback<List<SudRoomListModel>>() {
|
||||||
@Override
|
@Override
|
||||||
@ -178,14 +170,42 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
|
|||||||
switchList(false);
|
switchList(false);
|
||||||
sudGameListAdapter.setList(data);
|
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
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
findViewById(R.id.layout_history_empty).setVisibility(VISIBLE);
|
||||||
|
switchList(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2228,7 +2228,7 @@ public class LiveNetManager {
|
|||||||
@Override
|
@Override
|
||||||
public void accept(ResponseModel<CreateSudRoomModel> createSudRoomModelResponseModel) throws Exception {
|
public void accept(ResponseModel<CreateSudRoomModel> createSudRoomModelResponseModel) throws Exception {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
if (createSudRoomModelResponseModel.getData().getCode() == 200) {
|
if (createSudRoomModelResponseModel.getData().getCode() == 0) {
|
||||||
callback.onSuccess(createSudRoomModelResponseModel.getData().getInfo());
|
callback.onSuccess(createSudRoomModelResponseModel.getData().getInfo());
|
||||||
} else {
|
} else {
|
||||||
callback.onError(createSudRoomModelResponseModel.getData().getMsg());
|
callback.onError(createSudRoomModelResponseModel.getData().getMsg());
|
||||||
|
@ -96,6 +96,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_history_empty"
|
android:id="@+id/layout_history_empty"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -118,9 +121,6 @@
|
|||||||
android:textColor="#CCFFFFFF"
|
android:textColor="#CCFFFFFF"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/list_room"
|
android:id="@+id/list_room"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -59,11 +59,11 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:singleLine="true"
|
|
||||||
android:hint="@string/interactive_game_search_room_name_input"
|
android:hint="@string/interactive_game_search_room_name_input"
|
||||||
android:paddingStart="5dp"
|
android:paddingStart="5dp"
|
||||||
android:paddingTop="9dp"
|
android:paddingTop="9dp"
|
||||||
android:paddingBottom="9dp"
|
android:paddingBottom="9dp"
|
||||||
|
android:singleLine="true"
|
||||||
android:textColor="#8fff"
|
android:textColor="#8fff"
|
||||||
android:textColorHint="#8fff"
|
android:textColorHint="#8fff"
|
||||||
android:textSize="10sp" />
|
android:textSize="10sp" />
|
||||||
@ -89,21 +89,25 @@
|
|||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/list_history"
|
android:id="@+id/list_history"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:visibility="gone"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:spanCount="3"
|
app:spanCount="3"
|
||||||
tools:itemCount="5"
|
tools:itemCount="5"
|
||||||
tools:layoutManager="GridLayoutManager"
|
tools:layoutManager="GridLayoutManager"
|
||||||
tools:listitem="@layout/item_search_history" />
|
tools:listitem="@layout/item_search_history" />
|
||||||
|
|
||||||
<com.yunbao.common.views.FlowLayout
|
<com.yunbao.common.views.FlowLayout
|
||||||
android:id="@+id/search_history"
|
android:id="@+id/search_history"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_history_empty"
|
android:id="@+id/layout_history_empty"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -127,8 +131,6 @@
|
|||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/list_room"
|
android:id="@+id/list_room"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -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