6.5.4礼物冠名
This commit is contained in:
119
common/src/main/java/com/yunbao/common/bean/GiftGuideModel.java
Normal file
119
common/src/main/java/com/yunbao/common/bean/GiftGuideModel.java
Normal file
@@ -0,0 +1,119 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GiftGuideModel extends BaseModel {
|
||||
|
||||
@SerializedName("guide_name")
|
||||
private String guideName;
|
||||
@SerializedName("illuminate_count")
|
||||
private int illuminateCount;
|
||||
@SerializedName("already_font")
|
||||
private String alreadyFont;
|
||||
@SerializedName("without_font")
|
||||
private String withoutFont;
|
||||
@SerializedName("number")
|
||||
private String number;
|
||||
@SerializedName("illuminate_total")
|
||||
private int illuminateTotal;
|
||||
@SerializedName("week_number")
|
||||
private String weekNumber;
|
||||
@SerializedName("guide_name_img_path")
|
||||
private String guideNameImgPath;
|
||||
@SerializedName("guide_background_picture_path")
|
||||
private String guideBackgroundPicturePath;
|
||||
@SerializedName("gift_data")
|
||||
private List<GiftWallModel> giftData;
|
||||
|
||||
public String getAlreadyFont() {
|
||||
return alreadyFont;
|
||||
}
|
||||
|
||||
public GiftGuideModel setAlreadyFont(String alreadyFont) {
|
||||
this.alreadyFont = alreadyFont;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWithoutFont() {
|
||||
return withoutFont;
|
||||
}
|
||||
|
||||
public GiftGuideModel setWithoutFont(String withoutFont) {
|
||||
this.withoutFont = withoutFont;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public GiftGuideModel setNumber(String number) {
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIlluminateTotal() {
|
||||
return illuminateTotal;
|
||||
}
|
||||
|
||||
public GiftGuideModel setIlluminateTotal(int illuminateTotal) {
|
||||
this.illuminateTotal = illuminateTotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getWeekNumber() {
|
||||
return weekNumber;
|
||||
}
|
||||
|
||||
public GiftGuideModel setWeekNumber(String weekNumber) {
|
||||
this.weekNumber = weekNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuideNameImgPath() {
|
||||
return guideNameImgPath;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGuideNameImgPath(String guideNameImgPath) {
|
||||
this.guideNameImgPath = guideNameImgPath;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuideBackgroundPicturePath() {
|
||||
return guideBackgroundPicturePath;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGuideBackgroundPicturePath(String guideBackgroundPicturePath) {
|
||||
this.guideBackgroundPicturePath = guideBackgroundPicturePath;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGuideName() {
|
||||
return guideName;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGuideName(String guideName) {
|
||||
this.guideName = guideName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIlluminateCount() {
|
||||
return illuminateCount;
|
||||
}
|
||||
|
||||
public GiftGuideModel setIlluminateCount(int illuminateCount) {
|
||||
this.illuminateCount = illuminateCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<GiftWallModel> getGiftData() {
|
||||
return giftData;
|
||||
}
|
||||
|
||||
public GiftGuideModel setGiftData(List<GiftWallModel> giftData) {
|
||||
this.giftData = giftData;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,29 @@ public class GiftWallModel extends BaseModel {
|
||||
@SerializedName("naming_coin_max")
|
||||
private String namingCoinMax;
|
||||
|
||||
@SerializedName("illuminate_status")
|
||||
private int illuminateStatus;
|
||||
@SerializedName("font_color")
|
||||
private String fontColor;
|
||||
|
||||
public String getFontColor() {
|
||||
return fontColor;
|
||||
}
|
||||
|
||||
public GiftWallModel setFontColor(String fontColor) {
|
||||
this.fontColor = fontColor;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIlluminateStatus() {
|
||||
return illuminateStatus;
|
||||
}
|
||||
|
||||
public GiftWallModel setIlluminateStatus(int illuminateStatus) {
|
||||
this.illuminateStatus = illuminateStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNamingCoinMax() {
|
||||
return namingCoinMax;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class CodexEvent extends BaseModel {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
public class LiveGiftDialogEvent {
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import com.yunbao.common.bean.DiscountsModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
@@ -873,5 +874,19 @@ public interface PDLiveApi {
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.lastMonthGiftNaming")
|
||||
Observable<ResponseModel<List<GiftWallModel>>> lastMonthGiftNaming();
|
||||
/**
|
||||
* 礼物墙上月冠名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/api/public/?service=Gift.getGiftGuide")
|
||||
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuide(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Gift.getGiftGuideHistory")
|
||||
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.DiscountsModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
@@ -1909,6 +1910,50 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getGiftGuide(String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getGiftGuide(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<GiftGuideModel>> 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 getGiftGuideHistory(String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getGiftGuideHistory(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<GiftGuideModel>> 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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
15
common/src/main/res/drawable/background_codex_item_btn.xml
Normal file
15
common/src/main/res/drawable/background_codex_item_btn.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="false">
|
||||
<shape>
|
||||
<gradient android:angle="90" android:endColor="#BBD3FF" android:startColor="#E6EEFF" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="true">
|
||||
<shape>
|
||||
<gradient android:angle="90" android:endColor="#FF7917" android:startColor="#FCD16E" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
7
common/src/main/res/drawable/background_codex_top.xml
Normal file
7
common/src/main/res/drawable/background_codex_top.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:bottomRightRadius="10dp"
|
||||
android:topLeftRadius="10dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:topLeftRadius="15dp"
|
||||
android:topRightRadius="15dp" />
|
||||
</shape>
|
||||
23
common/src/main/res/layout/dialog_live_codex.xml
Normal file
23
common/src/main/res/layout/dialog_live_codex.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="524dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/background_dialog_live_codex"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close_btn"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_margin="13dp"
|
||||
android:src="@mipmap/icon_regular_black" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/live_codex"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="15dp" />
|
||||
</LinearLayout>
|
||||
66
common/src/main/res/layout/item_codex.xml
Normal file
66
common/src/main/res/layout/item_codex.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?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="115dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/codex_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="22dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_icon"
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="26dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:text="@string/regular_bubble"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/gift_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="4dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/week_number"
|
||||
android:layout_width="71dp"
|
||||
android:layout_height="22dp"
|
||||
android:background="@drawable/background_codex_top"
|
||||
android:gravity="center"
|
||||
android:textColor="#B74D0F"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/week_number2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/last_month_winner_hint2"
|
||||
android:textColor="#B74D0F"
|
||||
android:textSize="11sp" />
|
||||
</FrameLayout>
|
||||
31
common/src/main/res/layout/item_codex_item.xml
Normal file
31
common/src/main/res/layout/item_codex_item.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_img"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_marginTop="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/regular_bubble"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_wall"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/background_codex_item_btn"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
BIN
common/src/main/res/mipmap-xxhdpi/icon_regular_black.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_regular_black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 472 B |
@@ -1291,5 +1291,8 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="winner_of_the_month">本月得主</string>
|
||||
<string name="last_month_winner">上月得主</string>
|
||||
<string name="last_month_winner_hint">上月奪得最終禮物冠名權用戶將獲得該禮物一個月專屬冠名皮膚</string>
|
||||
<string name="last_month_winner_hint2">近期點亮</string>
|
||||
<string name="received_wall">已獲得</string>
|
||||
<string name="received_wall2">去點亮</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user