diff --git a/common/src/main/java/com/yunbao/common/custom/LiveGifWallAchieveWearTransformer.java b/common/src/main/java/com/yunbao/common/custom/LiveGifWallAchieveWearTransformer.java deleted file mode 100644 index f536fcc71..000000000 --- a/common/src/main/java/com/yunbao/common/custom/LiveGifWallAchieveWearTransformer.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.yunbao.common.custom; - -import android.view.View; - -import com.stx.xhb.androidx.transformers.BasePageTransformer; -import com.yunbao.common.utils.L; - -public class LiveGifWallAchieveWearTransformer extends BasePageTransformer { - private float mMinScale = 0.85f; - private float mMinAlpha = 1f; - @Override - public void handleInvisiblePage(View view, float position) { - } - - @Override - public void handleLeftPage(View view, float position) { - float scale = Math.max(mMinScale, 1 + position); - float vertMargin = view.getHeight() * (1 - scale) / 2; - float horzMargin = view.getWidth() * (1 - scale) / 2; - view.setTranslationX(horzMargin - vertMargin / 2); - view.setScaleX(scale); - view.setScaleY( scale); - L.e("handleLeftPage scale:"+scale); - view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha)); - } - - @Override - public void handleRightPage(View view, float position) { - float scale = Math.max(mMinScale, 1 - position); - float vertMargin = view.getHeight() * (1 - scale) / 2; - float horzMargin = view.getWidth() * (1 - scale) / 2; - view.setTranslationX( -horzMargin + vertMargin / 2); - view.setScaleX( scale); - view.setScaleY( scale); - L.e("handleRightPage scale:"+scale); - view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha)); - } - - public void setMinAlpha(float minAlpha) { - if (minAlpha >= 0.6f && minAlpha <= 1.0f) { - mMinAlpha = minAlpha; - } - } - - public void setMinScale(float minScale) { - if (minScale >= 0.6f && minScale <= 1.0f) { - mMinScale = minScale; - } - } -} diff --git a/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveDialog.java b/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveDialog.java index 226f11c47..452e74a95 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveDialog.java @@ -1,10 +1,14 @@ package com.yunbao.common.dialog; import android.content.Context; +import android.view.View; +import android.view.ViewGroup; import android.widget.ImageView; +import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -13,8 +17,10 @@ import com.yunbao.common.R; import com.yunbao.common.adapter.GiftWallAchieveAdapter; import com.yunbao.common.bean.MedalAchievementModel; import com.yunbao.common.bean.UserMedalListModel; +import com.yunbao.common.fragment.GiftWallMainTab1Fragment; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.ToastUtil; @@ -33,6 +39,8 @@ public class GiftWallAchieveDialog extends AbsDialogPopupWindow { private RecyclerView mRecyclerView; private GiftWallAchieveAdapter giftWallAchieveAdapter; private String toUid; + private boolean isAnchor; + private View topBar; private List userMedalListModelList = new ArrayList<>(); @@ -45,6 +53,12 @@ public class GiftWallAchieveDialog extends AbsDialogPopupWindow { return this; } + + public GiftWallAchieveDialog setAnchor(boolean anchor) { + isAnchor = anchor; + return this; + } + public GiftWallAchieveDialog setToUid(String toUid) { this.toUid = toUid; return this; @@ -75,29 +89,33 @@ public class GiftWallAchieveDialog extends AbsDialogPopupWindow { mRecyclerView = findViewById(R.id.recyclerView); mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 3, GridLayoutManager.VERTICAL, false)); numCount = findViewById(R.id.numCount); + topBar = findViewById(R.id.top_bar); + mIvBack.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View view) { + dialog.dismiss(); + } + }); } @Override protected void onCreate() { super.onCreate(); initView(); - /*RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mIvBack.getLayoutParams(); if (isFullWindows) { - params.width=DpUtil.dp2px(20); - mIvBack.setVisibility(View.VISIBLE); mIvBg.setScaleType(ImageView.ScaleType.CENTER_CROP); + ViewGroup.LayoutParams params1 = topBar.getLayoutParams(); + params1.height=DpUtil.dp2px(35);; + topBar.setLayoutParams(params1); } else { - params.width=DpUtil.dp2px(1); - mIvBack.setVisibility(View.INVISIBLE); mIvBg.setScaleType(ImageView.ScaleType.FIT_XY); } - mIvBack.setLayoutParams(params);*/ initData(); } private void initData() { LiveNetManager.get(getContext()) - .getGiftHallMedalList(toUid,"",new HttpCallback() { + .getGiftHallMedalList(toUid,isAnchor?"1":"2",new HttpCallback() { @Override public void onSuccess(MedalAchievementModel data) { numCount.setText(data.getMedalLightNumber()+"/"+data.getMedalTotalNumber()); @@ -106,7 +124,7 @@ public class GiftWallAchieveDialog extends AbsDialogPopupWindow { giftWallAchieveAdapter.setOnItemClickListener(new GiftWallAchieveAdapter.OnItemClickListener() { @Override public void onItemClick(int position) { - GiftWallAchieveWearDialog giftWallAchieveWearDialog = new GiftWallAchieveWearDialog(mContext,userMedalListModelList.get(position).getDressInfo()); + GiftWallAchieveWearDialog giftWallAchieveWearDialog = new GiftWallAchieveWearDialog(mContext,isAnchor,userMedalListModelList.get(position).getDressInfo()); giftWallAchieveWearDialog.showDialog(); } }); diff --git a/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveWearDialog.java b/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveWearDialog.java index da69994c8..31c73951d 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveWearDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallAchieveWearDialog.java @@ -38,13 +38,15 @@ public class GiftWallAchieveWearDialog extends AbsDialogPopupWindow { private TextView textAchieveHint; private TextView btnConfirm; private int selectPosition = 0; + private boolean isAnchor; String putOn = WordUtil.isNewZh() ? "佩戴" : "wearing"; String wearing = WordUtil.isNewZh() ? "已佩戴" : "worn"; private List achieveWearModels = new ArrayList<>(); - public GiftWallAchieveWearDialog(@NonNull Context context, List achieveWearModels) { + public GiftWallAchieveWearDialog(@NonNull Context context,boolean isAnchor, List achieveWearModels) { super(context); + this.isAnchor = isAnchor; this.achieveWearModels = achieveWearModels; } 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 142f1014c..86fad4d3b 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallDialog.java @@ -157,10 +157,10 @@ public class GiftWallDialog extends AbsDialogPopupWindow { mViewPager.setCurrentItem(1, false); }); ViewClicksAntiShake.clicksAntiShake(mAchievement, () -> { - new GiftWallAchieveDialog(mContext).setFullWindows(false).setToUid("98889").showDialog(); + new GiftWallAchieveDialog(mContext).setFullWindows(isFullWindows).setAnchor(isAnchor).setToUid(toUserId).showDialog(); }); ViewClicksAntiShake.clicksAntiShake(mIvTips, () -> { - new GiftWallRuleDialog(mContext).setFullWindows(false).showDialog(); + new GiftWallRuleDialog(mContext).setFullWindows(isFullWindows).showDialog(); }); } 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 b4c1eeada..f4ce8aeac 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallMainTab2ClassicInfoDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallMainTab2ClassicInfoDialog.java @@ -6,6 +6,7 @@ import android.graphics.Typeface; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; +import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; @@ -59,7 +60,6 @@ public class GiftWallMainTab2ClassicInfoDialog extends AbsDialogPopupWindow { private List fragments = new ArrayList<>(); private RecyclerView recyclerView; GiftWallTab2GiftInfoListItemAdapter adapter; - private boolean isFullWindows; GiftWallTab2Bean.Gift gift; String userName; @@ -97,18 +97,17 @@ public class GiftWallMainTab2ClassicInfoDialog extends AbsDialogPopupWindow { } void initData() { - LiveNetManager.get(mContext) - .lastAllGiftHallWeekStarDetail(gift.getGiftId() + "", gift.getNamingLiveId() + "", new HttpCallback() { - @Override - public void onSuccess(GiftWallMainTab2ClassicInfoBean data) { - initData(data); - } + LiveNetManager.get(mContext).lastAllGiftHallWeekStarDetail(gift.getGiftId() + "", gift.getNamingLiveId() + "", new HttpCallback() { + @Override + public void onSuccess(GiftWallMainTab2ClassicInfoBean data) { + initData(data); + } - @Override - public void onError(String error) { + @Override + public void onError(String error) { - } - }); + } + }); } void initData(GiftWallMainTab2ClassicInfoBean data) { @@ -131,6 +130,7 @@ public class GiftWallMainTab2ClassicInfoDialog extends AbsDialogPopupWindow { break; } } + } void setTopData(GiftWallMainTab2ClassicInfoBean.GiftData data, ImageView avatar, TextView name, TextView value) { diff --git a/common/src/main/java/com/yunbao/common/dialog/GiftWallRuleDialog.java b/common/src/main/java/com/yunbao/common/dialog/GiftWallRuleDialog.java index c73852980..82df2670b 100644 --- a/common/src/main/java/com/yunbao/common/dialog/GiftWallRuleDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/GiftWallRuleDialog.java @@ -2,7 +2,10 @@ package com.yunbao.common.dialog; import android.content.Context; import android.graphics.drawable.Drawable; +import android.view.View; +import android.view.ViewGroup; import android.widget.ImageView; +import android.widget.RelativeLayout; import android.widget.TextView; import androidx.annotation.NonNull; @@ -17,6 +20,7 @@ import com.yunbao.common.bean.UserMedalListModel; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; @@ -33,6 +37,7 @@ public class GiftWallRuleDialog extends AbsDialogPopupWindow { private ImageView mIvBack; private ImageView iv_rule; private boolean isFullWindows; + private View topBar; public GiftWallRuleDialog(@NonNull Context context) { super(context); } @@ -65,23 +70,27 @@ public class GiftWallRuleDialog extends AbsDialogPopupWindow { mIvBg = findViewById(R.id.iv_root_bg); mIvBack = findViewById(R.id.iv_back); iv_rule= findViewById(R.id.iv_rule); + topBar = findViewById(R.id.top_bar); + mIvBack.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View view) { + dialog.dismiss(); + } + }); } @Override protected void onCreate() { super.onCreate(); initView(); - /*RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mIvBack.getLayoutParams(); if (isFullWindows) { - params.width=DpUtil.dp2px(20); - mIvBack.setVisibility(View.VISIBLE); mIvBg.setScaleType(ImageView.ScaleType.CENTER_CROP); + ViewGroup.LayoutParams params1 = topBar.getLayoutParams(); + params1.height= DpUtil.dp2px(35);; + topBar.setLayoutParams(params1); } else { - params.width=DpUtil.dp2px(1); - mIvBack.setVisibility(View.INVISIBLE); mIvBg.setScaleType(ImageView.ScaleType.FIT_XY); } - mIvBack.setLayoutParams(params);*/ ImgLoader.displayDrawable(mContext, WordUtil.isNewZh() ? "https://downs.yaoulive.com/Group%201384.png" : "https://downs.yaoulive.com/Group%201381.png", -1, -1, new ImgLoader.DrawableCallback() { @Override public void onLoadSuccess(Drawable drawable) { diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index dbd9e5f9a..977def227 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -1277,7 +1277,6 @@ public interface PDLiveApi { Observable> userUseDress(@Query("dress_type") String dress_type,@Query("users_dress_id")String users_dress_id); - /** * 个人展馆 */ diff --git a/common/src/main/res/layout/dialog_gift_wall_achieve.xml b/common/src/main/res/layout/dialog_gift_wall_achieve.xml index 25d50a04f..4e2283b1a 100644 --- a/common/src/main/res/layout/dialog_gift_wall_achieve.xml +++ b/common/src/main/res/layout/dialog_gift_wall_achieve.xml @@ -12,9 +12,16 @@ android:scaleType="fitXY" android:src="@mipmap/dialog_gift_wall_achieve" /> + + @@ -23,6 +30,7 @@ android:text="@string/gift_wall_achieve_title" android:layout_width="match_parent" android:textSize="20sp" + android:layout_below="@+id/top_bar" android:textColor="@color/white" android:gravity="center" android:textStyle="bold" diff --git a/common/src/main/res/layout/dialog_gift_wall_rule.xml b/common/src/main/res/layout/dialog_gift_wall_rule.xml index 034ba94bd..842c3ed3d 100644 --- a/common/src/main/res/layout/dialog_gift_wall_rule.xml +++ b/common/src/main/res/layout/dialog_gift_wall_rule.xml @@ -12,9 +12,16 @@ android:scaleType="fitXY" android:src="@mipmap/dialog_gift_wall_achieve" /> + + @@ -24,9 +31,10 @@ android:layout_width="match_parent" android:textSize="20sp" android:textColor="@color/white" + android:layout_below="@+id/top_bar" android:gravity="center" android:textStyle="bold" - android:layout_height="60dp" /> + android:layout_height="60dp"/> You have reached the highest level! There\'s nothing in the package yet Enter count - Gift wall + Gift Hall Has been lit %s Illustrated book Not lit up diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index f8c82d07b..68329ce5d 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1254,7 +1254,7 @@ 恭喜,你已達到最高等級 包裹中暫無物品哦 自定義數量 - 禮物墻 + 禮物展館 已點亮%s個 圖鑒 榮譽成就 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 4cab841f5..7b9a8434d 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1253,7 +1253,7 @@ 恭喜,你已達到最高等級 包裹中暫無物品哦 自定義數量 - 禮物墻 + 禮物展館 已點亮%s個 圖鑒 榮譽成就 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 88f7361fb..ee8a252e8 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1252,7 +1252,7 @@ 恭喜,你已達到最高等級 包裹中暫無物品哦 自定義數量 - 禮物墻 + 禮物展館 已點亮%s個 圖鑒 未點亮 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 8eedc4f83..0bf67d1a2 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1258,7 +1258,7 @@ There\'s nothing in the package yet You have reached the highest level! Enter count - Gift wall + Gift Hall Has been lit %s Not lit up Platform title diff --git a/live/src/main/java/com/yunbao/live/views/FrameGiftViewHolder.java b/live/src/main/java/com/yunbao/live/views/FrameGiftViewHolder.java index cbc96ad11..23bcd9cd0 100644 --- a/live/src/main/java/com/yunbao/live/views/FrameGiftViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/FrameGiftViewHolder.java @@ -2,6 +2,7 @@ package com.yunbao.live.views; import android.content.Context; import android.graphics.Color; +import android.text.TextUtils; import android.util.TypedValue; import android.view.View; import android.view.animation.AccelerateDecelerateInterpolator; @@ -44,7 +45,7 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder { private ScaleAnimation mAnimation; private LinearLayout mLoadingLayout; private ImageView mLoading; - private LinearLayout namingLayout; + private RelativeLayout namingLayout; private MarqueeTextView naming_name; private RoundedImageView avatar; diff --git a/live/src/main/java/com/yunbao/live/views/LiveGiftViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveGiftViewHolder.java index 4ce21e6f8..e02b1e5c6 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveGiftViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveGiftViewHolder.java @@ -185,16 +185,13 @@ public class LiveGiftViewHolder extends AbsViewHolder { !TextUtils.isEmpty(bean.getNamingUid()) && !TextUtils.equals(bean.getNamingLiveuid(), "0") && !TextUtils.equals(bean.getNamingUid(), "0")) { - root_back.setBackgroundResource(R.drawable.background_naming); - findViewById(R.id.naming_icon).setVisibility(View.VISIBLE); + giftNamingIcon.setVisibility(View.VISIBLE); + root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_11); + /*root_back.setBackgroundResource(R.drawable.background_naming); + findViewById(R.id.naming_icon).setVisibility(View.VISIBLE);*/ } else { - if(bean.getUser_naming_status()==1){ - giftNamingIcon.setVisibility(View.VISIBLE); - root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_11); - }else{ - giftNamingIcon.setVisibility(View.GONE); - root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_3); - } + giftNamingIcon.setVisibility(View.VISIBLE); + root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_11); //root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_3); findViewById(R.id.naming_icon).setVisibility(View.GONE); } diff --git a/live/src/main/res/layout/item_frame_gift.xml b/live/src/main/res/layout/item_frame_gift.xml index 83e88d9bb..c8dc84f19 100644 --- a/live/src/main/res/layout/item_frame_gift.xml +++ b/live/src/main/res/layout/item_frame_gift.xml @@ -59,43 +59,52 @@ android:layout_gravity="end" android:layout_marginEnd="2dp" /> - + + + + + - - + diff --git a/live/src/main/res/layout/view_live_gift.xml b/live/src/main/res/layout/view_live_gift.xml index cce934847..68a6f55e7 100644 --- a/live/src/main/res/layout/view_live_gift.xml +++ b/live/src/main/res/layout/view_live_gift.xml @@ -115,6 +115,7 @@ android:layout_width="56dp" android:layout_height="15dp" android:layout_gravity="bottom" + android:visibility="gone" android:layout_marginStart="11dp" android:background="@drawable/background_naming_icon" android:gravity="center" diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 63412cec3..85d467f17 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -1212,8 +1212,7 @@ android:layout_height="51dp" android:translationX="500dp" android:visibility="invisible" - tools:translationX="0dp" - tools:visibility="visible"> + tools:translationX="0dp">