6.5.4礼物栏优化
This commit is contained in:
@@ -91,6 +91,7 @@ import com.yunbao.live.bean.LiveChatBean;
|
||||
import com.yunbao.live.dialog.LiveFansFragment;
|
||||
import com.yunbao.live.dialog.LiveGameDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGiftPopup;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveInputDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveMicUserDialogFragment;
|
||||
@@ -443,18 +444,16 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
*/
|
||||
public void openGiftWindow() {
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setPkStatus(isPk);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.setOnDismissListener(dialog -> checkMsgRed());
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setPk(isPk)
|
||||
.setLiveGuardInfo(mLiveGuardInfo));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -462,16 +461,13 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setPkStatus(isPk);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, giftId);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.setOnDismissListener(dialog -> checkMsgRed());
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setPk(isPk)
|
||||
.setLiveGuardInfo(mLiveGuardInfo)
|
||||
.setmWishGiftId(giftId));
|
||||
}
|
||||
|
||||
public void openGiftWindow(String giftId, String for_by) {
|
||||
@@ -479,19 +475,15 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
return;
|
||||
}
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setPkStatus(isPk);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, giftId);
|
||||
if (for_by.equals("1")) {
|
||||
bundle.putString("by", "1");
|
||||
}
|
||||
fragment.setArguments(bundle);
|
||||
fragment.setOnDismissListener(dialog -> checkMsgRed());
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setPk(isPk)
|
||||
.setLiveGuardInfo(mLiveGuardInfo)
|
||||
.setmWishGiftId(giftId)
|
||||
.setUname("1"));//setUname==by
|
||||
});
|
||||
|
||||
}
|
||||
@@ -1023,18 +1015,29 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
break;
|
||||
|
||||
case GIFT_POPUP:
|
||||
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment liveGiftDialogFragment = new LiveGiftDialogFragment();
|
||||
liveGiftDialogFragment.setPkStatus(isPk);
|
||||
liveGiftDialogFragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
liveGiftDialogFragment.setArguments(bundle);
|
||||
liveGiftDialogFragment.setOnDismissListener(dialog -> checkMsgRed());
|
||||
liveGiftDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
LiveGiftPopup liveGiftPopup = new LiveGiftPopup();
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("WishGiftId", event.getmWishGiftId());
|
||||
bundle.putBoolean("ContactGift", event.getIsContactGift());
|
||||
bundle.putParcelable("GuardInfo", event.getLiveGuardInfo());
|
||||
bundle.putBoolean("pk", event.isPk());
|
||||
liveGiftPopup.setArguments(bundle);
|
||||
liveGiftPopup.show(getSupportFragmentManager(), "LiveGiftPopup");
|
||||
// new XPopup.Builder(mContext)
|
||||
// .asCustom(new LiveGiftPopup(mContext, this))
|
||||
// .show();
|
||||
// if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
// return;
|
||||
// }
|
||||
// LiveGiftDialogFragment liveGiftDialogFragment = new LiveGiftDialogFragment();
|
||||
// liveGiftDialogFragment.setPkStatus(isPk);
|
||||
// liveGiftDialogFragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
// bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
// bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
// liveGiftDialogFragment.setArguments(bundle);
|
||||
// liveGiftDialogFragment.setOnDismissListener(dialog -> checkMsgRed());
|
||||
// liveGiftDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
break;
|
||||
case CURRENT_ACTIVITY:
|
||||
String type = event.getModel().getActiveId();
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.event.LiveGiftItemEvent;
|
||||
import com.yunbao.live.views.FrameGiftViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FrameGiftAdapter extends RecyclerView.Adapter {
|
||||
private List<LiveGiftBean> giftJson = new ArrayList<>();
|
||||
private int contextLayoutGiftHeight = 0;
|
||||
private String mStream, mLiveUid, wishGiftId;
|
||||
|
||||
public FrameGiftAdapter(int contextLayoutGiftHeight, List<LiveGiftBean> giftJson, String mStream, String mLiveUid, String wishGiftId) {
|
||||
this.contextLayoutGiftHeight = contextLayoutGiftHeight;
|
||||
this.giftJson = giftJson;
|
||||
this.mStream = mStream;
|
||||
this.mLiveUid = mLiveUid;
|
||||
this.wishGiftId = wishGiftId;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_frame_gift, parent, false);
|
||||
return new FrameGiftViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
|
||||
if (!TextUtils.isEmpty(wishGiftId) && TextUtils.equals(giftJson.get(position).getId() + "", wishGiftId)) {
|
||||
Bus.get().post(new LiveGiftItemEvent().setLiveGiftModel(giftJson.get(position)));
|
||||
}
|
||||
|
||||
FrameGiftViewHolder frameGiftViewHolder = (FrameGiftViewHolder) holder;
|
||||
frameGiftViewHolder.showData(contextLayoutGiftHeight, giftJson.get(position));
|
||||
frameGiftViewHolder.giftSelect(giftJson.get(position), position, mStream, mLiveUid, new FrameGiftViewHolder.FrameGiftClickListener() {
|
||||
@Override
|
||||
public void onCallBack(int position, LiveGiftBean model) {
|
||||
Bus.get().post(new LiveGiftItemEvent().setLiveGiftModel(model));
|
||||
wishGiftId = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void giftSelect(LiveGiftBean model) {
|
||||
for (int i = 0; i < giftJson.size(); i++) {
|
||||
giftJson.get(i).setChecked(giftJson.get(i).getId() == model.getId());
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return giftJson.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.GiftTopBean;
|
||||
import com.yunbao.live.views.GiftTitleViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class GiftTitleAdapter extends RecyclerView.Adapter {
|
||||
|
||||
List<GiftTopBean> name = new ArrayList<>();
|
||||
private int index = 0;
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_top_new, parent, false);
|
||||
return new GiftTitleViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
GiftTitleViewHolder itemViewHolder = (GiftTitleViewHolder) holder;
|
||||
itemViewHolder.showData(name.get(position), position, new GiftTitleViewHolder.ClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks(int mPosition) {
|
||||
index = mPosition;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
itemViewHolder.selectData(index == position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return name.size();
|
||||
}
|
||||
|
||||
public void addAllData(List<GiftTopBean> giftTopBeans) {
|
||||
name.clear();
|
||||
name.addAll(giftTopBeans);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void uncheck() {
|
||||
index = -1;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LiveGiftFragmentPagerAdapter extends FragmentPagerAdapter {
|
||||
|
||||
private List<Fragment> fragmentList;
|
||||
|
||||
|
||||
public LiveGiftFragmentPagerAdapter(FragmentManager fm, Context mContext, List<Fragment> fragmentList) {
|
||||
super(fm);
|
||||
|
||||
this.fragmentList = fragmentList;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return fragmentList.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fragmentList.size();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.event.LiveGiftItemEvent;
|
||||
import com.yunbao.live.views.LiveParcelItemViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveParcelItemAdapter extends RecyclerView.Adapter {
|
||||
private List<LiveGiftBean> giftJson = new ArrayList<>();
|
||||
private int contextLayoutGiftHeight = 0;
|
||||
private String mStream, mLiveUid;
|
||||
|
||||
public LiveParcelItemAdapter(int contextLayoutGiftHeight, List<LiveGiftBean> giftJson, String mStream, String mLiveUid) {
|
||||
this.contextLayoutGiftHeight = contextLayoutGiftHeight;
|
||||
this.giftJson = giftJson;
|
||||
this.mStream = mStream;
|
||||
this.mLiveUid = mLiveUid;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_live_parcel, parent, false);
|
||||
return new LiveParcelItemViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
LiveParcelItemViewHolder frameGiftViewHolder = (LiveParcelItemViewHolder) holder;
|
||||
frameGiftViewHolder.showData(contextLayoutGiftHeight, giftJson.get(position));
|
||||
frameGiftViewHolder.giftSelect(giftJson.get(position), position, mStream, mLiveUid, new LiveParcelItemViewHolder.FrameGiftClickListener() {
|
||||
@Override
|
||||
public void onCallBack(int position, LiveGiftBean model) {
|
||||
Bus.get().post(new LiveGiftItemEvent().setLiveGiftModel(model));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void giftSelect(LiveGiftBean model) {
|
||||
for (int i = 0; i < giftJson.size(); i++) {
|
||||
giftJson.get(i).setChecked(giftJson.get(i).getId() == model.getId());
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void refreshWrapListAfterSend(LiveGiftBean model) {
|
||||
for (int i = 0; i < giftJson.size(); i++) {
|
||||
if (giftJson.get(i).getId() == model.getId()) {
|
||||
|
||||
|
||||
String giftNum = giftJson.get(i).getGiftNum();
|
||||
int number = 0;
|
||||
try {
|
||||
number = Integer.parseInt(giftNum);
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
number = 0;
|
||||
}
|
||||
if (number == 1) {
|
||||
|
||||
giftJson.remove(i);
|
||||
} else {
|
||||
giftJson.get(i).setGiftNum(String.valueOf(number - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return giftJson.size();
|
||||
}
|
||||
}
|
||||
115
live/src/main/java/com/yunbao/live/bean/CoinModel.java
Normal file
115
live/src/main/java/com/yunbao/live/bean/CoinModel.java
Normal file
@@ -0,0 +1,115 @@
|
||||
package com.yunbao.live.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class CoinModel extends BaseModel {
|
||||
//钻石余额
|
||||
@SerializedName("coin")
|
||||
private String coin;
|
||||
//金豆余额
|
||||
@SerializedName("gold")
|
||||
private String gold;
|
||||
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
//平台最大等级
|
||||
@SerializedName("user_level_max")
|
||||
private String userLevelMax;
|
||||
//当前用户等级
|
||||
@SerializedName("user_level")
|
||||
private String userLevel;
|
||||
//升级下一级需要的经验
|
||||
@SerializedName("user_next_level_rewards")
|
||||
private String userNextLevelRewards;
|
||||
//当前已经获取到的经验值
|
||||
@SerializedName("user_level_current_consumption")
|
||||
private String userLevelCurrentConsumption;
|
||||
//升级需要的经验值(总的)
|
||||
@SerializedName("user_level_upgrades")
|
||||
private String userLevelUpgrades;
|
||||
//包裹红点
|
||||
@SerializedName("users_pack_red_dot")
|
||||
private String usersPackRedDot;
|
||||
|
||||
public String getCoin() {
|
||||
return coin;
|
||||
}
|
||||
|
||||
public CoinModel setCoin(String coin) {
|
||||
this.coin = coin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGold() {
|
||||
return gold;
|
||||
}
|
||||
|
||||
public CoinModel setGold(String gold) {
|
||||
this.gold = gold;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public CoinModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLevelMax() {
|
||||
return userLevelMax;
|
||||
}
|
||||
|
||||
public CoinModel setUserLevelMax(String userLevelMax) {
|
||||
this.userLevelMax = userLevelMax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLevel() {
|
||||
return userLevel;
|
||||
}
|
||||
|
||||
public CoinModel setUserLevel(String userLevel) {
|
||||
this.userLevel = userLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNextLevelRewards() {
|
||||
return userNextLevelRewards;
|
||||
}
|
||||
|
||||
public CoinModel setUserNextLevelRewards(String userNextLevelRewards) {
|
||||
this.userNextLevelRewards = userNextLevelRewards;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLevelCurrentConsumption() {
|
||||
return userLevelCurrentConsumption;
|
||||
}
|
||||
|
||||
public CoinModel setUserLevelCurrentConsumption(String userLevelCurrentConsumption) {
|
||||
this.userLevelCurrentConsumption = userLevelCurrentConsumption;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLevelUpgrades() {
|
||||
return userLevelUpgrades;
|
||||
}
|
||||
|
||||
public CoinModel setUserLevelUpgrades(String userLevelUpgrades) {
|
||||
this.userLevelUpgrades = userLevelUpgrades;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUsersPackRedDot() {
|
||||
return usersPackRedDot;
|
||||
}
|
||||
|
||||
public CoinModel setUsersPackRedDot(String usersPackRedDot) {
|
||||
this.usersPackRedDot = usersPackRedDot;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
1100
live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java
Normal file
1100
live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java
Normal file
File diff suppressed because it is too large
Load Diff
26
live/src/main/java/com/yunbao/live/event/GiftTitleEvent.java
Normal file
26
live/src/main/java/com/yunbao/live/event/GiftTitleEvent.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.yunbao.live.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class GiftTitleEvent extends BaseModel {
|
||||
private String giftTitle;
|
||||
private int mPosition;
|
||||
|
||||
public int getmPosition() {
|
||||
return mPosition;
|
||||
}
|
||||
|
||||
public GiftTitleEvent setmPosition(int mPosition) {
|
||||
this.mPosition = mPosition;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftTitle() {
|
||||
return giftTitle;
|
||||
}
|
||||
|
||||
public GiftTitleEvent setGiftTitle(String giftTitle) {
|
||||
this.giftTitle = giftTitle;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.bean.XydCompleteModel;
|
||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.bean.LivePKUserListBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.OpenParametersModel;
|
||||
@@ -49,6 +50,75 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
private RedPacketModel redPacketModel;
|
||||
private RedPacketInfoModel redPacketInfoModel;
|
||||
private OlineUserlistModel olineUserlistModel;
|
||||
private LiveGuardInfo liveGuardInfo;
|
||||
private String mWishGiftId;
|
||||
private boolean isContactGift;
|
||||
private boolean isPk;
|
||||
public String mStream;
|
||||
public String mLiveUid,giftId;
|
||||
|
||||
public String getGiftId() {
|
||||
return giftId;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setGiftId(String giftId) {
|
||||
this.giftId = giftId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getmStream() {
|
||||
return mStream;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setmStream(String mStream) {
|
||||
this.mStream = mStream;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getmLiveUid() {
|
||||
return mLiveUid;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setmLiveUid(String mLiveUid) {
|
||||
this.mLiveUid = mLiveUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isPk() {
|
||||
return isPk;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setPk(boolean pk) {
|
||||
isPk = pk;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getIsContactGift() {
|
||||
return isContactGift;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setIsContactGift(boolean isContactGift) {
|
||||
this.isContactGift = isContactGift;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getmWishGiftId() {
|
||||
return mWishGiftId;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setmWishGiftId(String mWishGiftId) {
|
||||
this.mWishGiftId = mWishGiftId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveGuardInfo getLiveGuardInfo() {
|
||||
return liveGuardInfo;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setLiveGuardInfo(LiveGuardInfo liveGuardInfo) {
|
||||
this.liveGuardInfo = liveGuardInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OlineUserlistModel getOlineUserlistModel() {
|
||||
return olineUserlistModel;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yunbao.live.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
|
||||
/**
|
||||
* 选中的礼物
|
||||
*/
|
||||
public class LiveGiftItemEvent extends BaseModel {
|
||||
private LiveGiftBean liveGiftModel;
|
||||
|
||||
public LiveGiftBean getLiveGiftModel() {
|
||||
return liveGiftModel;
|
||||
}
|
||||
|
||||
public LiveGiftItemEvent setLiveGiftModel(LiveGiftBean liveGiftModel) {
|
||||
this.liveGiftModel = liveGiftModel;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yunbao.live.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
|
||||
public class LiveParcelItemRefreshEvent extends BaseModel {
|
||||
private LiveGiftBean liveGiftModel;
|
||||
|
||||
public LiveGiftBean getLiveGiftModel() {
|
||||
return liveGiftModel;
|
||||
}
|
||||
|
||||
public LiveParcelItemRefreshEvent setLiveGiftModel(LiveGiftBean liveGiftModel) {
|
||||
this.liveGiftModel = liveGiftModel;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
@@ -46,6 +45,7 @@ import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.HtmlTagHandler;
|
||||
@@ -53,12 +53,11 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.custom.FrameImageView;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.utils.AllMsgTextRender;
|
||||
@@ -339,14 +338,12 @@ public class LiveGiftAnimPresenter {
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, blindBox.getEvent().getBlindBoxId() + "");
|
||||
bundle.putBoolean("isContactGift", true);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setmWishGiftId(blindBox.getEvent().getBlindBoxId() + "")
|
||||
.setIsContactGift(true));
|
||||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.animation.ScaleAnimation;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
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.bean.LiveGiftBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||
import com.yunbao.live.event.LiveGiftDialogEvent;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView giftIcon, mPayIco, cornerMark;
|
||||
private Context mContext;
|
||||
private TextView giftName, mPrice;
|
||||
private RelativeLayout giftLayout;
|
||||
private ScaleAnimation mAnimation;
|
||||
private LinearLayout mLoadingLayout;
|
||||
private ImageView mLoading;
|
||||
|
||||
public FrameGiftViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mContext = itemView.getContext();
|
||||
giftIcon = itemView.findViewById(R.id.gift_icon);
|
||||
giftName = itemView.findViewById(R.id.gift_name);
|
||||
mPayIco = itemView.findViewById(R.id.pay_ico);
|
||||
mPrice = itemView.findViewById(R.id.price);
|
||||
cornerMark = itemView.findViewById(R.id.corner_mark);
|
||||
giftLayout = itemView.findViewById(R.id.gift_layout);
|
||||
mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout);
|
||||
mLoading = itemView.findViewById(R.id.gift_loading);
|
||||
|
||||
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.setDuration(400);
|
||||
mAnimation.setRepeatMode(Animation.REVERSE);
|
||||
mAnimation.setRepeatCount(-1);
|
||||
}
|
||||
|
||||
public void showData(int contextLayoutGiftHeight, LiveGiftBean model) {
|
||||
//设置高度
|
||||
itemView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GridLayoutManager.LayoutParams linearParams = (GridLayoutManager.LayoutParams) itemView.getLayoutParams();
|
||||
linearParams.height = contextLayoutGiftHeight / 2;
|
||||
itemView.setLayoutParams(linearParams);
|
||||
}
|
||||
});
|
||||
giftLayout.setSelected(model.isChecked());
|
||||
if (model.isChecked()) {
|
||||
giftIcon.startAnimation(mAnimation);
|
||||
}
|
||||
ImgLoader.display(mContext, model.getIcon(), giftIcon);
|
||||
ImgLoader.display(mContext, model.getCornerMark(), cornerMark);
|
||||
giftName.setText(model.getName());
|
||||
//特殊礼物红包
|
||||
if (model.getType() == 9999999) {
|
||||
mPayIco.setVisibility(View.GONE);
|
||||
mPrice.setText(mContext.getString(R.string.build_up_popularity));
|
||||
mPrice.setTextColor(Color.parseColor("#db8c4a"));
|
||||
mPrice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 8);
|
||||
|
||||
} else {
|
||||
mPrice.setTextSize(TypedValue.COMPLEX_UNIT_SP, 11);
|
||||
mPrice.setTextColor(Color.parseColor("#c8c8c8"));
|
||||
mPayIco.setVisibility(View.VISIBLE);
|
||||
//普通礼物
|
||||
if (model.getSendType() != null && model.getSendType().equals("1")) {
|
||||
mPayIco.setImageResource(R.mipmap.gold_coin);
|
||||
} else {
|
||||
mPayIco.setImageResource(R.mipmap.diamond);
|
||||
}
|
||||
mPrice.setText(model.getPrice());
|
||||
}
|
||||
if (model.getSwf() != null && model.getSwf().isEmpty()) {
|
||||
mLoadingLayout.setVisibility(View.GONE);
|
||||
} else {
|
||||
mLoadingLayout.setVisibility(GiftCacheUtil.checkGiftIsDownload(model.getId()) ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void giftSelect(LiveGiftBean model, int position, String mStream, String mLiveUid, FrameGiftClickListener frameGiftClickListener) {
|
||||
ViewClicksAntiShake.clicksAntiShake(mLoadingLayout, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mLoading.setImageResource(R.mipmap.icon_loading_gift);
|
||||
Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.anim_loading_gift);
|
||||
animation.setRepeatMode(Animation.RESTART);
|
||||
animation.setRepeatCount(Animation.INFINITE);
|
||||
animation.setInterpolator(new LinearInterpolator());
|
||||
mLoading.startAnimation(animation);
|
||||
GiftCacheUtil.getInstance().pause();
|
||||
GiftCacheUtil.getInstance().downloadGiftForId(mContext, model, new CommonCallback<File>() {
|
||||
@Override
|
||||
public void callback(File bean) {
|
||||
if (bean == null) {
|
||||
ToastUtil.show(mContext.getString(R.string.load_failure_2));
|
||||
mLoading.setImageResource(R.mipmap.icon_download_gift);
|
||||
animation.setRepeatCount(0);
|
||||
animation.setDuration(0);
|
||||
animation.cancel();
|
||||
mLoading.setAnimation(animation);
|
||||
} else {
|
||||
mLoadingLayout.setVisibility(View.GONE);
|
||||
}
|
||||
GiftCacheUtil.getInstance().restart();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(giftLayout, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (model.getType() == 9999999) {
|
||||
Bus.get().post(new LiveGiftDialogEvent());
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new SendRendPacketPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
} else {
|
||||
if (frameGiftClickListener != null) {
|
||||
frameGiftClickListener.onCallBack(position, model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface FrameGiftClickListener {
|
||||
void onCallBack(int position, LiveGiftBean model);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.custom.DrawableTextView;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.GiftTopBean;
|
||||
import com.yunbao.live.event.GiftTitleEvent;
|
||||
|
||||
public class GiftTitleViewHolder extends RecyclerView.ViewHolder {
|
||||
private DrawableTextView name;
|
||||
|
||||
public GiftTitleViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
name = itemView.findViewById(R.id.name);
|
||||
}
|
||||
|
||||
public void showData(GiftTopBean giftTopBean, int mPosition, ClicksCallBack callBack) {
|
||||
name.setText(giftTopBean.getName());
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (callBack != null) {
|
||||
callBack.onViewClicks(mPosition);
|
||||
Bus.get().post(new GiftTitleEvent().setmPosition(mPosition).setGiftTitle(giftTopBean.getName()));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void selectData(boolean isSelect) {
|
||||
if (isSelect) {
|
||||
name.setAlpha(1.0f);
|
||||
name.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD);
|
||||
} else {
|
||||
name.setAlpha(0.5f);
|
||||
name.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
public interface ClicksCallBack {
|
||||
void onViewClicks(int mPosition);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Vibrator;
|
||||
import android.text.TextUtils;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -20,16 +19,12 @@ import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ViewFlipper;
|
||||
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
@@ -39,11 +34,10 @@ import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ProcessResultUtil;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.dialog.LiveGiftPopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
@@ -200,6 +194,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
ViewClicksAntiShake.clicksAntiShake(giftImage, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP));
|
||||
}
|
||||
@@ -382,6 +377,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
|
||||
} else if (i == R.id.btn_gift) {
|
||||
openGiftWindow();
|
||||
|
||||
//全屏
|
||||
} else if (i == R.id.btn_more) {
|
||||
((LiveActivity) mContext).openMoreWindow();
|
||||
|
||||
149
live/src/main/java/com/yunbao/live/views/LiveGiftFragment.java
Normal file
149
live/src/main/java/com/yunbao/live/views/LiveGiftFragment.java
Normal file
@@ -0,0 +1,149 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveGiftFragmentPagerAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 礼物列表
|
||||
*/
|
||||
public class LiveGiftFragment extends BaseFragment {
|
||||
private ViewPager fragmentViewpager;
|
||||
private int pageCount;
|
||||
private static final int GIFT_COUNT = 8;//每页8个礼物
|
||||
private RadioGroup mRadioGroup;
|
||||
private LiveGiftFragmentPagerAdapter giftFragmentPagerAdapter;
|
||||
private ArrayList<Fragment> ViewList = new ArrayList<>(); //页卡视图集合
|
||||
private List<LiveGiftBean> giftJson = new ArrayList<>();
|
||||
private int contextLayoutGiftHeight = 0;
|
||||
private String mStream, mLiveUid, wishGiftId, type;
|
||||
private int currentPage = 0;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_live_gift, viewGroup, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
giftJson = JSON.parseArray(bundle.getString("giftJson"), LiveGiftBean.class);
|
||||
contextLayoutGiftHeight = bundle.getInt("contextLayoutGiftHeight");
|
||||
mStream = bundle.getString("mStream");
|
||||
wishGiftId = bundle.getString("wishGiftId");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
type = bundle.getString("type");
|
||||
pageCount = giftJson.size() / GIFT_COUNT;
|
||||
if (giftJson.size() % GIFT_COUNT > 0) {
|
||||
pageCount++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
|
||||
fragmentViewpager = contentView.findViewById(R.id.context_layout);
|
||||
mRadioGroup = contentView.findViewById(R.id.radio_group);
|
||||
|
||||
|
||||
fragmentViewpager.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
contextLayoutGiftHeight = fragmentViewpager.getHeight();
|
||||
Log.e("giftJson", "height=" + contextLayoutGiftHeight);
|
||||
int fromIndex = 0;
|
||||
int size = giftJson.size();
|
||||
for (int i = 0; i < pageCount; i++) {
|
||||
int endIndex = fromIndex + GIFT_COUNT;
|
||||
if (endIndex > size) {
|
||||
endIndex = size;
|
||||
}
|
||||
List<LiveGiftBean> liveGiftBeans = new ArrayList<>();
|
||||
for (int j = fromIndex; j < endIndex; j++) {
|
||||
LiveGiftBean bean = giftJson.get(j);
|
||||
bean.setPage(i);
|
||||
liveGiftBeans.add(bean);
|
||||
if (!TextUtils.isEmpty(wishGiftId) && TextUtils.equals(bean.getId() + "", wishGiftId)) {
|
||||
currentPage = i;
|
||||
Log.e("LiveGiftItemFragment", type);
|
||||
}
|
||||
}
|
||||
fromIndex = endIndex;
|
||||
ViewList.add(LiveGiftItemFragment.newInstance(JSON.toJSONString(liveGiftBeans), contextLayoutGiftHeight, mStream, mLiveUid, wishGiftId));
|
||||
}
|
||||
giftFragmentPagerAdapter = new LiveGiftFragmentPagerAdapter(getChildFragmentManager(), getActivity(), ViewList);
|
||||
fragmentViewpager.setAdapter(giftFragmentPagerAdapter);
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(getContext());
|
||||
for (int i = 0, size2 = ViewList.size(); i < size2; i++) {
|
||||
RadioButton radioButton = (RadioButton) inflater.inflate(R.layout.view_gift_indicator, mRadioGroup, false);
|
||||
radioButton.setId(i + 10000);
|
||||
if (i == 0) {
|
||||
radioButton.setChecked(true);
|
||||
}
|
||||
mRadioGroup.addView(radioButton);
|
||||
|
||||
}
|
||||
fragmentViewpager.setCurrentItem(currentPage);
|
||||
//移除监听
|
||||
fragmentViewpager.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
});
|
||||
|
||||
fragmentViewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
if (mRadioGroup != null && mRadioGroup.getChildAt(position) != null) {
|
||||
((RadioButton) mRadioGroup.getChildAt(position)).setChecked(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
|
||||
}
|
||||
|
||||
public static LiveGiftFragment newInstance(String giftJson, String type,
|
||||
String mStream, String mLiveUid, String wishGiftId) {
|
||||
LiveGiftFragment liveGiftFragment = new LiveGiftFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("giftJson", giftJson);
|
||||
bundle.putString("type", type);
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
bundle.putString("wishGiftId", wishGiftId);
|
||||
liveGiftFragment.setArguments(bundle);
|
||||
return liveGiftFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.FrameGiftAdapter;
|
||||
import com.yunbao.live.event.LiveGiftItemEvent;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveGiftItemFragment extends BaseFragment {
|
||||
private List<LiveGiftBean> giftJson = new ArrayList<>();
|
||||
private RecyclerView frameGiftList;
|
||||
private int contextLayoutGiftHeight = 0;
|
||||
private FrameGiftAdapter frameGiftAdapter;
|
||||
private String mStream, mLiveUid, wishGiftId;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_live_gift_item, viewGroup, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
giftJson = JSON.parseArray(bundle.getString("giftJson"), LiveGiftBean.class);
|
||||
contextLayoutGiftHeight = bundle.getInt("contextLayoutGiftHeight");
|
||||
mStream = bundle.getString("mStream");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
wishGiftId = bundle.getString("wishGiftId");
|
||||
Log.e("giftJson", giftJson.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
|
||||
|
||||
frameGiftList = contentView.findViewById(R.id.frame_gift_list);
|
||||
frameGiftList.setHasFixedSize(true);
|
||||
frameGiftList.setLayoutManager(new GridLayoutManager(getActivity(), 4, GridLayoutManager.VERTICAL, false));
|
||||
frameGiftAdapter = new FrameGiftAdapter(contextLayoutGiftHeight, giftJson, mStream, mLiveUid, wishGiftId);
|
||||
frameGiftList.setAdapter(frameGiftAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
|
||||
}
|
||||
|
||||
public static LiveGiftItemFragment newInstance(String giftJson, int contextLayoutGiftHeight,
|
||||
String mStream, String mLiveUid, String wishGiftId) {
|
||||
LiveGiftItemFragment liveGiftFragment = new LiveGiftItemFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("giftJson", giftJson);
|
||||
bundle.putInt("contextLayoutGiftHeight", contextLayoutGiftHeight);
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
bundle.putString("wishGiftId", wishGiftId);
|
||||
liveGiftFragment.setArguments(bundle);
|
||||
return liveGiftFragment;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveGiftItemEvent(LiveGiftItemEvent event) {
|
||||
frameGiftAdapter.giftSelect(event.getLiveGiftModel());
|
||||
}
|
||||
}
|
||||
162
live/src/main/java/com/yunbao/live/views/LiveParcelFragment.java
Normal file
162
live/src/main/java/com/yunbao/live/views/LiveParcelFragment.java
Normal file
@@ -0,0 +1,162 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveGiftFragmentPagerAdapter;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveParcelFragment extends BaseFragment {
|
||||
private ViewPager fragmentViewpager;
|
||||
private int pageCount;
|
||||
private static final int GIFT_COUNT = 8;//每页8个礼物
|
||||
private RadioGroup mRadioGroup;
|
||||
private LiveGiftFragmentPagerAdapter giftFragmentPagerAdapter;
|
||||
private ArrayList<Fragment> ViewList = new ArrayList<>(); //页卡视图集合
|
||||
private List<LiveGiftBean> giftJson = new ArrayList<>();
|
||||
private int contextLayoutGiftHeight = 0;
|
||||
private String mStream, mLiveUid;
|
||||
private LinearLayout parcelDataList, parcelDataNo;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_live_parcel, viewGroup, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
mStream = bundle.getString("mStream");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
fragmentViewpager = contentView.findViewById(R.id.context_layout);
|
||||
mRadioGroup = contentView.findViewById(R.id.radio_group);
|
||||
parcelDataList = contentView.findViewById(R.id.parcel_data_list);
|
||||
parcelDataNo = contentView.findViewById(R.id.parcel_data_no);
|
||||
|
||||
fragmentViewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
if (mRadioGroup != null && mRadioGroup.getChildAt(position) != null) {
|
||||
((RadioButton) mRadioGroup.getChildAt(position)).setChecked(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
LiveHttpUtil.getWrapList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
String giftJson = obj.getString("giftlist");
|
||||
List<LiveGiftBean> list = JSON.parseArray(giftJson, LiveGiftBean.class);
|
||||
GiftCacheUtil.getInstance().addDownloadList(list);
|
||||
if (!GiftCacheUtil.getInstance().isDownloading()) {
|
||||
GiftCacheUtil.getInstance().downloadAllGift();
|
||||
}
|
||||
if (list.size() == 0) {
|
||||
parcelDataNo.setVisibility(View.VISIBLE);
|
||||
parcelDataList.setVisibility(View.GONE);
|
||||
} else {
|
||||
parcelDataList.setVisibility(View.VISIBLE);
|
||||
parcelDataNo.setVisibility(View.GONE);
|
||||
pageCount = list.size() / GIFT_COUNT;
|
||||
if (list.size() % GIFT_COUNT > 0) {
|
||||
pageCount++;
|
||||
}
|
||||
|
||||
fragmentViewpager.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
contextLayoutGiftHeight = fragmentViewpager.getHeight();
|
||||
Log.e("giftJson", "height=" + contextLayoutGiftHeight);
|
||||
int fromIndex = 0;
|
||||
int size = list.size();
|
||||
for (int i = 0; i < pageCount; i++) {
|
||||
int endIndex = fromIndex + GIFT_COUNT;
|
||||
if (endIndex > size) {
|
||||
endIndex = size;
|
||||
}
|
||||
List<LiveGiftBean> liveGiftBeans = new ArrayList<>();
|
||||
for (int j = fromIndex; j < endIndex; j++) {
|
||||
LiveGiftBean bean = list.get(j);
|
||||
bean.setPage(i);
|
||||
liveGiftBeans.add(bean);
|
||||
}
|
||||
fromIndex = endIndex;
|
||||
ViewList.add(LiveParcelItemFragment.newInstance(JSON.toJSONString(liveGiftBeans), contextLayoutGiftHeight, mStream, mLiveUid));
|
||||
}
|
||||
giftFragmentPagerAdapter = new LiveGiftFragmentPagerAdapter(getChildFragmentManager(), getActivity(), ViewList);
|
||||
fragmentViewpager.setAdapter(giftFragmentPagerAdapter);
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(getContext());
|
||||
for (int i = 0, size2 = ViewList.size(); i < size2; i++) {
|
||||
RadioButton radioButton = (RadioButton) inflater.inflate(R.layout.view_gift_indicator, mRadioGroup, false);
|
||||
radioButton.setId(i + 10000);
|
||||
if (i == 0) {
|
||||
radioButton.setChecked(true);
|
||||
}
|
||||
mRadioGroup.addView(radioButton);
|
||||
|
||||
}
|
||||
//移除监听
|
||||
fragmentViewpager.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
// if (mLoading != null) {
|
||||
// mLoading.setVisibility(View.INVISIBLE);
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static LiveParcelFragment newInstance(String mStream, String mLiveUid) {
|
||||
LiveParcelFragment liveParcelFragment = new LiveParcelFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
liveParcelFragment.setArguments(bundle);
|
||||
return liveParcelFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveParcelItemAdapter;
|
||||
import com.yunbao.live.event.LiveGiftItemEvent;
|
||||
import com.yunbao.live.event.LiveParcelItemRefreshEvent;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveParcelItemFragment extends BaseFragment {
|
||||
private List<LiveGiftBean> giftJson = new ArrayList<>();
|
||||
private RecyclerView frameGiftList;
|
||||
private int contextLayoutGiftHeight = 0;
|
||||
private LiveParcelItemAdapter frameGiftAdapter;
|
||||
private String mStream, mLiveUid;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
|
||||
return layoutInflater.inflate(R.layout.fragment_live_gift_item, viewGroup, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
giftJson = JSON.parseArray(bundle.getString("giftJson"), LiveGiftBean.class);
|
||||
contextLayoutGiftHeight = bundle.getInt("contextLayoutGiftHeight");
|
||||
mStream = bundle.getString("mStream");
|
||||
mLiveUid = bundle.getString("mLiveUid");
|
||||
Log.e("giftJson", giftJson.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
|
||||
frameGiftList = contentView.findViewById(R.id.frame_gift_list);
|
||||
frameGiftList.setHasFixedSize(true);
|
||||
frameGiftList.setLayoutManager(new GridLayoutManager(getActivity(), 4, GridLayoutManager.VERTICAL, false));
|
||||
frameGiftAdapter = new LiveParcelItemAdapter(contextLayoutGiftHeight, giftJson, mStream, mLiveUid);
|
||||
frameGiftList.setAdapter(frameGiftAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
|
||||
}
|
||||
|
||||
public static LiveParcelItemFragment newInstance(String giftJson, int contextLayoutGiftHeight, String mStream, String mLiveUid) {
|
||||
LiveParcelItemFragment liveGiftFragment = new LiveParcelItemFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("giftJson", giftJson);
|
||||
bundle.putInt("contextLayoutGiftHeight", contextLayoutGiftHeight);
|
||||
bundle.putString("mStream", mStream);
|
||||
bundle.putString("mLiveUid", mLiveUid);
|
||||
liveGiftFragment.setArguments(bundle);
|
||||
return liveGiftFragment;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveGiftItemEvent(LiveGiftItemEvent event) {
|
||||
frameGiftAdapter.giftSelect(event.getLiveGiftModel());
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveParcelItemRefreshEvent(LiveParcelItemRefreshEvent event) {
|
||||
frameGiftAdapter.refreshWrapListAfterSend(event.getLiveGiftModel());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.animation.ScaleAnimation;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
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.bean.LiveGiftBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||
import com.yunbao.live.event.LiveGiftDialogEvent;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView giftIcon, cornerMark;
|
||||
private Context mContext;
|
||||
private TextView giftName, mPrice, giftNumber;
|
||||
private RelativeLayout giftLayout;
|
||||
private ScaleAnimation mAnimation;
|
||||
private LinearLayout mLoadingLayout;
|
||||
private ImageView mLoading;
|
||||
|
||||
public LiveParcelItemViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mContext = itemView.getContext();
|
||||
giftIcon = itemView.findViewById(R.id.gift_icon);
|
||||
giftName = itemView.findViewById(R.id.gift_name);
|
||||
mPrice = itemView.findViewById(R.id.price);
|
||||
giftLayout = itemView.findViewById(R.id.gift_layout);
|
||||
giftNumber = itemView.findViewById(R.id.gift_number);
|
||||
cornerMark = itemView.findViewById(R.id.corner_mark);
|
||||
mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout);
|
||||
mLoading = itemView.findViewById(R.id.gift_loading);
|
||||
|
||||
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.setDuration(400);
|
||||
mAnimation.setRepeatMode(Animation.REVERSE);
|
||||
mAnimation.setRepeatCount(-1);
|
||||
}
|
||||
|
||||
public void showData(int contextLayoutGiftHeight, LiveGiftBean model) {
|
||||
//设置高度
|
||||
itemView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GridLayoutManager.LayoutParams linearParams = (GridLayoutManager.LayoutParams) itemView.getLayoutParams();
|
||||
linearParams.height = contextLayoutGiftHeight / 2;
|
||||
itemView.setLayoutParams(linearParams);
|
||||
}
|
||||
});
|
||||
giftLayout.setSelected(model.isChecked());
|
||||
if (model.isChecked()) {
|
||||
giftIcon.startAnimation(mAnimation);
|
||||
}
|
||||
ImgLoader.display(mContext, model.getIcon(), giftIcon);
|
||||
ImgLoader.display(mContext, model.getCornerMark(), cornerMark);
|
||||
giftName.setText(model.getName());
|
||||
mPrice.setText(model.getEnd_time());
|
||||
giftNumber.setText(model.getGiftNum());
|
||||
|
||||
if (model.getSwf() != null && model.getSwf().isEmpty()) {
|
||||
mLoadingLayout.setVisibility(View.GONE);
|
||||
} else {
|
||||
mLoadingLayout.setVisibility(GiftCacheUtil.checkGiftIsDownload(model.getId()) ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void giftSelect(LiveGiftBean model, int position, String mStream, String mLiveUid, FrameGiftClickListener frameGiftClickListener) {
|
||||
ViewClicksAntiShake.clicksAntiShake(mLoadingLayout, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mLoading.setImageResource(R.mipmap.icon_loading_gift);
|
||||
Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.anim_loading_gift);
|
||||
animation.setRepeatMode(Animation.RESTART);
|
||||
animation.setRepeatCount(Animation.INFINITE);
|
||||
animation.setInterpolator(new LinearInterpolator());
|
||||
mLoading.startAnimation(animation);
|
||||
GiftCacheUtil.getInstance().pause();
|
||||
GiftCacheUtil.getInstance().downloadGiftForId(mContext, model, new CommonCallback<File>() {
|
||||
@Override
|
||||
public void callback(File bean) {
|
||||
if (bean == null) {
|
||||
ToastUtil.show(mContext.getString(R.string.load_failure_2));
|
||||
mLoading.setImageResource(R.mipmap.icon_download_gift);
|
||||
animation.setRepeatCount(0);
|
||||
animation.setDuration(0);
|
||||
animation.cancel();
|
||||
mLoading.setAnimation(animation);
|
||||
} else {
|
||||
mLoadingLayout.setVisibility(View.GONE);
|
||||
}
|
||||
GiftCacheUtil.getInstance().restart();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(giftLayout, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (model.getType() == 9999999) {
|
||||
Bus.get().post(new LiveGiftDialogEvent());
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new SendRendPacketPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
} else {
|
||||
if (frameGiftClickListener != null) {
|
||||
frameGiftClickListener.onCallBack(position, model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface FrameGiftClickListener {
|
||||
void onCallBack(int position, LiveGiftBean model);
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,6 @@ import com.yunbao.live.custom.TopGradual;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGameDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
@@ -5069,23 +5068,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onSuccess(LiveAnchorCallMeModel data) {
|
||||
if (data.getIsGet() == 1) {
|
||||
new LiveUserAnchorMailBoxWebInfoPopDialog(mContext, mAnchorName, data.getLink())
|
||||
.setOnDismissListener(dialog -> loading.dismiss())
|
||||
.showDialog();
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setOnDismissListener(dialog -> checkNewLetter()
|
||||
);
|
||||
fragment.setOnShowListener(dialog -> mHandler.postDelayed(loading::dismiss, 500));
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, data.getGiftId() + "");
|
||||
bundle.putBoolean("isContactGift", true);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
loading.dismiss();
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setmWishGiftId(data.getGiftId() + "")
|
||||
.setIsContactGift(true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -5147,23 +5136,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onSuccess(LiveAnchorCallMeModel data) {
|
||||
if (data.getIsGet() == 1) {
|
||||
new LiveUserAnchorMailBoxWebInfoPopDialog(mContext, mAnchorName, data.getLink())
|
||||
.setOnDismissListener(dialog -> loading.dismiss())
|
||||
.showDialog();
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setOnDismissListener(dialog -> checkNewLetter()
|
||||
);
|
||||
fragment.setOnShowListener(dialog -> mHandler.postDelayed(loading::dismiss, 500));
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, data.getGiftId() + "");
|
||||
bundle.putBoolean("isContactGift", true);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
loading.dismiss();
|
||||
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setmWishGiftId(data.getGiftId() + "")
|
||||
.setIsContactGift(true));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
13
live/src/main/res/drawable/background_gift_select.xml
Normal file
13
live/src/main/res/drawable/background_gift_select.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="#e6272C42" />
|
||||
<stroke android:width="0.6dp" android:color="#AEAEB2" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="false">
|
||||
<shape android:shape="rectangle"></shape>
|
||||
</item>
|
||||
</selector>
|
||||
23
live/src/main/res/layout/fragment_live_gift.xml
Normal file
23
live/src/main/res/layout/fragment_live_gift.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:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/context_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radio_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="6dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:orientation="horizontal" />
|
||||
</LinearLayout>
|
||||
13
live/src/main/res/layout/fragment_live_gift_item.xml
Normal file
13
live/src/main/res/layout/fragment_live_gift_item.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/frame_gift_list"
|
||||
android:layout_width="match_parent"
|
||||
android:overScrollMode="never"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
52
live/src/main/res/layout/fragment_live_parcel.xml
Normal file
52
live/src/main/res/layout/fragment_live_parcel.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/parcel_data_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/context_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radio_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="6dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:orientation="horizontal" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/parcel_data_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="112dp"
|
||||
android:layout_height="90dp"
|
||||
android:src="@mipmap/icon_empty_parcel" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/nothing_in_the_package_yet"
|
||||
android:textColor="#717375"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
79
live/src/main/res/layout/item_frame_gift.xml
Normal file
79
live/src/main/res/layout/item_frame_gift.xml
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/gift_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_gift_select"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_icon"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pay_ico"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginEnd="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/corner_mark"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="11dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="2dp" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gift_loading_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#C0000000"
|
||||
android:gravity="center"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="30dp"
|
||||
android:src="@mipmap/icon_download_gift" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
18
live/src/main/res/layout/item_gift_top_new.xml
Normal file
18
live/src/main/res/layout/item_gift_top_new.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.yunbao.common.custom.DrawableTextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/live_wrap"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
97
live/src/main/res/layout/item_live_parcel.xml
Normal file
97
live/src/main/res/layout/item_live_parcel.xml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/gift_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_gift_select"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="55dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_icon"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:background="@drawable/bg_parcel_point"
|
||||
android:paddingStart="3dp"
|
||||
android:paddingEnd="3dp"
|
||||
android:text="11"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pay_ico"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/corner_mark"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="11dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="2dp" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gift_loading_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#C0000000"
|
||||
android:gravity="center"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="30dp"
|
||||
android:src="@mipmap/icon_download_gift" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,147 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="110dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="159dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
<!--凤凰,龙,麒麟-->
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_blind_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="86.5dp"
|
||||
android:background="@mipmap/bg_kirin">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="51dp"
|
||||
android:layout_marginTop="59dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_blind3"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:max="100"
|
||||
android:progress="30"
|
||||
android:progressDrawable="@drawable/bg_blind_progres"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_blind1"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:max="100"
|
||||
android:progress="50"
|
||||
android:progressDrawable="@drawable/bg_blind_progress"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_blind2"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_gravity="center"
|
||||
android:max="100"
|
||||
android:progress="50"
|
||||
android:progressDrawable="@drawable/bg_blind_progress1"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_blind_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textSize="6sp" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/blind_number"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="47dp"
|
||||
android:layout_marginTop="71dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@mipmap/icon_what" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="149dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg_blind_bottom">
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/text_blind_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="5dp"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/blind_svga"
|
||||
android:layout_width="71dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_height="71dp"
|
||||
android:layout_marginTop="29dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="43dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_masking"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/blind_box_open"
|
||||
android:layout_width="61dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="2dp" />
|
||||
</FrameLayout>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 233 B |
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 357 B |
Reference in New Issue
Block a user