礼物面板新增个播人气礼物
This commit is contained in:
@@ -419,6 +419,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
|||||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_LUCKY, "幸运", "幸运"));
|
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_LUCKY, "幸运", "幸运"));
|
||||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NOBLE, "贵族", "贵族"));
|
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NOBLE, "贵族", "贵族"));
|
||||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_WEEK, "周星", "周星"));
|
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_WEEK, "周星", "周星"));
|
||||||
|
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_SING_ROOM, "人气", "人气"));
|
||||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_DRAW_GIFT, "涂鸦礼物", "涂鸦礼物"));
|
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_DRAW_GIFT, "涂鸦礼物", "涂鸦礼物"));
|
||||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_KNAP, "背包", "背包"));
|
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_KNAP, "背包", "背包"));
|
||||||
giftIndicator = findViewById(R.id.gift_indicator);
|
giftIndicator = findViewById(R.id.gift_indicator);
|
||||||
@@ -646,6 +647,8 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
|||||||
currentGiftInfoList = getWeekStarGiftInfos();
|
currentGiftInfoList = getWeekStarGiftInfos();
|
||||||
} else if (position == GiftIndicator.TYPE_DRAW_GIFT) {
|
} else if (position == GiftIndicator.TYPE_DRAW_GIFT) {
|
||||||
currentGiftInfoList = getDrawGiftInfos();
|
currentGiftInfoList = getDrawGiftInfos();
|
||||||
|
} else if (position == GiftIndicator.TYPE_SING_ROOM) {
|
||||||
|
currentGiftInfoList = getSingleRoomGiftInfos();
|
||||||
}
|
}
|
||||||
//是否背包礼物
|
//是否背包礼物
|
||||||
final boolean isKnap = (position == GiftIndicator.TYPE_KNAP);
|
final boolean isKnap = (position == GiftIndicator.TYPE_KNAP);
|
||||||
@@ -1061,6 +1064,12 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
|||||||
GiftType.GIFT_TYPE_DRAW_GIFT);
|
GiftType.GIFT_TYPE_DRAW_GIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<GiftInfo> getSingleRoomGiftInfos() {
|
||||||
|
return GiftModel.get().getGiftInfosByType(
|
||||||
|
String.valueOf(AvRoomDataManager.get().getRoomUid()),
|
||||||
|
GiftType.GIFT_TYPE_SINGLE_ROOM);
|
||||||
|
}
|
||||||
|
|
||||||
private List<GiftInfo> getNobleGiftInfos() {
|
private List<GiftInfo> getNobleGiftInfos() {
|
||||||
return GiftModel.get().getGiftInfoList(GiftType.GIFT_TYPE_VIP);
|
return GiftModel.get().getGiftInfoList(GiftType.GIFT_TYPE_VIP);
|
||||||
}
|
}
|
||||||
@@ -1320,6 +1329,11 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
|||||||
giftIndicator.showPosition(GiftIndicator.TYPE_NOBLE);
|
giftIndicator.showPosition(GiftIndicator.TYPE_NOBLE);
|
||||||
giftIndicator.showPosition(GiftIndicator.TYPE_WEEK);
|
giftIndicator.showPosition(GiftIndicator.TYPE_WEEK);
|
||||||
giftIndicator.showPosition(GiftIndicator.TYPE_NORMAL);
|
giftIndicator.showPosition(GiftIndicator.TYPE_NORMAL);
|
||||||
|
if (AvRoomDataManager.get().isSingleRoom()) {
|
||||||
|
giftIndicator.showPosition(GiftIndicator.TYPE_SING_ROOM);
|
||||||
|
} else {
|
||||||
|
giftIndicator.hidePosition(GiftIndicator.TYPE_SING_ROOM);
|
||||||
|
}
|
||||||
|
|
||||||
giftIndicator.setPosition(position);
|
giftIndicator.setPosition(position);
|
||||||
updateGiftView(giftIndicator.getCurrrentType(), selectGiftInfo);
|
updateGiftView(giftIndicator.getCurrrentType(), selectGiftInfo);
|
||||||
@@ -1337,6 +1351,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
|||||||
giftIndicator.hidePosition(GiftIndicator.TYPE_NOBLE);
|
giftIndicator.hidePosition(GiftIndicator.TYPE_NOBLE);
|
||||||
giftIndicator.hidePosition(GiftIndicator.TYPE_WEEK);
|
giftIndicator.hidePosition(GiftIndicator.TYPE_WEEK);
|
||||||
giftIndicator.hidePosition(GiftIndicator.TYPE_NORMAL);
|
giftIndicator.hidePosition(GiftIndicator.TYPE_NORMAL);
|
||||||
|
giftIndicator.hidePosition(GiftIndicator.TYPE_SING_ROOM);
|
||||||
|
|
||||||
giftIndicator.setPosition(GiftIndicator.TYPE_DRAW_GIFT);
|
giftIndicator.setPosition(GiftIndicator.TYPE_DRAW_GIFT);
|
||||||
updateGiftView(giftIndicator.getCurrrentType());
|
updateGiftView(giftIndicator.getCurrrentType());
|
||||||
|
@@ -61,6 +61,11 @@ public class GiftIndicator extends LinearLayout {
|
|||||||
*/
|
*/
|
||||||
public static final int TYPE_KNAP = 5;
|
public static final int TYPE_KNAP = 5;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个播人气礼物
|
||||||
|
*/
|
||||||
|
public static final int TYPE_SING_ROOM = 6;
|
||||||
|
|
||||||
private Map<String, String> map = new HashMap<>();
|
private Map<String, String> map = new HashMap<>();
|
||||||
private List<GiftTab> tabList = new ArrayList<>();
|
private List<GiftTab> tabList = new ArrayList<>();
|
||||||
@Getter
|
@Getter
|
||||||
|
@@ -197,6 +197,9 @@ public class GiftModel extends BaseModel implements IGiftModel {
|
|||||||
case GiftType.GIFT_TYPE_DRAW_GIFT:
|
case GiftType.GIFT_TYPE_DRAW_GIFT:
|
||||||
giftInfos = allGiftListInfo.getDrawGift();
|
giftInfos = allGiftListInfo.getDrawGift();
|
||||||
break;
|
break;
|
||||||
|
case GiftType.GIFT_TYPE_SINGLE_ROOM:
|
||||||
|
giftInfos = allGiftListInfo.getSinglePopularGift();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return giftInfos == null ? new ArrayList<>() : giftInfos;
|
return giftInfos == null ? new ArrayList<>() : giftInfos;
|
||||||
}
|
}
|
||||||
@@ -571,6 +574,9 @@ public class GiftModel extends BaseModel implements IGiftModel {
|
|||||||
if (giftInfo == null) {
|
if (giftInfo == null) {
|
||||||
giftInfo = findGiftInfoById(allGiftListInfo.getDrawGift(), giftId);
|
giftInfo = findGiftInfoById(allGiftListInfo.getDrawGift(), giftId);
|
||||||
}
|
}
|
||||||
|
if (giftInfo == null) {
|
||||||
|
giftInfo = findGiftInfoById(allGiftListInfo.getSinglePopularGift(), giftId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return giftInfo;
|
return giftInfo;
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,7 @@ public class GiftListInfo implements Serializable {
|
|||||||
private List<GiftInfo> luckyPoolGift;
|
private List<GiftInfo> luckyPoolGift;
|
||||||
private List<GiftInfo> weekStarGift;
|
private List<GiftInfo> weekStarGift;
|
||||||
private List<GiftInfo> drawGift;
|
private List<GiftInfo> drawGift;
|
||||||
|
private List<GiftInfo> singlePopularGift;
|
||||||
private String giftVersion;
|
private String giftVersion;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -38,4 +38,6 @@ public class GiftType {
|
|||||||
public static final int GIFT_TYPE_WEEK_STAR = 8;
|
public static final int GIFT_TYPE_WEEK_STAR = 8;
|
||||||
|
|
||||||
public static final int GIFT_TYPE_DRAW_GIFT = 10;
|
public static final int GIFT_TYPE_DRAW_GIFT = 10;
|
||||||
|
|
||||||
|
public static final int GIFT_TYPE_SINGLE_ROOM = 11;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user