小遊戲提醒

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 TextView sud_text_name;
private LinearLayout sud_layout_name;
private Handler sudNameHandler = new Handler(); private Handler sudNameHandler = new Handler();
private Runnable sudNameRunnable = new Runnable() { private Runnable sudNameRunnable = new Runnable() {
@Override @Override
public void run() { public void run() {
if (sud_text_name != null) { if (sud_layout_name != null) {
sud_text_name.setVisibility(View.GONE); sud_layout_name.setVisibility(View.GONE);
} }
} }
}; };
public void setSudName(String sudName) { 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() ? sud_text_name.setText(WordUtil.isNewZh() ?
String.format("主播创建了【%s】房间快来与主播同玩~", sudName) : String.format("主播创建了【%s】房间快来与主播同玩~", sudName) :
String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName)); String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName));
sud_text_name.setVisibility(View.VISIBLE); sud_layout_name.setVisibility(View.VISIBLE);
ViewClicksAntiShake.clicksAntiShake(sud_text_name, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
sud_text_name.setVisibility(View.GONE); sud_layout_name.setVisibility(View.GONE);
} }
}); });
sudNameHandler.removeCallbacks(sudNameRunnable); sudNameHandler.removeCallbacks(sudNameRunnable);

View File

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