小遊戲提醒

This commit is contained in:
18401019693 2023-10-25 10:09:38 +08:00
parent a2435cbe95
commit 192b0cb417
3 changed files with 33 additions and 21 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -636,26 +636,28 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
private TextView sud_text_name;
private LinearLayout sud_layout_name;
private Handler sudNameHandler = new Handler();
private Runnable sudNameRunnable = new Runnable() {
@Override
public void run() {
if (sud_text_name != null) {
sud_text_name.setVisibility(View.GONE);
if (sud_layout_name != null) {
sud_layout_name.setVisibility(View.GONE);
}
}
};
public void setSudName(String sudName) {
sud_text_name = (TextView) findViewById(com.yunbao.common.R.id.sud_text_name);
sud_text_name = (TextView) findViewById(R.id.sud_text_name);
sud_layout_name = (LinearLayout) findViewById(R.id.sud_layout_name);
sud_text_name.setText(WordUtil.isNewZh() ?
String.format("主播创建了【%s】房间快来与主播同玩~", sudName) :
String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName));
sud_text_name.setVisibility(View.VISIBLE);
ViewClicksAntiShake.clicksAntiShake(sud_text_name, new ViewClicksAntiShake.ViewClicksCallBack() {
sud_layout_name.setVisibility(View.VISIBLE);
ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
sud_text_name.setVisibility(View.GONE);
sud_layout_name.setVisibility(View.GONE);
}
});
sudNameHandler.removeCallbacks(sudNameRunnable);

View File

@ -2478,21 +2478,31 @@
android:layout_marginTop="80dp"
app:autoPlay="true" />
<TextView
<LinearLayout
android:id="@+id/sud_layout_name"
android:layout_width="257dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:background="@drawable/background_live_sud_hint"
android:gravity="center"
android:layout_marginStart="21dp"
android:layout_marginEnd="42dp"
android:paddingStart="21dp"
android:visibility="gone"
android:paddingEnd="15dp">
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/sud_text_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginStart="21dp"
android:layout_marginEnd="21dp"
android:layout_marginBottom="24dp"
android:background="@drawable/bg_live_sud_hint"
android:paddingStart="22dp"
android:paddingTop="8dp"
android:paddingEnd="22dp"
android:paddingBottom="8dp"
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
android:textColor="@color/white"
android:textColor="@color/black3"
android:textSize="14sp"
android:visibility="gone" />
/>
</LinearLayout>
</RelativeLayout>