From 08e7e6b461c527318ffd606edb36b509eca4ab36 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 22 Nov 2022 14:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BC=E7=89=A9=E5=BC=B9=E7=AA=97=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 4 +- .../live/dialog/LiveGiftDialogFragment.java | 21 +- .../main/res/layout/dialog_live_gift_wrap.xml | 267 ++++++++++-------- live/src/main/res/layout/item_live_gift.xml | 57 ++-- 4 files changed, 185 insertions(+), 164 deletions(-) diff --git a/config.gradle b/config.gradle index d73f7bbfa..9b9ac5933 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", //測試 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java index f24723467..4b7acd53c 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java @@ -148,7 +148,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On window.setWindowAnimations(R.style.bottomToTopAnim); WindowManager.LayoutParams params = window.getAttributes(); params.width = WindowManager.LayoutParams.MATCH_PARENT; - params.height = DpUtil.dp2px(350); + params.height = DpUtil.dp2px(355); params.gravity = Gravity.BOTTOM; window.setAttributes(params); } @@ -251,7 +251,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On mVipGoldTitle = mRootView.findViewById(R.id.vipGoldTitle); mVipGoldDesc = mRootView.findViewById(R.id.vipGoldDesc); mVipGold.setOnClickListener(this); - mGiftPackage= mRootView.findViewById(R.id.btn_gift_package); + mGiftPackage = mRootView.findViewById(R.id.btn_gift_package); mGiftPackage.setOnClickListener(this); mRootView.findViewById(R.id.live_gift_download_all).setOnClickListener(this); mHandler = new Handler() { @@ -295,7 +295,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On JSONObject user = JSONObject.parseObject(info[0]); int nobleId = user.getIntValue("noble_id"); int resId = NobleUtil.nobleIdToImageResId(nobleId); - if(resId!=-1){ + if (resId != -1) { mVipGoldIcon.setImageResource(resId); mVipGoldTitle.setText(user.getString("noble_name")); mVipGoldDesc.setText(R.string.live_gift_buy_gold_desc_to); @@ -385,7 +385,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On String giftJson = obj.getString("giftlist"); List list = JSON.parseArray(giftJson, LiveGiftBean.class); GiftCacheUtil.getInstance().addDownloadList(list); - if(!GiftCacheUtil.getInstance().isDownloading()){ + if (!GiftCacheUtil.getInstance().isDownloading()) { GiftCacheUtil.getInstance().downloadAllGift(); } if (list.size() == 0) { @@ -405,7 +405,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On } private void showGiftList(List list) { - if (bean1!=null&&IMLoginManager.get(mContext).isNewUserGif() && (type_name.equals("熱門") || type_name.equals("Hot"))) { + if (bean1 != null && IMLoginManager.get(mContext).isNewUserGif() && (type_name.equals("熱門") || type_name.equals("Hot"))) { list.add(0, bean1); if (mWishGiftId == null) { mWishGiftId = "" + bean1.getId(); @@ -503,11 +503,11 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On } else if (i == R.id.btn_choose) { showGiftCount(); } else if (i == R.id.coin) { - forwardMyCoin(); + forwardMyCoin(0); } else if (i == R.id.goldCoin) { - forwardMyCoin(); + forwardMyCoin(2); } else if (i == R.id.go_charge) { - forwardMyCoin(); + forwardMyCoin(0); } else if (i == R.id.btn_luck_gift_tip) { dismiss(); ((LiveActivity) mContext).openLuckGiftTip(); @@ -556,10 +556,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On /** * 跳转到我的钻石 */ - private void forwardMyCoin() { + private void forwardMyCoin(int page) { dismiss(); //我们的 - ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation(); + ARouter.getInstance().build(PATH_COIN).withInt("p", page).navigation(); } /** @@ -709,6 +709,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On /** * 收到礼物下载完成的通知 + * * @param status */ @Subscribe(threadMode = ThreadMode.MAIN) diff --git a/live/src/main/res/layout/dialog_live_gift_wrap.xml b/live/src/main/res/layout/dialog_live_gift_wrap.xml index 05570e3d2..bfb498451 100644 --- a/live/src/main/res/layout/dialog_live_gift_wrap.xml +++ b/live/src/main/res/layout/dialog_live_gift_wrap.xml @@ -2,181 +2,196 @@ + - - - - - - - - - - + android:id="@+id/live_gift_download_all" + android:layout_width="155dp" + android:layout_height="32dp" + android:layout_alignParentStart="true" + android:layout_marginStart="12dp" + android:background="@drawable/bg_live_gift_download_all" + android:gravity="center" + android:orientation="horizontal" + android:visibility="invisible"> + + + - + android:gravity="center" + android:text="一鍵下載所有禮物動畫" + android:textSize="10sp" + android:visibility="visible" /> + - + + + + + + + + + + + + + + + android:orientation="horizontal"> + + android:layout_marginEnd="5dp" + android:layout_weight="1" /> - - + + + + android:layout_weight="1" /> - - - + android:layout_height="66dp" + android:layout_weight="0"> + + + + android:layout_height="match_parent" + android:layout_marginStart="10dp" + android:layout_marginEnd="10dp"> + + android:visibility="invisible" + app:tint="@color/global" /> + + android:layout_height="match_parent" + android:layout_marginBottom="5dp" + android:gravity="bottom" + android:layout_marginStart="20dp" + android:orientation="horizontal"> + + android:layout_height="match_parent" + android:orientation="vertical"> + - + app:mfl_ratio="1"> + android:checked="true" /> + android:layout_marginTop="1dp" + android:layout_marginRight="1dp" /> + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" /> - + android:background="#D996cff0" + android:gravity="center" + android:textColor="@color/color_white" + android:textSize="8sp" + android:visibility="gone" /> @@ -56,21 +54,22 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|center" - android:gravity="center" android:layout_marginBottom="8dp" + android:gravity="center" android:orientation="horizontal"> - + android:layout_height="10dp" /> + android:textColor="@color/gray3" + android:textSize="11sp" /> @@ -78,18 +77,17 @@ android:id="@+id/name" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_gravity="bottom" android:layout_marginBottom="23dp" android:gravity="center" android:textColor="@color/white" - android:textSize="12sp" - android:layout_gravity="bottom" - /> + android:textSize="12sp" /> + + android:textSize="10sp" + android:visibility="gone" /> - \ No newline at end of file + \ No newline at end of file