diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java index da4000e8e..5234322c3 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java @@ -272,7 +272,21 @@ public class SudGameListPopup extends BottomPopupView { @Subscribe(threadMode = ThreadMode.MAIN) public void onSudGameListEvent(SudGameListEvent event) { interactionID = event.getInteractionID(); - gameTitle.setText(event.getTitle().substring(0, 2)); + if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + gameTitle.setText(event.getTitle().substring(0, 2)); + } else { + if (event.getTitle().contains("All")) { + gameTitle.setText("All"); + } else { + if ((event.getTitle().length() > 6)) { + gameTitle.setText(event.getTitle().substring(0, 5)); + } else { + gameTitle.setText(event.getTitle()); + } + + } + } + id = event.getId(); ObjectAnimator animator = ObjectAnimator.ofFloat(roomGameArrow, "rotation", 90f, 0f); animator.setDuration(500); diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 65242c33f..0c99b5908 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1325,7 +1325,7 @@ Limited ride And limited avatar frame Threshold: owner: Random start - Game All + All Game Create a room "Room Name: " Room ID: diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 38f81f358..1f534e695 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1327,7 +1327,7 @@ Limited ride And limited avatar frame Threshold: owner: Random start - Game All + All Game Create a room "Room Name: " Room ID: diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java index 933794126..ee27dabe0 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java @@ -36,6 +36,7 @@ import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.main.R; @@ -45,6 +46,7 @@ import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; import java.util.List; +import java.util.Locale; /** * Created by cxf on 2018/9/22. @@ -291,7 +293,21 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement @Subscribe(threadMode = ThreadMode.MAIN) public void onSudGameListEvent(SudGameListEvent event) { interactionID = event.getInteractionID(); - gameTitle.setText(event.getTitle().substring(0, 2)); + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + gameTitle.setText(event.getTitle().substring(0, 2)); + } else { + if (event.getTitle().contains("All")) { + gameTitle.setText("All"); + } else { + if ((event.getTitle().length() > 6)) { + gameTitle.setText(event.getTitle().substring(0, 5)); + } else { + gameTitle.setText(event.getTitle()); + } + + } + } + id = event.getId(); mRefreshView.initData(); closeAnimSudGameListEvent();