Merge remote-tracking branch 'origin/dev_680_礼物展馆' into dev_680_礼物展馆
# Conflicts: # common/src/main/java/com/yunbao/common/http/PDLiveApi.java # common/src/main/res/values-zh/strings.xml # common/src/main/res/values/strings.xml
@ -8,12 +8,10 @@ import android.os.Looper;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.yunbao.common.BuildConfig;
|
|
||||||
import com.yunbao.common.bean.CrashSaveBean;
|
import com.yunbao.common.bean.CrashSaveBean;
|
||||||
import com.yunbao.common.utils.AppManager;
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.FileUtil;
|
import com.yunbao.common.utils.FileUtil;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
@ -0,0 +1,84 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.UserMedalListModel;
|
||||||
|
import com.yunbao.common.bean.UserMedalListModel;
|
||||||
|
import com.yunbao.common.event.GiftNumberEvent;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.views.GiftNumber;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class GiftWallAchieveAdapter extends RecyclerView.Adapter {
|
||||||
|
private List<UserMedalListModel> giftQuantityModels;
|
||||||
|
private Context mContext;
|
||||||
|
private OnItemClickListener onItemClickListener;
|
||||||
|
|
||||||
|
public GiftWallAchieveAdapter(List<UserMedalListModel> giftQuantityModels, Context context) {
|
||||||
|
this.giftQuantityModels = giftQuantityModels;
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View robotSayHelloView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_gift_wall_achieve_item, parent, false);
|
||||||
|
return new GiftWallAchieveViewHolder(robotSayHelloView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
GiftWallAchieveViewHolder giftWallAchieveViewHolder = (GiftWallAchieveViewHolder) holder;
|
||||||
|
giftWallAchieveViewHolder.showData(giftQuantityModels.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
|
||||||
|
this.onItemClickListener = onItemClickListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return giftQuantityModels.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
class GiftWallAchieveViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView achieveName;
|
||||||
|
private ImageView achieveImg;
|
||||||
|
|
||||||
|
public GiftWallAchieveViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if(onItemClickListener!=null){
|
||||||
|
onItemClickListener.onItemClick(getAdapterPosition());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
achieveName = itemView.findViewById(R.id.achieveName);
|
||||||
|
achieveImg = itemView.findViewById(R.id.achieve_img);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showData(UserMedalListModel quantityModel) {
|
||||||
|
achieveName.setText(quantityModel.getDressName());
|
||||||
|
ImgLoader.display(mContext,quantityModel.getDisplaySrc(),achieveImg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnItemClickListener {
|
||||||
|
void onItemClick(int position);
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,9 @@
|
|||||||
package com.yunbao.common.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.stx.xhb.androidx.entity.BaseBannerInfo;
|
||||||
|
|
||||||
public class UserMedalModel extends BaseModel {
|
public class UserMedalModel extends BaseModel implements BaseBannerInfo {
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private String id;
|
private String id;
|
||||||
@SerializedName("display_src")
|
@SerializedName("display_src")
|
||||||
@ -13,9 +14,22 @@ public class UserMedalModel extends BaseModel {
|
|||||||
private String dressDescription;
|
private String dressDescription;
|
||||||
@SerializedName("sort")
|
@SerializedName("sort")
|
||||||
private String sort;
|
private String sort;
|
||||||
|
@SerializedName("use_status")
|
||||||
|
private String use_status;
|
||||||
@SerializedName("dress_status")
|
@SerializedName("dress_status")
|
||||||
private String dressStatus;
|
private String dressStatus;
|
||||||
|
|
||||||
|
@SerializedName("users_dress_id")
|
||||||
|
private String users_dress_id;
|
||||||
|
|
||||||
|
public String getUsersDressId() {
|
||||||
|
return users_dress_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUseStatus() {
|
||||||
|
return use_status;
|
||||||
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -69,4 +83,14 @@ public class UserMedalModel extends BaseModel {
|
|||||||
this.dressStatus = dressStatus;
|
this.dressStatus = dressStatus;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getXBannerUrl() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getXBannerTitle() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -6,6 +6,7 @@ import androidx.core.view.ViewCompat;
|
|||||||
|
|
||||||
import com.stx.xhb.androidx.transformers.BasePageTransformer;
|
import com.stx.xhb.androidx.transformers.BasePageTransformer;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.utils.L;
|
||||||
|
|
||||||
public class LiveGuardScalePageTransformer extends BasePageTransformer {
|
public class LiveGuardScalePageTransformer extends BasePageTransformer {
|
||||||
/**
|
/**
|
||||||
@ -39,6 +40,7 @@ public class LiveGuardScalePageTransformer extends BasePageTransformer {
|
|||||||
view.setTranslationX(horzMargin - vertMargin / 2);
|
view.setTranslationX(horzMargin - vertMargin / 2);
|
||||||
view.setScaleX(scale);
|
view.setScaleX(scale);
|
||||||
view.setScaleY( scale);
|
view.setScaleY( scale);
|
||||||
|
L.e("handleLeftPage scale:"+scale);
|
||||||
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,8 +51,8 @@ public class LiveGuardScalePageTransformer extends BasePageTransformer {
|
|||||||
float horzMargin = view.getWidth() * (1 - scale) / 2;
|
float horzMargin = view.getWidth() * (1 - scale) / 2;
|
||||||
view.setTranslationX( -horzMargin + vertMargin / 2);
|
view.setTranslationX( -horzMargin + vertMargin / 2);
|
||||||
view.setScaleX( scale);
|
view.setScaleX( scale);
|
||||||
|
|
||||||
view.setScaleY( scale);
|
view.setScaleY( scale);
|
||||||
|
L.e("handleRightPage scale:"+scale);
|
||||||
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,122 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
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.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 礼物墙-荣誉成就
|
||||||
|
*/
|
||||||
|
public class GiftWallAchieveDialog extends AbsDialogPopupWindow {
|
||||||
|
|
||||||
|
private ImageView mIvBg;
|
||||||
|
private ImageView mIvBack;
|
||||||
|
private TextView numCount;
|
||||||
|
private boolean isFullWindows;
|
||||||
|
private RecyclerView mRecyclerView;
|
||||||
|
private GiftWallAchieveAdapter giftWallAchieveAdapter;
|
||||||
|
private String toUid;
|
||||||
|
|
||||||
|
private List<UserMedalListModel> userMedalListModelList = new ArrayList<>();
|
||||||
|
|
||||||
|
public GiftWallAchieveDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftWallAchieveDialog setFullWindows(boolean fullWindows) {
|
||||||
|
isFullWindows = fullWindows;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftWallAchieveDialog setToUid(String toUid) {
|
||||||
|
this.toUid = toUid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int bindLayoutId() {
|
||||||
|
return R.layout.dialog_gift_wall_achieve;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getPopupHeight() {
|
||||||
|
if (isFullWindows) {
|
||||||
|
return super.getPopupHeight();
|
||||||
|
}
|
||||||
|
int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight();
|
||||||
|
return (int) (screenHeight * 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initView() {
|
||||||
|
mIvBg = findViewById(R.id.iv_root_bg);
|
||||||
|
mIvBack = findViewById(R.id.iv_back);
|
||||||
|
mRecyclerView = findViewById(R.id.recyclerView);
|
||||||
|
mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 3, GridLayoutManager.VERTICAL, false));
|
||||||
|
numCount = findViewById(R.id.numCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
} 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<MedalAchievementModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(MedalAchievementModel data) {
|
||||||
|
numCount.setText(data.getMedalLightNumber()+"/"+data.getMedalTotalNumber());
|
||||||
|
userMedalListModelList = data.getMedalData();
|
||||||
|
giftWallAchieveAdapter = new GiftWallAchieveAdapter(userMedalListModelList,mContext);
|
||||||
|
giftWallAchieveAdapter.setOnItemClickListener(new GiftWallAchieveAdapter.OnItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(int position) {
|
||||||
|
GiftWallAchieveWearDialog giftWallAchieveWearDialog = new GiftWallAchieveWearDialog(mContext,userMedalListModelList.get(position).getDressInfo());
|
||||||
|
giftWallAchieveWearDialog.showDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mRecyclerView.setAdapter(giftWallAchieveAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,177 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.stx.xhb.androidx.XBanner;
|
||||||
|
import com.stx.xhb.androidx.transformers.Transformer;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.UserMedalModel;
|
||||||
|
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.ScreenDimenUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 礼物墙-荣誉成就
|
||||||
|
*/
|
||||||
|
public class GiftWallAchieveWearDialog extends AbsDialogPopupWindow {
|
||||||
|
|
||||||
|
private ImageView mIvBg;
|
||||||
|
private ImageView mIvBack;
|
||||||
|
private boolean isFullWindows;
|
||||||
|
private String toUid;
|
||||||
|
private XBanner xBanner;
|
||||||
|
private TextView textAchieveName;
|
||||||
|
private TextView textAchieveHint;
|
||||||
|
private TextView btnConfirm;
|
||||||
|
private int selectPosition = 0;
|
||||||
|
|
||||||
|
String putOn = WordUtil.isNewZh() ? "佩戴" : "wearing";
|
||||||
|
String wearing = WordUtil.isNewZh() ? "已佩戴" : "worn";
|
||||||
|
private List<UserMedalModel> achieveWearModels = new ArrayList<>();
|
||||||
|
|
||||||
|
public GiftWallAchieveWearDialog(@NonNull Context context, List<UserMedalModel> achieveWearModels) {
|
||||||
|
super(context);
|
||||||
|
this.achieveWearModels = achieveWearModels;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftWallAchieveWearDialog setFullWindows(boolean fullWindows) {
|
||||||
|
isFullWindows = fullWindows;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftWallAchieveWearDialog setToUid(String toUid) {
|
||||||
|
this.toUid = toUid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int bindLayoutId() {
|
||||||
|
return R.layout.dialog_gift_wall_achieve_wear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getPopupHeight() {
|
||||||
|
if (isFullWindows) {
|
||||||
|
return super.getPopupHeight();
|
||||||
|
}
|
||||||
|
return ScreenDimenUtil.getInstance().getScreenHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
void initView() {
|
||||||
|
mIvBg = findViewById(R.id.iv_root_bg);
|
||||||
|
mIvBack = findViewById(R.id.iv_back);
|
||||||
|
xBanner = findViewById(R.id.gift_wall_achieve_banner);
|
||||||
|
textAchieveName = findViewById(R.id.text_achieve_name);
|
||||||
|
textAchieveHint = findViewById(R.id.text_achieve_hint);
|
||||||
|
btnConfirm = findViewById(R.id.btn_confirm);
|
||||||
|
findViewById(R.id.btn_cancel).setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
btnConfirm.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (achieveWearModels.get(selectPosition).getUseStatus().equals("2") && achieveWearModels.get(selectPosition).getDressStatus().equals("2")) {
|
||||||
|
LiveNetManager.get(mContext).userUseDress("3", achieveWearModels.get(selectPosition).getUsersDressId(), new HttpCallback<BaseModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseModel data) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
} else {
|
||||||
|
params.width=DpUtil.dp2px(1);
|
||||||
|
mIvBack.setVisibility(View.INVISIBLE);
|
||||||
|
mIvBg.setScaleType(ImageView.ScaleType.FIT_XY);
|
||||||
|
}
|
||||||
|
mIvBack.setLayoutParams(params);*/
|
||||||
|
initData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWearInfo() {
|
||||||
|
textAchieveName.setText(achieveWearModels.get(selectPosition).getDressName());
|
||||||
|
textAchieveHint.setText(achieveWearModels.get(selectPosition).getDressDescription());
|
||||||
|
btnConfirm.setText(achieveWearModels.get(selectPosition).getUseStatus().equals("2") ? wearing : putOn);
|
||||||
|
if (achieveWearModels.get(selectPosition).getUseStatus().equals("2") && achieveWearModels.get(selectPosition).getDressStatus().equals("2")) {
|
||||||
|
btnConfirm.setBackground(getResources().getDrawable(R.drawable.gift_wall_achieve_wear_sure));
|
||||||
|
} else {
|
||||||
|
btnConfirm.setBackground(getResources().getDrawable(R.drawable.gift_wall_achieve_wear_disable));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initData() {
|
||||||
|
setWearInfo();
|
||||||
|
|
||||||
|
xBanner.setBannerData(R.layout.dialog_gift_wall_achieve_wear_item, achieveWearModels);
|
||||||
|
//xBanner.setCustomPageTransformer(new LiveGifWallAchieveWearTransformer());
|
||||||
|
xBanner.setIsClipChildrenMode(true);
|
||||||
|
xBanner.setPageTransformer(Transformer.Scale);
|
||||||
|
xBanner.getViewPager().setOffscreenPageLimit(3);
|
||||||
|
xBanner.loadImage(new XBanner.XBannerAdapter() {
|
||||||
|
@Override
|
||||||
|
public void loadBanner(XBanner banner, Object model, View view, int position) {
|
||||||
|
UserMedalModel guardBannerModel = ((UserMedalModel) model);
|
||||||
|
ImageView wearImg = view.findViewById(R.id.wearImg);
|
||||||
|
ImageView notUnlocked = view.findViewById(R.id.notUnlocked);
|
||||||
|
ImgLoader.display(getContext(), guardBannerModel.getDisplaySrc(), wearImg);
|
||||||
|
notUnlocked.setVisibility(guardBannerModel.getDressStatus().equals("1") ? VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
xBanner.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int i, float v, int i1) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int i) {
|
||||||
|
selectPosition = i;
|
||||||
|
setWearInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageScrollStateChanged(int i) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -156,7 +156,12 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
|
|||||||
mTvTab2.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
|
mTvTab2.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
|
||||||
mViewPager.setCurrentItem(1, false);
|
mViewPager.setCurrentItem(1, false);
|
||||||
});
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(mAchievement, () -> {
|
||||||
|
new GiftWallAchieveDialog(mContext).setFullWindows(false).setToUid("98889").showDialog();
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(mIvTips, () -> {
|
||||||
|
new GiftWallRuleDialog(mContext).setFullWindows(false).showDialog();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -0,0 +1,97 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
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.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 礼物墙-規則
|
||||||
|
*/
|
||||||
|
public class GiftWallRuleDialog extends AbsDialogPopupWindow {
|
||||||
|
|
||||||
|
private ImageView mIvBg;
|
||||||
|
private ImageView mIvBack;
|
||||||
|
private ImageView iv_rule;
|
||||||
|
private boolean isFullWindows;
|
||||||
|
public GiftWallRuleDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftWallRuleDialog setFullWindows(boolean fullWindows) {
|
||||||
|
isFullWindows = fullWindows;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int bindLayoutId() {
|
||||||
|
return R.layout.dialog_gift_wall_rule;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getPopupHeight() {
|
||||||
|
if (isFullWindows) {
|
||||||
|
return super.getPopupHeight();
|
||||||
|
}
|
||||||
|
int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight();
|
||||||
|
return (int) (screenHeight * 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initView() {
|
||||||
|
mIvBg = findViewById(R.id.iv_root_bg);
|
||||||
|
mIvBack = findViewById(R.id.iv_back);
|
||||||
|
iv_rule= findViewById(R.id.iv_rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
} 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) {
|
||||||
|
iv_rule.setImageDrawable(drawable);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadFailed() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -1269,6 +1269,14 @@ public interface PDLiveApi {
|
|||||||
@Query("type")String type
|
@Query("type")String type
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@GET("/api/public/?service=Gift.getGiftHallMedalList")
|
||||||
|
Observable<ResponseModel<MedalAchievementModel>> getGiftHallMedalList(@Query("to_uid") String liveUid,@Query("type")String type);
|
||||||
|
|
||||||
|
@GET("/api/public/?service=Dress.userUseDress")
|
||||||
|
Observable<ResponseModel<BaseModel>> userUseDress(@Query("dress_type") String dress_type,@Query("users_dress_id")String users_dress_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人展馆
|
* 个人展馆
|
||||||
*/
|
*/
|
||||||
|
@ -3477,6 +3477,51 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getGiftHallMedalList(String toUid,String type, HttpCallback<MedalAchievementModel> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getGiftHallMedalList(toUid,type)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<MedalAchievementModel> listResponseModel) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(mContext.getString(R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void userUseDress(String dressType,String usersDressId, HttpCallback<BaseModel> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.userUseDress(dressType,usersDressId)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<BaseModel>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<BaseModel> listResponseModel) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(mContext.getString(R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
private MultipartBody.Part createUploadFile(File file) {
|
private MultipartBody.Part createUploadFile(File file) {
|
||||||
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||||
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
||||||
|
@ -26,7 +26,7 @@ public class HwBuilder {
|
|||||||
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
invite.getClass().getMethod("pay", String.class).invoke(invite, changeid);
|
invite.getClass().getMethod("pay", String.class).invoke(invite, changeid);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ public class HwBuilder {
|
|||||||
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
invite.getClass().getMethod("consume").invoke(invite);
|
invite.getClass().getMethod("consume").invoke(invite);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,13 +49,13 @@ public class HwBuilder {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public JSONObject getPayResult(Intent intent) {
|
public JSONObject getPayResult(Intent intent) {
|
||||||
JSONObject object;
|
JSONObject object = null;
|
||||||
try {
|
try {
|
||||||
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_huawei.utils.HuaWeiPayManage");
|
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_huawei.utils.HuaWeiPayManage");
|
||||||
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
object = (JSONObject) invite.getClass().getMethod("getPayResult", Intent.class).invoke(invite, intent);
|
object = (JSONObject) invite.getClass().getMethod("getPayResult", Intent.class).invoke(invite, intent);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class GoogleUtils {
|
|||||||
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
flag = (boolean) googlePay.getClass().getMethod("getGoogleService").invoke(googlePay);
|
flag = (boolean) googlePay.getClass().getMethod("getGoogleService").invoke(googlePay);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
@ -87,13 +87,13 @@ public class GoogleUtils {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public JSONObject getLoginResult(Intent intent) {
|
public JSONObject getLoginResult(Intent intent) {
|
||||||
JSONObject object;
|
JSONObject object = null;
|
||||||
try {
|
try {
|
||||||
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleManage");
|
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleManage");
|
||||||
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
object = (JSONObject) invite.getClass().getMethod("getLoginResult", Intent.class).invoke(invite, intent);
|
object = (JSONObject) invite.getClass().getMethod("getLoginResult", Intent.class).invoke(invite, intent);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
@ -108,7 +108,7 @@ public class GoogleUtils {
|
|||||||
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
googlePay.getClass().getMethod("initGooglePay").invoke(googlePay);
|
googlePay.getClass().getMethod("initGooglePay").invoke(googlePay);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +120,10 @@ public class GoogleUtils {
|
|||||||
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
Object invite = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
adId = (String) invite.getClass().getMethod("getAdid").invoke(googlePay);
|
adId = (String) invite.getClass().getMethod("getAdid").invoke(googlePay);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
|
return "";
|
||||||
|
|
||||||
|
/*throw new RuntimeException(e);*/
|
||||||
}
|
}
|
||||||
return adId;
|
return adId;
|
||||||
}
|
}
|
||||||
@ -132,7 +135,7 @@ public class GoogleUtils {
|
|||||||
try {
|
try {
|
||||||
googlePay.getClass().getMethod("checkSku", String.class).invoke(googlePay, skuId);
|
googlePay.getClass().getMethod("checkSku", String.class).invoke(googlePay, skuId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +150,7 @@ public class GoogleUtils {
|
|||||||
try {
|
try {
|
||||||
googlePay.getClass().getMethod("initResultCode").invoke(googlePay);
|
googlePay.getClass().getMethod("initResultCode").invoke(googlePay);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
timer = new Timer();
|
timer = new Timer();
|
||||||
@ -170,7 +173,7 @@ public class GoogleUtils {
|
|||||||
billingListener.onPayFailed(mActivity.getString(R.string.pay_fail));
|
billingListener.onPayFailed(mActivity.getString(R.string.pay_fail));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -183,7 +186,7 @@ public class GoogleUtils {
|
|||||||
Object invite = clz.getConstructor(Context.class).newInstance(context);
|
Object invite = clz.getConstructor(Context.class).newInstance(context);
|
||||||
invite.getClass().getMethod("initializeApp").invoke(invite);
|
invite.getClass().getMethod("initializeApp").invoke(invite);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +204,7 @@ public class GoogleUtils {
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -214,7 +217,7 @@ public class GoogleUtils {
|
|||||||
googlePay = clz.getConstructor(Activity.class).newInstance(activity);
|
googlePay = clz.getConstructor(Activity.class).newInstance(activity);
|
||||||
googlePay.getClass().getMethod("initToken").invoke(googlePay);
|
googlePay.getClass().getMethod("initToken").invoke(googlePay);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +227,7 @@ public class GoogleUtils {
|
|||||||
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||||
googlePay.getClass().getMethod("consumeAll").invoke(googlePay);
|
googlePay.getClass().getMethod("consumeAll").invoke(googlePay);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +240,7 @@ public class GoogleUtils {
|
|||||||
.getMethod("setFirebaseCrashData", String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class)
|
.getMethod("setFirebaseCrashData", String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class)
|
||||||
.invoke(googlePay, uid, userData, isGoogle, cpu, runTime, enterRoom, slidingRoom, playSvga, ActivitySize);
|
.invoke(googlePay, uid, userData, isGoogle, cpu, runTime, enterRoom, slidingRoom, playSvga, ActivitySize);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +258,7 @@ public class GoogleUtils {
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="20dp"/>
|
||||||
|
<solid android:color="#7776B1"/>
|
||||||
|
</shape>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="20dp"/>
|
||||||
|
<solid android:color="#FEE2BC"/>
|
||||||
|
</shape>
|
82
common/src/main/res/layout/dialog_gift_wall_achieve.xml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/rootView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_root_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_achieve" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:text="@string/gift_wall_achieve_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_height="60dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/topLayout"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_below="@+id/iv_back"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:background="@mipmap/dialog_gift_wall_achieve_top_bg"
|
||||||
|
android:layout_height="48dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_achieve_top_icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/numCount"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
|
android:text="0/1"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:textColor="#FDE9D8"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:text="@string/wall_honor"
|
||||||
|
android:textColor="#E0E0E0"
|
||||||
|
android:textSize="12dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:src="@mipmap/dialog_gift_wall_more"
|
||||||
|
android:layout_marginRight="7dp"
|
||||||
|
android:layout_width="13dp"
|
||||||
|
android:layout_height="13dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_below="@+id/topLayout"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
99
common/src/main/res/layout/dialog_gift_wall_achieve_wear.xml
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="264dp"
|
||||||
|
android:layout_height="240dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:background="@mipmap/dialog_gift_wall_achieve_wear_bg">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/btn_cancel"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_achieve_wear_cancel" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:letterSpacing="0.1"
|
||||||
|
android:text="@string/achievement_details"
|
||||||
|
android:textSize="16dp"
|
||||||
|
app:gradient_angle="45"
|
||||||
|
app:gradient_endColor="#FEE8C6"
|
||||||
|
app:gradient_startColor="#FFD5A3" />
|
||||||
|
|
||||||
|
<com.stx.xhb.androidx.XBanner
|
||||||
|
android:id="@+id/gift_wall_achieve_banner"
|
||||||
|
android:layout_width="264dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_marginTop="63dp"
|
||||||
|
app:clipChildrenLeftMargin="100dp"
|
||||||
|
app:clipChildrenRightMargin="100dp"
|
||||||
|
app:isAutoPlay="false"
|
||||||
|
app:isClipChildrenMode="true"
|
||||||
|
app:isClipChildrenModeLessThree="true"
|
||||||
|
app:isHandLoop="false"
|
||||||
|
app:isShowIndicatorOnlyOne="true"
|
||||||
|
app:isShowNumberIndicator="false"
|
||||||
|
app:pageChangeDuration="800"
|
||||||
|
app:pointsVisibility="false"
|
||||||
|
app:showIndicatorInCenter="false"
|
||||||
|
app:viewpagerMargin="20dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_achieve_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/gift_wall_achieve_banner"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:text="成就名稱"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_achieve_hint"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/text_achieve_name"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginLeft="30dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginRight="30dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="達成要求達成要求達成要求達成要求達成要求達成要求"
|
||||||
|
android:textColor="#C7C7C7"
|
||||||
|
android:textSize="8sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_confirm"
|
||||||
|
android:layout_width="78dp"
|
||||||
|
android:layout_height="29dp"
|
||||||
|
android:layout_below="@+id/text_achieve_hint"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:background="@drawable/gift_wall_achieve_wear_disable"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/gift_wall_achieve_put_on"
|
||||||
|
android:textColor="#2D1F46"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/bg"
|
||||||
|
android:layout_width="57dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_achieve_wear_item_bg" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/wearImg"
|
||||||
|
android:layout_width="57dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_achieve_wear_item_bg" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/notUnlocked"
|
||||||
|
android:layout_width="57dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_achieve_wear_item_unlock" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
45
common/src/main/res/layout/dialog_gift_wall_rule.xml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/rootView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_root_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_achieve" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:src="@mipmap/dialog_gift_wall_back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:text="@string/regular_bubble"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_height="60dp" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_below="@+id/iv_back"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_rule"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
</RelativeLayout>
|
23
common/src/main/res/layout/view_gift_wall_achieve_item.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_height="110dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/achieve_img"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="90dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/achieveName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="26dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
After Width: | Height: | Size: 19 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/dialog_gift_wall_achieve.png
Normal file
After Width: | Height: | Size: 488 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 485 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 7.0 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/dialog_gift_wall_back.png
Normal file
After Width: | Height: | Size: 824 B |
BIN
common/src/main/res/mipmap-xxhdpi/dialog_gift_wall_more.png
Normal file
After Width: | Height: | Size: 871 B |
@ -1501,4 +1501,6 @@
|
|||||||
<string name="main_type_theater">短劇</string>
|
<string name="main_type_theater">短劇</string>
|
||||||
<string name="prank_complete">完成*1</string>
|
<string name="prank_complete">完成*1</string>
|
||||||
<string name="pking_over">主播正在PK,稍後再試</string>
|
<string name="pking_over">主播正在PK,稍後再試</string>
|
||||||
|
<string name="gift_wall_achieve_put_on">佩戴</string>
|
||||||
|
<string name="gift_wall_achieve_title">榮譽成就</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1500,4 +1500,6 @@
|
|||||||
<string name="main_type_theater">短劇</string>
|
<string name="main_type_theater">短劇</string>
|
||||||
<string name="prank_complete">完成*1</string>
|
<string name="prank_complete">完成*1</string>
|
||||||
<string name="pking_over">主播正在PK,稍後再試</string>
|
<string name="pking_over">主播正在PK,稍後再試</string>
|
||||||
|
<string name="gift_wall_achieve_put_on">佩戴</string>
|
||||||
|
<string name="gift_wall_achieve_title">榮譽成就</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1501,6 +1501,8 @@
|
|||||||
<string name="dialog_gift_wall_text_personal_hal">個人展館</string>
|
<string name="dialog_gift_wall_text_personal_hal">個人展館</string>
|
||||||
<string name="dialog_gift_wall_text_site_hal">全站展館</string>
|
<string name="dialog_gift_wall_text_site_hal">全站展館</string>
|
||||||
<string name="dialog_gift_wall_text_honors">榮譽成就</string>
|
<string name="dialog_gift_wall_text_honors">榮譽成就</string>
|
||||||
|
<string name="gift_wall_achieve_put_on">佩戴</string>
|
||||||
|
<string name="gift_wall_achieve_title">榮譽成就</string>
|
||||||
<string name="dialog_gift_wall_list_spinner_all">全部</string>
|
<string name="dialog_gift_wall_list_spinner_all">全部</string>
|
||||||
<string name="dialog_gift_wall_list_spinner_up">已點亮</string>
|
<string name="dialog_gift_wall_list_spinner_up">已點亮</string>
|
||||||
<string name="dialog_gift_wall_list_spinner_down">未點亮</string>
|
<string name="dialog_gift_wall_list_spinner_down">未點亮</string>
|
||||||
|
@ -1509,6 +1509,8 @@
|
|||||||
<string name="dialog_gift_wall_text_personal_hal">Personal hal</string>
|
<string name="dialog_gift_wall_text_personal_hal">Personal hal</string>
|
||||||
<string name="dialog_gift_wall_text_site_hal">Whole site hal</string>
|
<string name="dialog_gift_wall_text_site_hal">Whole site hal</string>
|
||||||
<string name="dialog_gift_wall_text_honors">Honors</string>
|
<string name="dialog_gift_wall_text_honors">Honors</string>
|
||||||
|
<string name="gift_wall_achieve_put_on">Put on</string>
|
||||||
|
<string name="gift_wall_achieve_title">Honors</string>
|
||||||
<string name="dialog_gift_wall_list_spinner_all">All</string>
|
<string name="dialog_gift_wall_list_spinner_all">All</string>
|
||||||
<string name="dialog_gift_wall_list_spinner_up">Lit up</string>
|
<string name="dialog_gift_wall_list_spinner_up">Lit up</string>
|
||||||
<string name="dialog_gift_wall_list_spinner_down">Not Lit</string>
|
<string name="dialog_gift_wall_list_spinner_down">Not Lit</string>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#Thu Feb 04 00:05:45 CST 2021
|
#Thu Feb 04 00:05:45 CST 2021
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=true
|
||||||
|
|
||||||
@ -23,8 +23,6 @@ android.enableJetifier=true
|
|||||||
|
|
||||||
systemProp.http.proxyHost=127.0.0.1
|
systemProp.http.proxyHost=127.0.0.1
|
||||||
systemProp.https.proxyHost=127.0.0.1
|
systemProp.https.proxyHost=127.0.0.1
|
||||||
systemProp.https.proxyPort=7890
|
systemProp.https.proxyPort=10809
|
||||||
systemProp.http.proxyPort=7890
|
systemProp.http.proxyPort=10809
|
||||||
|
|
||||||
|
|
||||||
#android.enableR8.fullMode=true
|
#android.enableR8.fullMode=true
|
@ -243,7 +243,7 @@ public class SWManager extends BaseCacheManager {
|
|||||||
// 功能模块的类型为视频截图上传
|
// 功能模块的类型为视频截图上传
|
||||||
config.modules[0].type = ContentInspectConfig.CONTENT_INSPECT_TYPE_SUPERVISE;
|
config.modules[0].type = ContentInspectConfig.CONTENT_INSPECT_TYPE_SUPERVISE;
|
||||||
// 视频截图上传的频率为 2 秒一次
|
// 视频截图上传的频率为 2 秒一次
|
||||||
config.modules[0].interval = 2;
|
config.modules[0].interval = 20;
|
||||||
mRtcEngine.enableContentInspect(true, config);
|
mRtcEngine.enableContentInspect(true, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
|
|||||||
object.put("orderList", orderList);
|
object.put("orderList", orderList);
|
||||||
object.put("tradeNo", tradeNo);
|
object.put("tradeNo", tradeNo);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
@ -196,11 +196,12 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
|
|||||||
try {
|
try {
|
||||||
return AdvertisingIdClient.getAdvertisingIdInfo(mContext).getId();
|
return AdvertisingIdClient.getAdvertisingIdInfo(mContext).getId();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
|
return "";
|
||||||
} catch (GooglePlayServicesNotAvailableException e) {
|
} catch (GooglePlayServicesNotAvailableException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace(); return "";
|
||||||
} catch (GooglePlayServicesRepairableException e) {
|
} catch (GooglePlayServicesRepairableException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace(); return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +222,7 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
|
|||||||
object.put("resultToken", resultToken);
|
object.put("resultToken", resultToken);
|
||||||
object.put("resultOrderId", resultOrderId);
|
object.put("resultOrderId", resultOrderId);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ public class HuaWeiPayManage {
|
|||||||
object.put("inAppPurchaseData", purchaseResultInfo.getInAppPurchaseData());
|
object.put("inAppPurchaseData", purchaseResultInfo.getInAppPurchaseData());
|
||||||
object.put("inAppPurchaseDataSignature", purchaseResultInfo.getInAppDataSignature());
|
object.put("inAppPurchaseDataSignature", purchaseResultInfo.getInAppDataSignature());
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ public class LiveReceiveGiftBean extends BaseModel {
|
|||||||
private String msg;
|
private String msg;
|
||||||
private String msg_en;
|
private String msg_en;
|
||||||
private String guard_type;
|
private String guard_type;
|
||||||
|
private int user_naming_status;
|
||||||
private AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent;
|
private AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent;
|
||||||
private boolean showB;
|
private boolean showB;
|
||||||
|
|
||||||
@ -288,6 +289,14 @@ public class LiveReceiveGiftBean extends BaseModel {
|
|||||||
this.hot_num = hot_num;
|
this.hot_num = hot_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getUser_naming_status() {
|
||||||
|
return user_naming_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser_naming_status(int user_naming_status) {
|
||||||
|
this.user_naming_status = user_naming_status;
|
||||||
|
}
|
||||||
|
|
||||||
public String getUid() {
|
public String getUid() {
|
||||||
return uid;
|
return uid;
|
||||||
}
|
}
|
||||||
|
@ -1024,8 +1024,8 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showGifGift(bean);
|
showGifGift(bean);
|
||||||
|
showNormalGift(bean);
|
||||||
} else {
|
} else {
|
||||||
showNormalGift(bean);
|
showNormalGift(bean);
|
||||||
}
|
}
|
||||||
|
@ -1242,6 +1242,7 @@ public class SocketRyClient {
|
|||||||
receiveGiftBean.setNamingLiveName(map.getString("naming_live_name"));
|
receiveGiftBean.setNamingLiveName(map.getString("naming_live_name"));
|
||||||
receiveGiftBean.setNamingUid(map.getString("naming_uid"));
|
receiveGiftBean.setNamingUid(map.getString("naming_uid"));
|
||||||
receiveGiftBean.setNamingLiveuid(map.getString("naming_liveuid"));
|
receiveGiftBean.setNamingLiveuid(map.getString("naming_liveuid"));
|
||||||
|
receiveGiftBean.setUser_naming_status(map.getInteger("user_naming_status"));
|
||||||
receiveGiftBean.setmLiveUId(mLiveUid);
|
receiveGiftBean.setmLiveUId(mLiveUid);
|
||||||
receiveGiftBean.setmTypeBuyGuard(false);
|
receiveGiftBean.setmTypeBuyGuard(false);
|
||||||
receiveGiftBean.setAllServerNotify(false);
|
receiveGiftBean.setAllServerNotify(false);
|
||||||
|
@ -1142,6 +1142,7 @@ public class SocketSwClient {
|
|||||||
receiveGiftBean.setNamingLiveName(map.getString("naming_live_name"));
|
receiveGiftBean.setNamingLiveName(map.getString("naming_live_name"));
|
||||||
receiveGiftBean.setNamingUid(map.getString("naming_uid"));
|
receiveGiftBean.setNamingUid(map.getString("naming_uid"));
|
||||||
receiveGiftBean.setNamingLiveuid(map.getString("naming_liveuid"));
|
receiveGiftBean.setNamingLiveuid(map.getString("naming_liveuid"));
|
||||||
|
receiveGiftBean.setUser_naming_status(map.getInteger("user_naming_status"));
|
||||||
receiveGiftBean.setmLiveUId(mLiveUid);
|
receiveGiftBean.setmLiveUId(mLiveUid);
|
||||||
receiveGiftBean.setmTypeBuyGuard(false);
|
receiveGiftBean.setmTypeBuyGuard(false);
|
||||||
receiveGiftBean.setAllServerNotify(false);
|
receiveGiftBean.setAllServerNotify(false);
|
||||||
|
@ -19,6 +19,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.yunbao.common.utils.MobclickAgent;
|
import com.yunbao.common.utils.MobclickAgent;
|
||||||
import com.yunbao.common.bean.LiveGiftBean;
|
import com.yunbao.common.bean.LiveGiftBean;
|
||||||
import com.yunbao.common.event.LiveGiftDialogEvent;
|
import com.yunbao.common.event.LiveGiftDialogEvent;
|
||||||
@ -26,7 +27,9 @@ import com.yunbao.common.glide.ImgLoader;
|
|||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.GiftCacheUtil;
|
import com.yunbao.common.utils.GiftCacheUtil;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.MarqueeTextView;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||||
@ -41,6 +44,9 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
|||||||
private ScaleAnimation mAnimation;
|
private ScaleAnimation mAnimation;
|
||||||
private LinearLayout mLoadingLayout;
|
private LinearLayout mLoadingLayout;
|
||||||
private ImageView mLoading;
|
private ImageView mLoading;
|
||||||
|
private LinearLayout namingLayout;
|
||||||
|
private MarqueeTextView naming_name;
|
||||||
|
private RoundedImageView avatar;
|
||||||
|
|
||||||
public FrameGiftViewHolder(@NonNull View itemView) {
|
public FrameGiftViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
@ -54,6 +60,10 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
|||||||
mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout);
|
mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout);
|
||||||
mLoading = itemView.findViewById(R.id.gift_loading);
|
mLoading = itemView.findViewById(R.id.gift_loading);
|
||||||
|
|
||||||
|
namingLayout = itemView.findViewById(R.id.namingLayout);
|
||||||
|
naming_name = itemView.findViewById(R.id.naming_name);
|
||||||
|
avatar = itemView.findViewById(R.id.avatar);
|
||||||
|
|
||||||
mAnimation = new ScaleAnimation(0.9f, 1.1f, 0.9f, 1.1f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
|
mAnimation = new ScaleAnimation(0.9f, 1.1f, 0.9f, 1.1f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
|
||||||
mAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
|
mAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||||
mAnimation.setDuration(400);
|
mAnimation.setDuration(400);
|
||||||
@ -89,7 +99,8 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
|||||||
// } else {
|
// } else {
|
||||||
giftName.setText(model.getName());
|
giftName.setText(model.getName());
|
||||||
// }
|
// }
|
||||||
|
naming_name.setText(model.getNamingLiveName());
|
||||||
|
ImgLoader.display(mContext,model.getNamingLiveAvatar(),avatar);
|
||||||
//特殊礼物红包
|
//特殊礼物红包
|
||||||
if (model.getType() == 9999999) {
|
if (model.getType() == 9999999) {
|
||||||
mPayIco.setVisibility(View.GONE);
|
mPayIco.setVisibility(View.GONE);
|
||||||
@ -114,7 +125,11 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
|||||||
} else {
|
} else {
|
||||||
mLoadingLayout.setVisibility(GiftCacheUtil.checkGiftIsDownload(model.getId()) ? View.GONE : View.VISIBLE);
|
mLoadingLayout.setVisibility(GiftCacheUtil.checkGiftIsDownload(model.getId()) ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
if(model.isChecked()&& !StringUtil.isEmpty(model.getNamingLiveName())){
|
||||||
|
namingLayout.setVisibility(View.VISIBLE);
|
||||||
|
}else{
|
||||||
|
namingLayout.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
|||||||
private TextView mGiftCount;
|
private TextView mGiftCount;
|
||||||
private TextView mGiftGroupCount;
|
private TextView mGiftGroupCount;
|
||||||
private TextView mMulSign;//乘号
|
private TextView mMulSign;//乘号
|
||||||
|
private ImageView giftNamingIcon;
|
||||||
private int mDp214;
|
private int mDp214;
|
||||||
private ObjectAnimator mAnimator;
|
private ObjectAnimator mAnimator;
|
||||||
private Animation mAnimation;//礼物数字执行的放大动画
|
private Animation mAnimation;//礼物数字执行的放大动画
|
||||||
@ -73,6 +74,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
|||||||
mGiftCount = (TextView) findViewById(R.id.gift_count);
|
mGiftCount = (TextView) findViewById(R.id.gift_count);
|
||||||
mGiftGroupCount = (TextView) findViewById(R.id.gift_group_count);
|
mGiftGroupCount = (TextView) findViewById(R.id.gift_group_count);
|
||||||
mMulSign = (TextView) findViewById(R.id.mul_sign);
|
mMulSign = (TextView) findViewById(R.id.mul_sign);
|
||||||
|
giftNamingIcon = (ImageView) findViewById(R.id.gift_naming_icon);
|
||||||
mDp214 = DpUtil.dp2px(214);
|
mDp214 = DpUtil.dp2px(214);
|
||||||
mHandler = new Handler() {
|
mHandler = new Handler() {
|
||||||
@Override
|
@Override
|
||||||
@ -186,7 +188,14 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
|||||||
root_back.setBackgroundResource(R.drawable.background_naming);
|
root_back.setBackgroundResource(R.drawable.background_naming);
|
||||||
findViewById(R.id.naming_icon).setVisibility(View.VISIBLE);
|
findViewById(R.id.naming_icon).setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_3);
|
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);
|
||||||
|
}
|
||||||
|
//root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_3);
|
||||||
findViewById(R.id.naming_icon).setVisibility(View.GONE);
|
findViewById(R.id.naming_icon).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (lian && mGiftCount != null && mAnimation != null) {
|
if (lian && mGiftCount != null && mAnimation != null) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/gift_layout"
|
android:id="@+id/gift_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="87dp"
|
android:layout_height="87dp"
|
||||||
@ -11,7 +13,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -23,7 +24,6 @@
|
|||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp" />
|
android:layout_height="50dp" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/gift_name"
|
android:id="@+id/gift_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -58,6 +58,45 @@
|
|||||||
android:layout_height="11dp"
|
android:layout_height="11dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:layout_marginEnd="2dp" />
|
android:layout_marginEnd="2dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/namingLayout"
|
||||||
|
android:layout_width="70dp"
|
||||||
|
android:background="@mipmap/item_frame_gift_naming_bg"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:layout_marginBottom="27dp"
|
||||||
|
android:layout_gravity="center_horizontal|bottom">
|
||||||
|
|
||||||
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
|
android:id="@+id/avatar"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
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="20dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="2dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
|
android:scrollHorizontally="true"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="#FFFFFFFF"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/root"
|
android:id="@+id/root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
|
tools:visibility="visible"
|
||||||
android:visibility="invisible">
|
android:visibility="invisible">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@ -45,7 +47,7 @@
|
|||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginLeft="4dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
@ -119,4 +121,13 @@
|
|||||||
android:text="@string/the_title_financier2"
|
android:text="@string/the_title_financier2"
|
||||||
android:textColor="#DB7008"
|
android:textColor="#DB7008"
|
||||||
android:textSize="10sp" />
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:id="@+id/gift_naming_icon"
|
||||||
|
android:src="@mipmap/gift_naming_icon"
|
||||||
|
android:layout_width="27dp"
|
||||||
|
android:layout_height="12dp"/>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
BIN
live/src/main/res/mipmap-b+en+us/gift_naming_icon.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
live/src/main/res/mipmap-mdpi/gift_naming_icon.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
live/src/main/res/mipmap-mdpi/icon_live_gift_anim_11.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
live/src/main/res/mipmap-xhdpi/item_frame_gift_naming_bg.png
Normal file
After Width: | Height: | Size: 16 KiB |
@ -136,14 +136,14 @@ public class MyWalletActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -491,7 +491,7 @@ public class MyWalletActivity extends AbsActivity {
|
|||||||
|
|
||||||
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new RuntimeException(e);
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|