调整礼物栏触碰事件拦截

This commit is contained in:
zlzw 2023-08-24 10:46:40 +08:00
parent d4ff9c3072
commit bec031688e
2 changed files with 424 additions and 389 deletions

View File

@ -6,77 +6,194 @@
android:layout_gravity="bottom"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/operate_image"
android:layout_width="122dp"
android:layout_height="50dp"
android:layout_gravity="end|bottom"
android:layout_marginEnd="5dp"
android:scaleType="fitXY" />
<FrameLayout
android:id="@+id/blind_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:visibility="invisible">
<include
layout="@layout/view_blind_box" />
</FrameLayout>
<FrameLayout
android:id="@+id/naming_layout"
android:id="@+id/overlay"
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_gravity="bottom"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:layout_marginBottom="5dp">
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/operate_image"
android:layout_width="122dp"
android:layout_height="50dp"
android:layout_gravity="end|bottom"
android:layout_marginEnd="5dp"
android:scaleType="fitXY" />
<FrameLayout
android:id="@+id/blind_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:visibility="invisible">
<include
layout="@layout/view_blind_box" />
</FrameLayout>
<FrameLayout
android:id="@+id/naming_layout"
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_gravity="bottom"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:layout_marginBottom="5dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@mipmap/background_live_gift_gift_itle" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<ImageView
android:id="@+id/gift_itle"
android:layout_width="54dp"
android:layout_height="13dp"
android:layout_marginStart="13dp"
android:src="@mipmap/icon_live_gift_gift_itle" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/naming_avatar"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_marginStart="6dp"
android:scaleType="centerCrop"
android:src="@drawable/m_chu_xia"
app:riv_oval="true" />
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/naming_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="4dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#FFFFFFFF"
android:textSize="12sp" />
</LinearLayout>
</FrameLayout>
</FrameLayout>
<RelativeLayout
android:id="@+id/gift_list"
android:layout_width="match_parent"
android:layout_height="323dp"
android:animateLayoutChanges="true"
android:orientation="vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/git_background2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@mipmap/background_live_gift_gift_itle" />
android:src="@drawable/backgroud_custom_gift2"
app:riv_corner_radius_bottom_left="0dp"
app:riv_corner_radius_bottom_right="0dp"
app:riv_corner_radius_top_left="10dp"
app:riv_corner_radius_top_right="10dp" />
<LinearLayout
android:id="@+id/git_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:animateLayoutChanges="true">
<ImageView
android:id="@+id/gift_itle"
android:layout_width="54dp"
android:layout_height="13dp"
android:layout_marginStart="13dp"
android:src="@mipmap/icon_live_gift_gift_itle" />
<LinearLayout
android:id="@+id/leveling_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:visibility="gone">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/naming_avatar"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_marginStart="6dp"
android:scaleType="centerCrop"
android:src="@drawable/m_chu_xia"
app:riv_oval="true" />
<FrameLayout
android:layout_width="40dp"
android:layout_height="22dp"
android:layout_marginStart="17dp"
android:layout_marginTop="9dp"
android:background="@mipmap/icon_grade_angle_mark">
<TextView
android:id="@+id/lv_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Lv.8"
android:textColor="@color/white"
android:textSize="12sp" />
</FrameLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="18dp"
android:layout_weight="1"
android:orientation="vertical">
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="4dp"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/progress_bg_user" />
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/leave_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="2dp"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="@string/leveling_points"
android:textColor="#BBBBBB"
android:textSize="9sp" />
</LinearLayout>
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginTop="14dp"
android:layout_marginEnd="14dp"
android:background="@mipmap/icon_right" />
</LinearLayout>
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/naming_name"
android:id="@+id/gift_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="4dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:ellipsize="marquee"
@ -86,361 +203,245 @@
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#FFFFFFFF"
android:textColor="#80FFFFFF"
android:textSize="12sp" />
</LinearLayout>
</FrameLayout>
</FrameLayout>
<RelativeLayout
android:id="@+id/gift_list"
android:layout_width="match_parent"
android:layout_height="323dp"
android:animateLayoutChanges="true"
android:orientation="vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/git_background2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/backgroud_custom_gift2"
app:riv_corner_radius_bottom_left="0dp"
app:riv_corner_radius_bottom_right="0dp"
app:riv_corner_radius_top_left="10dp"
app:riv_corner_radius_top_right="10dp" />
<LinearLayout
android:id="@+id/git_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:animateLayoutChanges="true">
<LinearLayout
android:id="@+id/leveling_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:visibility="gone">
<FrameLayout
android:layout_width="40dp"
android:layout_height="22dp"
android:layout_marginStart="17dp"
android:layout_marginTop="9dp"
android:background="@mipmap/icon_grade_angle_mark">
android:id="@+id/btn_luck_gift_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
<include layout="@layout/view_nobility" />
<TextView
android:id="@+id/lv_str"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Lv.8"
android:textColor="@color/white"
android:textSize="12sp" />
</FrameLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/gift_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="8dp"
android:paddingStart="16dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="18dp"
android:layout_weight="1"
android:orientation="vertical">
android:id="@+id/diamond_linear"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:background="@drawable/background_gift_money"
android:gravity="center_vertical"
android:paddingStart="4dp"
android:paddingTop="7dp"
android:paddingBottom="7dp">
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="4dp"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/progress_bg_user" />
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:clickable="false"
android:focusable="false"
android:src="@mipmap/diamond" />
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/leave_hint"
android:layout_width="match_parent"
<TextView
android:id="@+id/diamond_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="2dp"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:clickable="false"
android:focusable="false"
android:text="0"
android:textColor="@color/white"
android:textSize="12sp" />
<ImageView
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_marginEnd="4dp"
android:background="@mipmap/icon_right" />
</LinearLayout>
<LinearLayout
android:id="@+id/gold_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="8dp"
android:layout_toRightOf="@id/diamond_linear"
android:gravity="center_vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:clickable="false"
android:focusable="false"
android:src="@mipmap/gold_coin" />
<TextView
android:id="@+id/gold_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:clickable="false"
android:focusable="false"
android:text="10000000"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/gift_send_layout"
android:layout_width="130dp"
android:layout_height="32dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="14dp">
<FrameLayout
android:id="@+id/gift_number_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="42dp"
android:background="@drawable/background_gift_money2">
<TextView
android:id="@+id/gift_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:text="1"
android:textColor="#F5C05A"
android:textSize="14sp" />
<ImageView
android:id="@+id/icon_arrow"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_gravity="center_vertical|end"
android:layout_marginEnd="30dp"
android:src="@mipmap/icon_arrow_right_2" />
</FrameLayout>
<TextView
android:id="@+id/live_gift_send"
android:layout_width="62dp"
android:layout_height="32dp"
android:layout_gravity="end"
android:background="@drawable/bg_live_gift_send_new"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="@string/leveling_points"
android:textColor="#BBBBBB"
android:textSize="9sp" />
android:text="@string/live_gift_send"
android:textColor="@color/white"
android:textSize="14sp" />
</FrameLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/gift_bottom"
android:layout_below="@id/git_title"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp">
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/gift_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginEnd="10dp" />
<ImageView
android:layout_width="27dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="@drawable/icon_covering_layer"
android:scaleType="centerCrop" />
</FrameLayout>
<View
android:layout_width="1dp"
android:layout_height="11dp"
android:layout_gravity="center_vertical"
android:background="@color/white" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="10dp">
<TextView
android:id="@+id/live_wrap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="8dp"
android:text="@string/live_wrap"
android:textColor="#CCCDCE"
android:textSize="16sp" />
<View
android:id="@+id/red_point"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_gravity="end"
android:layout_marginEnd="6dp"
android:background="@drawable/bg_red_point" />
</FrameLayout>
</LinearLayout>
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginTop="14dp"
android:layout_marginEnd="14dp"
android:background="@mipmap/icon_right" />
</LinearLayout>
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/gift_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#80FFFFFF"
android:textSize="12sp" />
<FrameLayout
android:id="@+id/btn_luck_gift_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
<include layout="@layout/view_nobility" />
</FrameLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/gift_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="8dp"
android:paddingStart="16dp">
<LinearLayout
android:id="@+id/diamond_linear"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:background="@drawable/background_gift_money"
android:gravity="center_vertical"
android:paddingStart="4dp"
android:paddingTop="7dp"
android:paddingBottom="7dp">
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:clickable="false"
android:focusable="false"
android:src="@mipmap/diamond" />
<TextView
android:id="@+id/diamond_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:clickable="false"
android:focusable="false"
android:text="0"
android:textColor="@color/white"
android:textSize="12sp" />
<ImageView
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_marginEnd="4dp"
android:background="@mipmap/icon_right" />
</LinearLayout>
<LinearLayout
android:id="@+id/gold_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="8dp"
android:layout_toRightOf="@id/diamond_linear"
android:gravity="center_vertical">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:clickable="false"
android:focusable="false"
android:src="@mipmap/gold_coin" />
<TextView
android:id="@+id/gold_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:clickable="false"
android:focusable="false"
android:text="10000000"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
<FrameLayout
android:id="@+id/gift_send_layout"
android:layout_width="130dp"
android:layout_height="32dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="14dp">
<FrameLayout
android:id="@+id/gift_number_layout"
android:id="@+id/context_layout_gift"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="42dp"
android:background="@drawable/background_gift_money2">
<TextView
android:id="@+id/gift_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:text="1"
android:textColor="#F5C05A"
android:textSize="14sp" />
<ImageView
android:id="@+id/icon_arrow"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_gravity="center_vertical|end"
android:layout_marginEnd="30dp"
android:src="@mipmap/icon_arrow_right_2" />
</FrameLayout>
<TextView
android:id="@+id/live_gift_send"
android:layout_width="62dp"
android:layout_height="32dp"
android:layout_gravity="end"
android:background="@drawable/bg_live_gift_send_new"
android:gravity="center"
android:text="@string/live_gift_send"
android:textColor="@color/white"
android:textSize="14sp" />
</FrameLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/gift_bottom"
android:layout_below="@id/git_title"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp">
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/gift_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="8dp"
android:layout_marginEnd="10dp" />
<ImageView
android:layout_width="27dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="@drawable/icon_covering_layer"
android:scaleType="centerCrop" />
</FrameLayout>
<View
android:layout_width="1dp"
android:layout_height="11dp"
android:layout_gravity="center_vertical"
android:background="@color/white" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="10dp">
<TextView
android:id="@+id/live_wrap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="8dp"
android:text="@string/live_wrap"
android:textColor="#CCCDCE"
android:textSize="16sp" />
<View
android:id="@+id/red_point"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_gravity="end"
android:layout_marginEnd="6dp"
android:background="@drawable/bg_red_point" />
</FrameLayout>
android:layout_height="196dp"
android:layout_marginTop="12dp" />
</LinearLayout>
<FrameLayout
android:id="@+id/context_layout_gift"
android:layout_width="match_parent"
android:layout_height="196dp"
android:layout_marginTop="12dp" />
<RelativeLayout
android:id="@+id/btn_send_lian"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:background="@mipmap/icon_live_gift_lian"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="@string/live_gift_send_lian"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="@+id/lian_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="35dp"
android:textColor="#fff"
android:textSize="14sp" />
<RelativeLayout
android:id="@+id/btn_send_lian"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:background="@mipmap/icon_live_gift_lian"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="@string/live_gift_send_lian"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/lian_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="35dp"
android:textColor="#fff"
android:textSize="14sp" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>

View File

@ -15,6 +15,7 @@ import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
@ -103,7 +104,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
private TextView diamondText, goldText, liveWrap, vipGoldDesc, vipGoldTitle, giftNumber;
private RecyclerView giftTitle;
private GiftTitleAdapter giftTitleAdapter;
private FrameLayout contextLayoutGift;
private FrameLayout contextLayoutGift, overlay;
private String mStream, mLiveUid;
private FrameLayout blindBox, frameBlindTop, noNobility, giftNumberLayout, giftSendLayout, namingLayout;
private ProgressBar progressBlind, progressBlind1, progressBlind2;
@ -182,6 +183,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
leaveHint = mRootView.findViewById(R.id.leave_hint);
progressBar = mRootView.findViewById(R.id.progressBar);
levelingLayout = mRootView.findViewById(R.id.leveling_layout);
overlay = mRootView.findViewById(R.id.overlay);
namingLayout.setVisibility(View.GONE);
//设置礼物弹窗背景
ImgLoader.displayBlurLive(getContext(), R.drawable.backgroud_custom_gift2, gitBackground);
@ -199,6 +201,27 @@ public class LiveGiftPopup extends AbsDialogFragment {
giftDescription.setVisibility(View.GONE);
operateImage.setVisibility(View.GONE);
levelingLayout.setVisibility(View.VISIBLE);
updateOverlayVisibility();
blindBox.setOnTouchListener((v, event) -> {
if(event.getAction()==MotionEvent.ACTION_UP) {
v.performClick();
}
return true;
});
namingLayout.setOnTouchListener((v, event) -> {
if(event.getAction()==MotionEvent.ACTION_UP) {
v.performClick();
}
return true;
});
operateImage.setOnTouchListener((v, event) -> {
if(event.getAction()==MotionEvent.ACTION_UP) {
v.performClick();
}
return true;
});
overlay.setOnClickListener(v -> dismiss());
//点击包裹
ViewClicksAntiShake.clicksAntiShake(liveWrap, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
@ -460,7 +483,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
int nextLeve = Integer.parseInt(coinModel.getUserNextLevelRewards());
BigDecimal maxLeve = new BigDecimal(coinModel.getUserLevelUpgrades()).add( new BigDecimal(coinModel.getUserLevelCurrentConsumption()));
BigDecimal maxLeve = new BigDecimal(coinModel.getUserLevelUpgrades()).add(new BigDecimal(coinModel.getUserLevelCurrentConsumption()));
try {
String leveNext = String.valueOf(nextLeve);
String userNextLevel = coinModel.getUserLevelUpgrades();
@ -731,7 +754,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onLiveGiftItemEvent(LiveGiftItemEvent event) {
liveGiftModel = event.getLiveGiftModel();
updateOverlayVisibility();
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
@ -1240,4 +1263,15 @@ public class LiveGiftPopup extends AbsDialogFragment {
}
}
private void updateOverlayVisibility() {
/* if (
blindBox.getVisibility() == View.VISIBLE ||
operateImage.getVisibility() == View.VISIBLE ||
namingLayout.getVisibility() == View.VISIBLE
) {
overlay.setVisibility(View.VISIBLE);
} else {
overlay.setVisibility(View.GONE);
}*/
}
}