diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 9a1723c46..5bb08a201 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -99,6 +99,21 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { private ImageView pd_pao, combo; private CircleProgress2 circleProgress; + +// private TextView etInput; // 对应于XML中的TextView +// private ImageView msgImage; // 对应于XML中的第一个ImageView +// private ImageView pandaImage; // 对应于XML中的另一个ImageView +// private TextView quickGiftRemainingQuantity; // 对应于XML中的TextView +// private ImageView combo; // 对应于XML中的ImageView +// private CircleProgress2 circleProgress; // 假设CircleProgress2是一个自定义视图类 +// private TextView timeText; // 对应于XML中的TextView +// private ImageView giftImage; // 对应于XML中的ImageView +// private View msgRedPoint; // 对应于XML中的View +// private ImageView totalImage; // 对应于XML中的ImageView +// private View totalRedPoint; // 对应于XML中的View + + + public LiveAudienceViewHolder(Context context, ViewGroup parentView) { super(context, parentView); this.context = (Activity) context; @@ -115,11 +130,27 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { public void init() { super.init(); EventBus.getDefault().register(this); - findViewById(R.id.btn_close).setOnClickListener(this); - findViewById(R.id.btn_share).setOnClickListener(this); - findViewById(R.id.btn_red_pack).setOnClickListener(this); - findViewById(R.id.btn_gift).setOnClickListener(this); - findViewById(R.id.btn_zg).setOnClickListener(this); + +// findViewById(R.id.btn_close).setOnClickListener(this); +// findViewById(R.id.btn_share).setOnClickListener(this); +// findViewById(R.id.btn_red_pack).setOnClickListener(this); +// findViewById(R.id.btn_gift).setOnClickListener(this); +// findViewById(R.id.btn_zg).setOnClickListener(this); + + + // 初始化控件 +// etInput = findViewById(R.id.et_input); +// msgImage = findViewById(R.id.msg_image); +// pandaImage = findViewById(R.id.panda_image); +// quickGiftRemainingQuantity = findViewById(R.id.quick_gift_remaining_quantity); +// combo = findViewById(R.id.combo); +// circleProgress = findViewById(R.id.circleProgress); +// timeText = findViewById(R.id.time_text); +// giftImage = findViewById(R.id.gift_image); +// msgRedPoint = findViewById(R.id.msg_red_point); +// totalImage = findViewById(R.id.total_image); +// totalRedPoint = findViewById(R.id.total_red_point); + voiceButton = (LinearLayout) findViewById(R.id.voice_button); giftImage = (ImageView) findViewById(R.id.gift_image); quick_gift_remaining_quantity = (TextView) findViewById(R.id.quick_gift_remaining_quantity); @@ -659,7 +690,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { int i = v.getId(); if (i == R.id.btn_close) { close(); - } else if (i == R.id.btn_share) { ((LiveAudienceActivity) mContext).light(); @@ -668,7 +698,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { } else if (i == R.id.btn_gift) { openGiftWindow(); - //全屏 } else if (i == R.id.btn_more) { ((LiveActivity) mContext).openMoreWindow(); diff --git a/live/src/main/res/layout/view_live_audience.xml b/live/src/main/res/layout/view_live_audience.xml index 877ecc8dc..d0daa7dc5 100644 --- a/live/src/main/res/layout/view_live_audience.xml +++ b/live/src/main/res/layout/view_live_audience.xml @@ -27,7 +27,8 @@ android:layout_marginBottom="30dp" android:gravity="center_horizontal" android:orientation="vertical" - android:visibility="gone"> + android:visibility="gone" + tools:visibility="gone"> + + @@ -127,7 +137,8 @@ android:layout_centerVertical="true" android:padding="5dp" android:src="@mipmap/icon_live_close" - android:visibility="invisible" /> + android:visibility="invisible" + tools:visibility="invisible" /> + android:layout_height="wrap_content" + android:visibility="visible"> + android:layout_centerHorizontal="true" /> + android:visibility="gone" + tools:visibility="visible" /> diff --git a/live/src/main/res/layout/view_live_audience1.xml b/live/src/main/res/layout/view_live_audience_part.xml similarity index 63% rename from live/src/main/res/layout/view_live_audience1.xml rename to live/src/main/res/layout/view_live_audience_part.xml index 2660f5ff4..b4ff81aa0 100644 --- a/live/src/main/res/layout/view_live_audience1.xml +++ b/live/src/main/res/layout/view_live_audience_part.xml @@ -53,6 +53,67 @@ app:layout_constraintStart_toEndOf="@+id/msg_image" app:layout_constraintTop_toTopOf="parent" /> + + + + + + + + + + +