update 礼物墙
This commit is contained in:
@@ -98,7 +98,7 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter<GiftWa
|
||||
tv_rename = itemView.findViewById(R.id.tv_rename);
|
||||
avatar = itemView.findViewById(R.id.avatar);
|
||||
avatar2 = itemView.findViewById(R.id.avatar2);
|
||||
anchor_name = itemView.findViewById(R.id.anchor_name);
|
||||
anchor_name = itemView.findViewById(R.id.item_anchor_name);
|
||||
}
|
||||
|
||||
public void setData(GiftWallInfoBean.Data data, int position) {
|
||||
@@ -116,6 +116,7 @@ public class GiftWallGiftInfoListItemAdapter extends RecyclerView.Adapter<GiftWa
|
||||
}
|
||||
return;
|
||||
}
|
||||
anchor_name.setVisibility(View.GONE);
|
||||
if (isStar && list_type == 2) {
|
||||
ImgLoader.display(itemView.getContext(), data.getLive_avatar(), avatar);
|
||||
anchor_name.setText(data.getLive_user_name());
|
||||
|
||||
@@ -239,8 +239,8 @@ public class GiftWallInfoBean extends BaseModel {
|
||||
return gift_hall_send_num;
|
||||
}
|
||||
public String getGift_hall_send_numForString() {
|
||||
if(gift_hall_send_num>999999){
|
||||
return "999999+";
|
||||
if(gift_hall_send_num>99999){
|
||||
return "99999+";
|
||||
}else{
|
||||
return String.valueOf(gift_hall_send_num);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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<GiftWallInfoBean>() {
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user