From c7360bea9d86f06415f5fcb60a2c87b86d02a881 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 30 Aug 2022 13:30:13 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=9B=B4=E6=96=B0=E6=97=A5=E6=A6=9C?= =?UTF-8?q?=E5=91=A8=E6=A6=9C=E6=8F=90=E7=A4=BA=E8=AA=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-en/strings.xml | 2 +- common/src/main/res/values/strings.xml | 2 +- .../dialog/LiveUserMoreDialogFragment.java | 17 +++++++--- .../main/res/layout/dialog_user_more_list.xml | 33 ++++++++++++++++--- live/src/main/res/values-en/strings.xml | 5 +++ live/src/main/res/values/strings.xml | 2 ++ 6 files changed, 50 insertions(+), 11 deletions(-) create mode 100644 live/src/main/res/values-en/strings.xml diff --git a/common/src/main/res/values-en/strings.xml b/common/src/main/res/values-en/strings.xml index 07f264a33..c2a83a0bb 100644 --- a/common/src/main/res/values-en/strings.xml +++ b/common/src/main/res/values-en/strings.xml @@ -172,7 +172,7 @@ Only one can be given away~ Guard Contribution this week - Become the girst Guard of he/she + anchor are waiting at your guard! Let\'s open up a guard for our favorite anchor You are the current anchor\'s monthly guard \ n the guard date expires You are the current anchor\'s annual guardian \ n the guardian date expires diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 6824fd2ec..b2d33fa3c 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -123,7 +123,7 @@ 守護 本周貢獻 - 主播正在等待您成為TA的守護,為TA保駕護航! + 主播正在等待您的守護! 快去為喜歡的主播開通守護吧 您是當前主播的月守護\n守護日期截止到 您是當前主播的年守護\n守護日期截止到 diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java index cd3755697..a90029279 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserMoreDialogFragment.java @@ -14,6 +14,7 @@ import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.Nullable; +import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.LinearLayoutManager; import com.alibaba.fastjson.JSON; @@ -58,6 +59,8 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie public TextView audience_btn, guard_btn, fans_btn, tags, btn, gz_view, dayRank, weekRank,title; private LinearLayout tabs; + private ConstraintLayout noMoreLayout; + private TextView noMoreText; private RelativeLayout bottom_msg;//底部信息的布局,在榜单列表下不需要显示底部信息 private String Tips = "1"; private String type = "guanzhong"; @@ -135,6 +138,8 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie dayRank = mRootView.findViewById(R.id.day_rank_btn);//日榜 weekRank = mRootView.findViewById(R.id.week_rank_btn);//周榜 gz_view = mRootView.findViewById(R.id.gz_view); + noMoreLayout = mRootView.findViewById(R.id.no_more_layout); + noMoreText = mRootView.findViewById(R.id.no_more_text); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -233,7 +238,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie LiveHttpUtil.getUserList(mLiveUid, stream, type, p, callback); pg = p; if (p == 1) { - no_more.setVisibility(View.VISIBLE); + noMoreLayout.setVisibility(View.VISIBLE); mRefreshView.setVisibility(View.GONE); } } @@ -290,7 +295,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie userMoreInfoAdapter.num = nums; mRefreshView.mRecyclerView.getRecycledViewPool().setMaxRecycledViews(0, data.size()); mRefreshView.setVisibility(View.VISIBLE); - no_more.setVisibility(View.GONE); + noMoreLayout.setVisibility(View.GONE); } return data; } @@ -310,9 +315,10 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie data.add(bean); } if(data.size()==0){ - no_more.setVisibility(View.VISIBLE); + noMoreLayout.setVisibility(View.VISIBLE); + mRefreshView.setVisibility(View.GONE); }else{ - no_more.setVisibility(View.GONE); + noMoreLayout.setVisibility(View.GONE); } mRefreshView.setNotLoadMore(); return data; @@ -340,6 +346,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie void Up() { userMoreInfoAdapter.clearData(); bottom_msg.setVisibility(View.VISIBLE); + mRefreshView.setVisibility(View.VISIBLE); title.setVisibility(View.GONE); LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mRefreshView.getLayoutParams(); params.bottomMargin=DpUtil.dp2px(65); @@ -377,6 +384,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie setTextColor(dayRank,audience_btn,guard_btn,fans_btn,gz_view,weekRank); gz_view.setVisibility(View.GONE); no_more.setImageResource(R.drawable.img_rank_empty); + noMoreText.setText(R.string.no_more_day_rank); }else if (Tips.equals("5")){ params.bottomMargin=DpUtil.dp2px(0); userMoreInfoAdapter.type = "5"; @@ -384,6 +392,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie type="weekRank"; gz_view.setVisibility(View.GONE); no_more.setImageResource(R.drawable.img_rank_empty); + noMoreText.setText(R.string.no_more_day_rank); setTextColor(weekRank,audience_btn,guard_btn,fans_btn,gz_view,dayRank); } mRefreshView.setLayoutParams(params); diff --git a/live/src/main/res/layout/dialog_user_more_list.xml b/live/src/main/res/layout/dialog_user_more_list.xml index e04a0f272..a140f8cde 100644 --- a/live/src/main/res/layout/dialog_user_more_list.xml +++ b/live/src/main/res/layout/dialog_user_more_list.xml @@ -1,5 +1,6 @@ - + android:visibility="gone"> + + + + + + + + No one is on the list at the moment + anchor are waiting at your guard! + \ No newline at end of file diff --git a/live/src/main/res/values/strings.xml b/live/src/main/res/values/strings.xml index 491888253..151cc3644 100644 --- a/live/src/main/res/values/strings.xml +++ b/live/src/main/res/values/strings.xml @@ -1,4 +1,6 @@ 成爲TA的守護,爲TA保駕護航! 返還 + 暫時無人上榜,快來成為第一位上榜的人吧! + 主播正在等待您的守護!