update:更新日榜周榜提示語

This commit is contained in:
zlzw 2022-08-30 13:30:13 +08:00
parent 31b7667a3d
commit c7360bea9d
6 changed files with 50 additions and 11 deletions

View File

@ -172,7 +172,7 @@
<string name="only_one">Only one can be given away~</string>
<string name="guard_guard">Guard</string>
<string name="guard_week_con">Contribution this week</string>
<string name="guard_no_data">Become the girst Guard of he/she</string>
<string name="guard_no_data">anchor are waiting at your guard!</string>
<string name="guard_tip_0">Let\'s open up a guard for our favorite anchor</string>
<string name="guard_tip_1">You are the current anchor\'s monthly guard \ n the guard date expires</string>
<string name="guard_tip_2">You are the current anchor\'s annual guardian \ n the guardian date expires</string>

View File

@ -123,7 +123,7 @@
<string name="guard_guard">守護</string>
<string name="guard_week_con">本周貢獻</string>
<string name="guard_no_data">主播正在等待您成為TA的守護為TA保駕護航</string>
<string name="guard_no_data">主播正在等待您的守護!</string>
<string name="guard_tip_0">快去為喜歡的主播開通守護吧</string>
<string name="guard_tip_1">您是當前主播的月守護\n守護日期截止到</string>
<string name="guard_tip_2">您是當前主播的年守護\n守護日期截止到</string>

View File

@ -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);

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg_black"
@ -103,12 +104,34 @@
android:layout_height="0dp"
android:visibility="gone" />
<ImageView
android:id="@+id/no_more"
android:layout_width="233dp"
android:layout_height="233dp"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/no_more_layout"
android:layout_width="333dp"
android:layout_height="333dp"
android:layout_gravity="center"
android:visibility="gone" />
android:visibility="gone">
<ImageView
android:id="@+id/no_more"
android:layout_width="233dp"
android:layout_height="233dp"
android:layout_marginBottom="32dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/no_more_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/no_more" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.yunbao.common.custom.CommonRefreshView
android:id="@+id/refreshView"

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="no_more_day_rank">No one is on the list at the moment</string>
<string name="no_more_guard">anchor are waiting at your guard!</string>
</resources>

View File

@ -1,4 +1,6 @@
<resources>
<string name="buy_guard_info" translatable="false">成爲TA的守護爲TA保駕護航</string>
<string name="buy_guard_back_coin" translatable="false">返還</string>
<string name="no_more_day_rank">暫時無人上榜,快來成為第一位上榜的人吧!</string>
<string name="no_more_guard">主播正在等待您的守護!</string>
</resources>