diff --git a/common/src/main/java/com/yunbao/common/adapter/GiftWallGiftInfoListItemAdapter.java b/common/src/main/java/com/yunbao/common/adapter/GiftWallGiftInfoListItemAdapter.java index 48b9a9584..b22fd85d5 100644 --- a/common/src/main/java/com/yunbao/common/adapter/GiftWallGiftInfoListItemAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/GiftWallGiftInfoListItemAdapter.java @@ -98,7 +98,7 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter999999){ - return "999999+"; + if(gift_hall_send_num>99999){ + return "99999+"; }else{ return String.valueOf(gift_hall_send_num); } diff --git a/common/src/main/java/com/yunbao/common/dialog/GiftWallDialog.java b/common/src/main/java/com/yunbao/common/dialog/GiftWallDialog.java index 530b7c440..8b9bb6ad9 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallDialog.java @@ -78,7 +78,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow { @Override protected int getPopupHeight() { if (isFullWindows) { - return super.getPopupHeight(); + return super.getPopupHeight()-DpUtil.dp2px(10); } int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight(); return (int) (screenHeight * 0.8); @@ -173,8 +173,15 @@ public class GiftWallDialog extends AbsDialogPopupWindow { ViewClicksAntiShake.clicksAntiShake(mIvTips, () -> { new GiftWallRuleDialog(mContext).setFullWindows(isFullWindows).showDialog(); }); + resetWindows(); + } + private void resetWindows(){ + if(isFullWindows){ + ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.v_achievement).getLayoutParams(); + params.topMargin=DpUtil.dp2px(47); + findViewById(R.id.v_achievement).setLayoutParams(params); + } } - @Override protected void onCreate() { super.onCreate(); diff --git a/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java b/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java index 290724b74..b5966247b 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallGiftInfoDialog.java @@ -6,6 +6,7 @@ import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Color; import android.view.View; +import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; import android.widget.ProgressBar; @@ -13,6 +14,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.core.widget.NestedScrollView; import androidx.recyclerview.widget.RecyclerView; import com.lxj.xpopup.XPopup; @@ -72,7 +74,7 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow { String toUserId; boolean isAnchor; int gift_hall_type = 1; - int list_type = 1; + int list_type = 2; private boolean isLiveRoom; String time; private boolean isStar; @@ -170,8 +172,8 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow { ((TextView) findViewById(R.id.user_name)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename)); ((TextView) findViewById(R.id.tv_rename)).setText(WordUtil.getNewString(R.string.dialog_gift_wall_list_info_list_header_rename_value)); } - btn_one.setVisibility(View.GONE); - btn_one_tips.setVisibility(View.GONE); + + findViewById(R.id.item_anchor_name).setVisibility(View.GONE); ViewClicksAntiShake.clicksAntiShake(tab1, () -> { btn_one.setVisibility(View.GONE); @@ -240,6 +242,14 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow { } mIvBack.setLayoutParams(params); ViewClicksAntiShake.clicksAntiShake(mIvBack, this::dismiss); + resetWindows(); + } + private void resetWindows(){ + if(isFullWindows){ + ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.gift_name).getLayoutParams(); + params.topMargin=DpUtil.dp2px(47); + findViewById(R.id.gift_name).setLayoutParams(params); + } } void initData() { @@ -247,6 +257,8 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow { if (isAnchor) { if(isStar){ gift_hall_type=2; + }else { + gift_hall_type=1; } LiveNetManager.get(mContext) .liveGiftHallDetail(toUserId, giftId, gift_hall_type, list_type, new HttpCallback() { @@ -312,7 +324,9 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow { } if (!isLiveRoom) { gift_btn.setEnabled(false); + btn_one.setEnabled(false); gift_btn.setBackgroundResource(R.drawable.gift_wall_gift_info_btn_un); + btn_one.setBackgroundResource(R.drawable.gift_wall_gift_info_btn_un); } adapter.setData(giftBean.getData()); time = (WordUtil.isNewZh() ? "榜單結算時間" : "Settlement time") + giftBean.getGift_info().getGift_hall_start() + " - " + giftBean.getGift_info().getGift_hall_end(); diff --git a/common/src/main/java/com/yunbao/common/dialog/GiftWallMainTab2ClassicInfoDialog.java b/common/src/main/java/com/yunbao/common/dialog/GiftWallMainTab2ClassicInfoDialog.java index f4ce8aeac..c1f68d397 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallMainTab2ClassicInfoDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallMainTab2ClassicInfoDialog.java @@ -166,9 +166,27 @@ public class GiftWallMainTab2ClassicInfoDialog extends AbsDialogPopupWindow { adapter = new GiftWallTab2GiftInfoListItemAdapter(); recyclerView.setAdapter(adapter); recyclerView.addItemDecoration(new ItemDecoration(mContext, 0x000, 0, 2)); - initData(); - } + ViewClicksAntiShake.clicksAntiShake(mIvBack, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + dismiss(); + } + }); + + initData(); + resetWindows(); + } + private void resetWindows(){ + if(isFullWindows){ + ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.iv_back).getLayoutParams(); + params.topMargin=DpUtil.dp2px(47); + findViewById(R.id.iv_back).setLayoutParams(params); + params = (ConstraintLayout.LayoutParams) findViewById(R.id.scrollView).getLayoutParams(); + params.topMargin=DpUtil.dp2px(47); + findViewById(R.id.scrollView).setLayoutParams(params); + } + } @Override protected void onCreate() { super.onCreate(); diff --git a/common/src/main/java/com/yunbao/common/fragment/GiftWallMainTab2Fragment.java b/common/src/main/java/com/yunbao/common/fragment/GiftWallMainTab2Fragment.java index 745cbfa76..d5aae6dff 100644 --- a/common/src/main/java/com/yunbao/common/fragment/GiftWallMainTab2Fragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/GiftWallMainTab2Fragment.java @@ -106,8 +106,8 @@ public class GiftWallMainTab2Fragment extends BaseFragment { recyclerView2.setAdapter(list2Adapter); - recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(2), DpUtil.dp2px(10))); - recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(2), DpUtil.dp2px(10))); + recyclerView1.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(1), DpUtil.dp2px(5))); + recyclerView2.addItemDecoration(new ItemDecoration(getContext(), 0x00000000, DpUtil.dp2px(1), DpUtil.dp2px(5))); starGiftsTitle.getPaint().setShader(new LinearGradient(0, 0, 0, classicGiftsTitle.getPaint().getTextSize(), Color.parseColor("#FEE8C6"), Color.parseColor("#FFD5A3"), Shader.TileMode.CLAMP)); diff --git a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java index e4c61f85c..c7d3c486d 100644 --- a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java @@ -645,9 +645,13 @@ public class JavascriptInterfaceUtils { .setMethod("androidFansGroupInfo")); } + /** + * 礼物墙 + */ @JavascriptInterface public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl, int isAnchor) { - RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0, isAnchor == 1); + // RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0, isAnchor == 1); + new com.yunbao.common.dialog.GiftWallDialog(mContext, mLiveUid,mAnchorName, isAnchor==1).setFullWindows(true).showDialog(); } @JavascriptInterface diff --git a/common/src/main/res/layout/dialog_gift_wall_gift_info.xml b/common/src/main/res/layout/dialog_gift_wall_gift_info.xml index 0b99ba871..3b17a135c 100644 --- a/common/src/main/res/layout/dialog_gift_wall_gift_info.xml +++ b/common/src/main/res/layout/dialog_gift_wall_gift_info.xml @@ -18,6 +18,7 @@ app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="@+id/gift_name" + tools:visibility="visible" />