Merge branch 'dev_6.5.4'
@ -111,7 +111,7 @@ android {
|
||||
applicationVariants.all { variant ->
|
||||
println "清空build文件夹";
|
||||
for (final def project in rootProject.getAllprojects()) {
|
||||
delete project.buildDir
|
||||
// delete project.buildDir
|
||||
println project.buildDir
|
||||
}
|
||||
String variantName = variant.name.capitalize()
|
||||
|
@ -19,6 +19,8 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.Utils;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.fm.openinstall.OpenInstall;
|
||||
@ -34,6 +36,7 @@ import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
||||
@ -44,6 +47,7 @@ import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.socket.SocketReceiveBean;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.live.utils.LiveImDeletUtil;
|
||||
import com.yunbao.live.views.PortraitLiveManager;
|
||||
@ -201,11 +205,16 @@ public class AppContext extends CommonAppContext {
|
||||
&& (TextUtils.equals("__system__", message.getTargetId())
|
||||
|| ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
||||
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
|
||||
JSONObject map = received.getMsg().getJSONObject(0);
|
||||
sendStartAnchorLive(map);
|
||||
}
|
||||
//主播页面
|
||||
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
||||
EventBus.getDefault().post(message);
|
||||
}
|
||||
@ -215,6 +224,14 @@ public class AppContext extends CommonAppContext {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void sendStartAnchorLive(JSONObject map) {
|
||||
AnchorStartLiveBean bean = new AnchorStartLiveBean();
|
||||
bean.setAnchorName(map.getString("anchorName"));
|
||||
bean.setRoomId(map.getString("roomid"));
|
||||
bean.setAvatar(map.getString("avatar"));
|
||||
EventBus.getDefault().post(bean);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class AnchorStartLiveBean extends BaseModel{
|
||||
private String anchorName;
|
||||
private String avatar;
|
||||
private String roomId;
|
||||
|
||||
public String getAnchorName() {
|
||||
return anchorName;
|
||||
}
|
||||
|
||||
public void setAnchorName(String anchorName) {
|
||||
this.anchorName = anchorName;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getRoomId() {
|
||||
return roomId;
|
||||
}
|
||||
|
||||
public void setRoomId(String roomId) {
|
||||
this.roomId = roomId;
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class FansGroupGiftPack extends BaseModel{
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("quantity")
|
||||
private int quantity;
|
||||
@SerializedName("end_time")
|
||||
private String endTime;
|
||||
@SerializedName("giftname")
|
||||
private String giftName;
|
||||
@SerializedName("needcoin")
|
||||
private String needCoin;
|
||||
@SerializedName("gifticon")
|
||||
private String icon;
|
||||
|
||||
public FansGroupGiftPack() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getGiftName() {
|
||||
return giftName;
|
||||
}
|
||||
|
||||
public void setGiftName(String giftName) {
|
||||
this.giftName = giftName;
|
||||
}
|
||||
|
||||
public String getNeedCoin() {
|
||||
return needCoin;
|
||||
}
|
||||
|
||||
public void setNeedCoin(String needCoin) {
|
||||
this.needCoin = needCoin;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FansGroupGiftPack{" +
|
||||
"id=" + id +
|
||||
", quantity=" + quantity +
|
||||
", endTime='" + endTime + '\'' +
|
||||
", giftName='" + giftName + '\'' +
|
||||
", needCoin='" + needCoin + '\'' +
|
||||
", icon='" + icon + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FansGroupGiftPackInfo extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("description")
|
||||
private String description;
|
||||
@SerializedName("coin")
|
||||
private String coin;
|
||||
@SerializedName("data")
|
||||
private List<Gift> data;
|
||||
|
||||
public FansGroupGiftPackInfo() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getCoin() {
|
||||
return coin;
|
||||
}
|
||||
|
||||
public void setCoin(String coin) {
|
||||
this.coin = coin;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<Gift> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<Gift> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FansGroupGiftPack{" +
|
||||
"id=" + id +
|
||||
", description='" + description + '\'' +
|
||||
", coin='" + coin + '\'' +
|
||||
", data=" + data +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class Gift {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("name")
|
||||
private String giftName;
|
||||
@SerializedName("needcoin")
|
||||
private String needCoin;
|
||||
@SerializedName("src")
|
||||
private String giftIcon;
|
||||
@SerializedName("quantity")
|
||||
private String quantity;
|
||||
@SerializedName("restrict")
|
||||
private int restrict;
|
||||
@SerializedName("type")
|
||||
private int type;
|
||||
|
||||
public Gift() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getGiftName() {
|
||||
return giftName;
|
||||
}
|
||||
|
||||
public void setGiftName(String giftName) {
|
||||
this.giftName = giftName;
|
||||
}
|
||||
|
||||
public String getNeedCoin() {
|
||||
return needCoin;
|
||||
}
|
||||
|
||||
public void setNeedCoin(String needCoin) {
|
||||
this.needCoin = needCoin;
|
||||
}
|
||||
|
||||
public String getGiftIcon() {
|
||||
return giftIcon;
|
||||
}
|
||||
|
||||
public void setGiftIcon(String giftIcon) {
|
||||
this.giftIcon = giftIcon;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public int getRestrict() {
|
||||
return restrict;
|
||||
}
|
||||
|
||||
public void setRestrict(int restrict) {
|
||||
this.restrict = restrict;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Gift{" +
|
||||
"id=" + id +
|
||||
", giftName='" + giftName + '\'' +
|
||||
", needCoin='" + needCoin + '\'' +
|
||||
", giftIcon='" + giftIcon + '\'' +
|
||||
", quantity='" + quantity + '\'' +
|
||||
", restrict='" + restrict + '\'' +
|
||||
", type=" + type +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
@ -191,6 +191,16 @@ public class LiveGiftBean {
|
||||
return this;
|
||||
}
|
||||
|
||||
private int fansGiftLevel=0;//粉丝团礼物等级要求
|
||||
|
||||
public int getFansGiftLevel() {
|
||||
return fansGiftLevel;
|
||||
}
|
||||
|
||||
public void setFansGiftLevel(int fansGiftLevel) {
|
||||
this.fansGiftLevel = fansGiftLevel;
|
||||
}
|
||||
|
||||
public int getBlind_box_type() {
|
||||
return blind_box_type;
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class UserAvatarSelectBean extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
@SerializedName("path")
|
||||
private String path;
|
||||
@SerializedName("checked")
|
||||
private int checked;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public int getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(int checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
}
|
@ -68,6 +68,10 @@ public class UserBean implements Parcelable {
|
||||
private String mRankPkImgUrl;
|
||||
//是否填写完整资料
|
||||
private int user_info_complete;
|
||||
//粉丝团等级
|
||||
private int fansLevel;
|
||||
//粉丝团进场皮肤
|
||||
private String fansEnterRoomUrl;
|
||||
|
||||
public int getUserInfoComplete() {
|
||||
return user_info_complete;
|
||||
@ -78,6 +82,22 @@ public class UserBean implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getFansLevel() {
|
||||
return fansLevel;
|
||||
}
|
||||
|
||||
public void setFansLevel(int fansLevel) {
|
||||
this.fansLevel = fansLevel;
|
||||
}
|
||||
|
||||
public String getFansEnterRoomUrl() {
|
||||
return fansEnterRoomUrl;
|
||||
}
|
||||
|
||||
public void setFansEnterRoomUrl(String fansEnterRoomUrl) {
|
||||
this.fansEnterRoomUrl = fansEnterRoomUrl;
|
||||
}
|
||||
|
||||
public boolean isRandomPk() {
|
||||
return randomPk;
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
|
||||
/**
|
||||
* 居中弹窗
|
||||
*/
|
||||
public abstract class AbsDialogCenterPopupWindow extends CenterPopupView {
|
||||
public final Context mContext;
|
||||
|
||||
public AbsDialogCenterPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
|
||||
*/
|
||||
public abstract void buildDialog(XPopup.Builder builder);
|
||||
public abstract int bindLayoutId();
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return bindLayoutId();
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
XPopup.Builder builder = new XPopup.Builder(mContext);
|
||||
builder.isDestroyOnDismiss(true);
|
||||
builder.enableDrag(false);
|
||||
buildDialog(builder);
|
||||
builder.asCustom(this).show();
|
||||
}
|
||||
}
|
@ -7,9 +7,11 @@ import androidx.annotation.NonNull;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
|
||||
|
||||
/**
|
||||
* 底部弹窗
|
||||
*/
|
||||
public abstract class AbsDialogPopupWindow extends BottomPopupView {
|
||||
private final Context mContext;
|
||||
public final Context mContext;
|
||||
|
||||
public AbsDialogPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
|
@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.PositionPopupView;
|
||||
|
||||
/**
|
||||
* 自定义位置弹窗
|
||||
*/
|
||||
public abstract class AbsDialogPositionPopupWindow extends PositionPopupView {
|
||||
public final Context mContext;
|
||||
|
||||
public AbsDialogPositionPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
|
||||
*/
|
||||
public abstract void buildDialog(XPopup.Builder builder);
|
||||
public abstract int bindLayoutId();
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return bindLayoutId();
|
||||
}
|
||||
|
||||
public void showDialog() {
|
||||
XPopup.Builder builder = new XPopup.Builder(mContext);
|
||||
builder.isDestroyOnDismiss(true);
|
||||
builder.enableDrag(false);
|
||||
buildDialog(builder);
|
||||
builder.asCustom(this).show();
|
||||
}
|
||||
}
|
@ -12,6 +12,8 @@ import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.DiscountsModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
@ -50,6 +52,7 @@ import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.UserAreaBean;
|
||||
import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
@ -835,6 +838,22 @@ public interface PDLiveApi {
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取系统默认头像列表
|
||||
*/
|
||||
@GET("/api/public/?service=Userhome.getDefaultAvatarList")
|
||||
Observable<ResponseModel<List<UserAvatarSelectBean>>> getSystemUserAvatar();
|
||||
|
||||
/**
|
||||
* 设置系统默认头像
|
||||
*
|
||||
* @param id 头像id
|
||||
*/
|
||||
@GET("/api/public/?service=Userhome.setAvatar")
|
||||
Observable<ResponseModel<Object>> setSystemUserAvatar(
|
||||
@Query("avatar_id") int id
|
||||
);
|
||||
|
||||
/**
|
||||
* 礼物墙已点亮
|
||||
*/
|
||||
@ -897,6 +916,32 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<MedalAchievementModel>> getUserMedalList(@Query("to_uid") String toUid);
|
||||
|
||||
@GET("/api/public/?service=Gift.getLiveMedalList")
|
||||
Observable<ResponseModel<MedalAchievementModel>> getLiveMedalList( @Query("liveuid") String liveUid);
|
||||
Observable<ResponseModel<MedalAchievementModel>> getLiveMedalList(@Query("liveuid") String liveUid);
|
||||
|
||||
/**
|
||||
* 获取粉丝团礼物信息
|
||||
* @param packId 礼包id
|
||||
*/
|
||||
@GET("/api/public/?service=Fans.getFansExclusivePack")
|
||||
Observable<ResponseModel<FansGroupGiftPackInfo>> getFansExclusivePack(@Query("liveuid") String liveUid,
|
||||
@Query("pack_id") String packId
|
||||
);
|
||||
|
||||
/**
|
||||
* 购买粉丝团礼包
|
||||
* @param packId 礼包id
|
||||
*/
|
||||
@GET("/api/public/?service=Fans.buyFansExclusivePack")
|
||||
Observable<ResponseModel<HttpCallbackModel>> buyFansExclusivePack(@Query("liveuid") String liveUid,
|
||||
@Query("pack_id") String packId,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取粉丝团礼物包裹
|
||||
*/
|
||||
@GET("/api/public/?service=Fans.userFansExclusivePackList")
|
||||
Observable<ResponseModel<List<FansGroupGiftPack>>> userFansExclusivePackList(@Query("liveuid") String liveUid);
|
||||
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.DiscountsModel;
|
||||
import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
@ -46,6 +48,7 @@ import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.UserAreaBean;
|
||||
import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
import com.yunbao.common.bean.WishListGiftConfModel;
|
||||
import com.yunbao.common.bean.WishListModel;
|
||||
@ -63,7 +66,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
|
||||
/**
|
||||
@ -1802,6 +1804,54 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getSystemUserAvatar(HttpCallback<List<UserAvatarSelectBean>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getSystemUserAvatar()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<UserAvatarSelectBean>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<UserAvatarSelectBean>> objectResponseModel) throws Exception {
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getInfo());
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, 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 setSystemUserAvatar(int id, HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setSystemUserAvatar(id)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
if (objectResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(objectResponseModel.getData().getMsg());
|
||||
} else {
|
||||
callback.onError(objectResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, 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 giftAlreadyWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.giftAlreadyWall(liveUid, toUid)
|
||||
@ -1978,7 +2028,7 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getLiveMedalList( String liveUid,HttpCallback<MedalAchievementModel> callback) {
|
||||
public void getLiveMedalList(String liveUid, HttpCallback<MedalAchievementModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getLiveMedalList(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@ -2000,6 +2050,72 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getFansExclusivePack(String liveUid, String packId, HttpCallback<FansGroupGiftPackInfo> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getFansExclusivePack(liveUid, packId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<FansGroupGiftPackInfo>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<FansGroupGiftPackInfo> 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 buyFansExclusivePack(String liveUid, String packId,String stream, HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.buyFansExclusivePack(liveUid, packId,stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<HttpCallbackModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<HttpCallbackModel> 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 userFansExclusivePackList(String liveUid, HttpCallback<List<FansGroupGiftPack>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.userFansExclusivePackList(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<FansGroupGiftPack>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<FansGroupGiftPack>> 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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
@ -47,6 +47,7 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
private final String keyDefaultBubbleUrl = "defaultBubbleUrl";
|
||||
private final String STATUS_ANCHOR_SAY = "anchorSay";
|
||||
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
|
||||
private final String LIVE_NOTIFY_SETTINGS = "liveNotifySettings";//开播通知
|
||||
|
||||
private final String KEY_LANGUAGE = "language";
|
||||
|
||||
@ -354,6 +355,14 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
return getBoolean(GiftEffect, !(Build.VERSION.SDK_INT < Build.VERSION_CODES.O));
|
||||
}
|
||||
|
||||
public void setLiveNotifySettings(boolean isTrue) {
|
||||
put(LIVE_NOTIFY_SETTINGS, isTrue);
|
||||
}
|
||||
|
||||
public boolean isLiveNotifySettings() {
|
||||
return getBoolean(LIVE_NOTIFY_SETTINGS, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新请求管理员身份信息
|
||||
*/
|
||||
|
@ -548,6 +548,21 @@ public class JavascriptInterfaceUtils {
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("clickLogOffAccount"));
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidFansGroupBuy(String id){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidFansGroupBuy").setUserId(id));
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidFansGroupPack(){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidFansGroupPack"));
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidFansGroupInfo(){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidFansGroupInfo"));
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl,int isAnchor ) {
|
||||
|
@ -44,6 +44,7 @@ public class RouteUtil {
|
||||
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
|
||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
@ -306,4 +307,12 @@ public class RouteUtil {
|
||||
.withInt("id", id)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统头像选择
|
||||
*/
|
||||
public static void forwardUserAvatarSelect(){
|
||||
ARouter.getInstance().build(PATH_SELECT_AVATAR)
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@
|
||||
<string name="edit_profile_update_nickname">ModifyName</string>
|
||||
<string name="edit_profile_update_remarks">Modify remarks</string>
|
||||
<string name="edit_profile_remarks">Please enter comments~</string>
|
||||
<string name="edit_profile_update_sign">Signature modification</string>
|
||||
<string name="edit_profile_update_sign">Signature</string>
|
||||
<string name="edit_profile_sign">autograph</string>
|
||||
<string name="bind_phone">Binding phone</string>
|
||||
<string name="task1">TASK1</string>
|
||||
@ -754,8 +754,8 @@
|
||||
<string name="encourage_give_text">Encourage the author of this dynamic article</string>
|
||||
|
||||
<string name="confirm_give">Confirm encouragement</string>
|
||||
<string name="encourage_dynamic">Dynamic encouragement</string>
|
||||
<string name="encourage_dynamic_list">Encouraging records</string>
|
||||
<string name="encourage_dynamic">Rewards</string>
|
||||
<string name="encourage_dynamic_list">Records</string>
|
||||
|
||||
<string name="encourage_list_nodata">The author hasn\'t given encouragement yet T_T</string>
|
||||
|
||||
@ -1249,6 +1249,11 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="lucky_red_envelope">%s drew %s in the lucky red envelope</string>
|
||||
<string name="lucky_red_envelope_amount">number</string>
|
||||
<string name="red_envelope_released_successfully">Red successfully</string>
|
||||
<string name="me_edit_avatar_system">Select System Avatar</string>
|
||||
<string name="me_edit_avatar_system_tip">This function needs to be used to use it after lv.5, please work hard to upgrade ~</string>
|
||||
<string name="main_anchor_live_notify_info">No matter where you are, I am waiting for you in the live broadcast room ~</string>
|
||||
<string name="main_anchor_live_notify_live">Watch</string>
|
||||
<string name="live_notify_settings">LiveNotify</string>
|
||||
<string name="leveling_points">%s experience upgrade,%s receive rewards</string>
|
||||
<string name="reach_the_top">You have reached the highest level!</string>
|
||||
<string name="nothing_in_the_package_yet">There\'s nothing in the package yet</string>
|
||||
|
@ -1244,6 +1244,12 @@
|
||||
<string name="lucky_red_envelope">" %s 在 好運紅包 中抽到了 %s"</string>
|
||||
<string name="lucky_red_envelope_amount">数量</string>
|
||||
<string name="red_envelope_released_successfully">红包发布成功</string>
|
||||
<string name="me_edit_avatar_system">選擇系統頭像</string>
|
||||
<string name="me_edit_avatar_system_tip">該功能需升至Lv.5后使用,請努力升級吧~</string>
|
||||
<string name="main_anchor_live_notify_info">無論你在哪裏,我都在直播間等你~</string>
|
||||
<string name="main_anchor_live_notify_live">围观</string>
|
||||
<string name="live_notify_settings">開播通知</string>
|
||||
|
||||
<string name="leveling_points">升級還需%s經驗值,升至%s即可領取獎勵</string>
|
||||
<string name="reach_the_top">恭喜,你已達到最高等級</string>
|
||||
<string name="nothing_in_the_package_yet">包裹中暫無物品哦</string>
|
||||
|
@ -1243,6 +1243,12 @@
|
||||
<string name="lucky_red_envelope">" %s 在 好運紅包 中抽到了 %s"</string>
|
||||
<string name="lucky_red_envelope_amount">数量</string>
|
||||
<string name="red_envelope_released_successfully">红包发布成功</string>
|
||||
<string name="me_edit_avatar_system">選擇系統頭像</string>
|
||||
<string name="me_edit_avatar_system_tip">該功能需升至Lv.5后使用,請努力升級吧~</string>
|
||||
<string name="main_anchor_live_notify_info">無論你在哪裏,我都在直播間等你~</string>
|
||||
<string name="main_anchor_live_notify_live">围观</string>
|
||||
<string name="live_notify_settings">開播通知</string>
|
||||
|
||||
<string name="leveling_points">升級還需%s經驗值,升至%s即可領取獎勵</string>
|
||||
<string name="reach_the_top">恭喜,你已達到最高等級</string>
|
||||
<string name="nothing_in_the_package_yet">包裹中暫無物品哦</string>
|
||||
|
@ -1244,6 +1244,11 @@
|
||||
<string name="lucky_red_envelope">" %s 在 好運紅包 中抽到了 %s"</string>
|
||||
<string name="lucky_red_envelope_amount">数量</string>
|
||||
<string name="red_envelope_released_successfully">红包发布成功</string>
|
||||
<string name="me_edit_avatar_system">選擇系統頭像</string>
|
||||
<string name="me_edit_avatar_system_tip">該功能需升至Lv.5后使用,請努力升級吧~</string>
|
||||
<string name="main_anchor_live_notify_info">無論你在哪裏,我都在直播間等你~</string>
|
||||
<string name="main_anchor_live_notify_live">围观</string>
|
||||
<string name="live_notify_settings">開播通知</string>
|
||||
<string name="leveling_points">升級還需%s經驗值,升至%s即可領取獎勵</string>
|
||||
<string name="reach_the_top">恭喜,你已達到最高等級</string>
|
||||
<string name="nothing_in_the_package_yet">包裹中暫無物品哦</string>
|
||||
|
@ -62,7 +62,7 @@
|
||||
<string name="edit_profile_update_nickname">ModifyName</string>
|
||||
<string name="edit_profile_update_remarks">Modify remarks</string>
|
||||
<string name="edit_profile_remarks">Please enter comments~</string>
|
||||
<string name="edit_profile_update_sign">Signature modification</string>
|
||||
<string name="edit_profile_update_sign">Signature</string>
|
||||
<string name="edit_profile_sign">autograph</string>
|
||||
<string name="bind_phone">Binding phone</string>
|
||||
<string name="task1">TASK1</string>
|
||||
@ -754,8 +754,8 @@
|
||||
<string name="encourage_give_text">Encourage the author of this dynamic article</string>
|
||||
|
||||
<string name="confirm_give">Confirm encouragement</string>
|
||||
<string name="encourage_dynamic">Dynamic encouragement</string>
|
||||
<string name="encourage_dynamic_list">Encouraging records</string>
|
||||
<string name="encourage_dynamic">Rewards</string>
|
||||
<string name="encourage_dynamic_list">Records</string>
|
||||
|
||||
<string name="encourage_list_nodata">The author hasn\'t given encouragement yet T_T</string>
|
||||
|
||||
@ -1250,6 +1250,11 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="lucky_red_envelope">%s drew %s in the lucky red envelope</string>
|
||||
<string name="lucky_red_envelope_amount">number</string>
|
||||
<string name="red_envelope_released_successfully">>Red successfully</string>
|
||||
<string name="me_edit_avatar_system">Select System Avatar</string>
|
||||
<string name="me_edit_avatar_system_tip">This function needs to be used to use it after lv.5, please work hard to upgrade ~</string>
|
||||
<string name="main_anchor_live_notify_info">No matter where you are, I am waiting for you in the live broadcast room ~</string>
|
||||
<string name="main_anchor_live_notify_live">Watch</string>
|
||||
<string name="live_notify_settings">LiveNotify</string>
|
||||
<string name="leveling_points">%s experience upgrade,%s receive rewards</string>
|
||||
<string name="nothing_in_the_package_yet">There\'s nothing in the package yet</string>
|
||||
<string name="reach_the_top">You have reached the highest level!</string>
|
||||
|
@ -926,7 +926,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (!mIsAnchor) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null && u.getLevel() < mDanMuLevel) {
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_danmu_limit), mDanMuLevel));
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_danmu_limit), mDanMuLevel+""));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -947,7 +947,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
onCoinChanged(coin);
|
||||
}
|
||||
String[] data = new String[]{obj.getString("barragetoken")};
|
||||
SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents);
|
||||
SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents,obj.getIntValue("level_fans"));
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
@ -963,7 +963,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (!mIsAnchor) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null && u.getLevel() < mChatLevel) {
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_chat_limit), mChatLevel));
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_chat_limit), mChatLevel+""));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1277,6 +1277,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
} else {
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid);
|
||||
}
|
||||
bundle.putString("liveUid",mLiveUid);
|
||||
bundle.putString("anchorName",mAncherName);
|
||||
bundle.putString("mStream",mStream);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
}
|
||||
|
@ -1068,6 +1068,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
"?uid=" + userInfo.getId() +
|
||||
"&token=" + userInfo.getToken() + "&anchorUid=" + mLiveUid);
|
||||
}
|
||||
bundle.putString("liveUid",mLiveUid);
|
||||
bundle.putString("anchorName",mAncherName);
|
||||
bundle.putString("mStream",mStream);
|
||||
liveFansFragment.setArguments(bundle);
|
||||
liveFansFragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
break;
|
||||
|
@ -49,6 +49,7 @@ import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
@ -499,6 +500,9 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
} else if (bean.getType() == SYSTEM3_COLOR) {
|
||||
mTextView.setText(Html.fromHtml(bean.getContent()));
|
||||
if (!StringUtil.isEmpty(bean.getBubble())) {
|
||||
new LoadDian9TuUtil().loadDian9Tu(mContext, mBg, bean.getBubble(), 1);
|
||||
}
|
||||
} else {
|
||||
if (bean.getBubble() != null && !bean.getBubble().equals("")) {
|
||||
//加载.9图聊天气泡
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveFansGroupBuyAdapter extends RecyclerView.Adapter<LiveFansGroupBuyAdapter.ViewHolder> {
|
||||
Context mContext;
|
||||
List<FansGroupGiftPackInfo.Gift> list = new ArrayList<>();
|
||||
|
||||
public LiveFansGroupBuyAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
public void setList(List<FansGroupGiftPackInfo.Gift> list) {
|
||||
this.list.clear();
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_fans_group_buy_list, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
holder.setData(list.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView giftIcon;
|
||||
private TextView day;
|
||||
private TextView title;
|
||||
private TextView introduce;
|
||||
private ImageView diamondIcon;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
giftIcon = itemView.findViewById(R.id.giftIcon);
|
||||
day = itemView.findViewById(R.id.day);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
introduce = itemView.findViewById(R.id.introduce);
|
||||
diamondIcon = itemView.findViewById(R.id.diamondIcon);
|
||||
}
|
||||
|
||||
public void setData(FansGroupGiftPackInfo.Gift gift) {
|
||||
title.setText(gift.getGiftName());
|
||||
introduce.setText(gift.getNeedCoin());
|
||||
if (gift.getRestrict() > 0) {
|
||||
day.setText(gift.getRestrict() + mContext.getString(R.string.bonus_day));
|
||||
day.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
day.setVisibility(View.GONE);
|
||||
}
|
||||
try {
|
||||
int i = Integer.parseInt(gift.getNeedCoin());
|
||||
diamondIcon.setVisibility(View.VISIBLE);
|
||||
} catch (Exception e) {
|
||||
diamondIcon.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
ImgLoader.display(mContext, gift.getGiftIcon(), giftIcon);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveFansGroupSendGiftAdapter extends RecyclerView.Adapter<LiveFansGroupSendGiftAdapter.ViewHolder> {
|
||||
Context mContext;
|
||||
List<FansGroupGiftPack> list = new ArrayList<>();
|
||||
private OnItemClickListener<FansGroupGiftPack> onItemClickListener;
|
||||
|
||||
|
||||
public LiveFansGroupSendGiftAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
public void setList(List<FansGroupGiftPack> list) {
|
||||
this.list.clear();
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<FansGroupGiftPack> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public LiveFansGroupSendGiftAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new LiveFansGroupSendGiftAdapter.ViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_fans_group_package_list, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull LiveFansGroupSendGiftAdapter.ViewHolder holder, int position) {
|
||||
holder.setData(list.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView giftIcon;
|
||||
private TextView day;
|
||||
private TextView title;
|
||||
private TextView send;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
giftIcon = itemView.findViewById(R.id.giftIcon);
|
||||
day = itemView.findViewById(R.id.day);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
send = itemView.findViewById(R.id.send);
|
||||
}
|
||||
|
||||
public void setData(FansGroupGiftPack pack) {
|
||||
if (pack.getQuantity() > 0) {
|
||||
title.setText(pack.getGiftName()+" *"+pack.getQuantity());
|
||||
} else {
|
||||
title.setText(pack.getGiftName());
|
||||
}
|
||||
ImgLoader.display(mContext, pack.getIcon(), giftIcon);
|
||||
ViewClicksAntiShake.clicksAntiShake(send, () -> {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(pack, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -15,6 +15,7 @@ public class LiveDanMuBean {
|
||||
private String userNiceName;
|
||||
private String avatar;
|
||||
private String content;
|
||||
private int fensLevel;
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
@ -64,4 +65,12 @@ public class LiveDanMuBean {
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public int getFensLevel() {
|
||||
return fensLevel;
|
||||
}
|
||||
|
||||
public void setFensLevel(int fensLevel) {
|
||||
this.fensLevel = fensLevel;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class HighNobilityDialog extends AbsDialogFragment {
|
||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = DpUtil.dp2px(340);
|
||||
params.height = DpUtil.dp2px(360);
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.gravity = Gravity.CENTER;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
@ -0,0 +1,177 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveContactDetailsSendGiftDialog extends AbsDialogPopupWindow {
|
||||
TextView title;
|
||||
TextView giftName;
|
||||
TextView diamond;
|
||||
ImageView giftIcon;
|
||||
View send;
|
||||
|
||||
int giftId;
|
||||
String anchorName;
|
||||
private String mLiveUid;
|
||||
private String mStream;
|
||||
LiveGiftBean bean;
|
||||
DialogInterface.OnDismissListener onDismissListener;
|
||||
|
||||
public LiveContactDetailsSendGiftDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LiveContactDetailsSendGiftDialog setGiftId(int giftId) {
|
||||
this.giftId = giftId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveContactDetailsSendGiftDialog setLiveUid(String mLiveUid) {
|
||||
this.mLiveUid = mLiveUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveContactDetailsSendGiftDialog setStream(String mStream) {
|
||||
this.mStream = mStream;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveContactDetailsSendGiftDialog setAnchorName(String anchorName) {
|
||||
this.anchorName = anchorName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveContactDetailsSendGiftDialog setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
|
||||
this.onDismissListener = onDismissListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_live_contact_details_gift;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
findViewById(R.id.back).setOnClickListener(v -> dismiss());
|
||||
send = findViewById(R.id.send);
|
||||
ViewClicksAntiShake.clicksAntiShake(send, this::send);
|
||||
|
||||
title = findViewById(R.id.title);
|
||||
giftIcon = findViewById(R.id.gift_icon);
|
||||
giftName = findViewById(R.id.gift_name);
|
||||
diamond = findViewById(R.id.diamond);
|
||||
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveHttpUtil.getNewGiftList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
JSONArray array = obj.getJSONArray("listarray");
|
||||
List<LiveGiftBean> list = new ArrayList<>();
|
||||
for (int i = 0; i < array.size(); i++) {
|
||||
list.addAll(JSONArray.parseArray(array.getJSONObject(i).getJSONArray("giftlist").toJSONString(), LiveGiftBean.class));
|
||||
}
|
||||
for (LiveGiftBean bean : list) {
|
||||
if (bean.getId() == giftId) {
|
||||
setData(bean);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void setData(LiveGiftBean bean) {
|
||||
this.bean = bean;
|
||||
ImgLoader.display(mContext, bean.getIcon(), giftIcon);
|
||||
diamond.setText(bean.getPrice());
|
||||
giftName.setText(bean.getName());
|
||||
Spanned spanned = Html.fromHtml(
|
||||
"<font color='#5993FF'>" + mContext.getString(R.string.live_details_sned_gift_text1) + "</font>" +
|
||||
" <font color='#FFC300'>(" + bean.getName() + ")</font> " +
|
||||
"<font color='#5993FF'>" + mContext.getString(R.string.live_details_sned_gift_text2) + "</font>" +
|
||||
" <font color='#FFC300'>(" + anchorName + ")</font>" +
|
||||
"<font color='#5993FF'>" + mContext.getString(R.string.live_details_sned_gift_text3) + "</font>"
|
||||
);
|
||||
title.setText(spanned);
|
||||
}
|
||||
|
||||
private void send() {
|
||||
LiveHttpUtil.sendGift("0", mLiveUid, mStream, bean.getId(), "1", 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 1001 || code == 1005) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setView(R.layout.dialog_live_unfollow)
|
||||
.setConfirmString(mContext.getString(R.string.charge))
|
||||
.setContent(mContext.getString(R.string.insufficient_balance))
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
LiveContactDetailsSendGiftDialog.this.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
super.onError();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -34,6 +34,9 @@ public class LiveFansFragment extends AbsDialogFragment {
|
||||
|
||||
private WebView mWebView;
|
||||
private Activity mContext;
|
||||
private String anchorName;
|
||||
private String liveUid;
|
||||
private String mStream;
|
||||
|
||||
public LiveFansFragment(Activity mContext) {
|
||||
this.mContext = mContext;
|
||||
@ -103,6 +106,9 @@ public class LiveFansFragment extends AbsDialogFragment {
|
||||
if (bundle == null) {
|
||||
return;
|
||||
}
|
||||
anchorName = bundle.getString("anchorName");
|
||||
liveUid = bundle.getString("liveUid");
|
||||
mStream = bundle.getString("mStream");
|
||||
Log.e("tag", bundle.getString(Constants.URL));
|
||||
mWebView.loadUrl(bundle.getString(Constants.URL));
|
||||
}
|
||||
@ -126,10 +132,28 @@ public class LiveFansFragment extends AbsDialogFragment {
|
||||
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
|
||||
if (LiveRoomViewHolder.mBtnFollow != null && LiveRoomViewHolder.mBtnFollow.getVisibility() == View.VISIBLE) {
|
||||
LiveRoomViewHolder.follow();
|
||||
ToastUtil.show(R.string.live_fans_follow_toast);
|
||||
}
|
||||
//点击 开通粉丝勋章,打开礼物列表送礼物
|
||||
((LiveAudienceActivity) mContext).openGiftWindow(event.getLiveId(), "0");
|
||||
dismiss();
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidFansGroupBuy")) {
|
||||
String id = event.getUserId();
|
||||
new LiveFansGroupBuyDialog(mContext)
|
||||
.setGiftId(id)
|
||||
.setAnchorName(anchorName)
|
||||
.setLiveUid(liveUid)
|
||||
.setSteam(mStream)
|
||||
.showDialog();
|
||||
dismiss();
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidFansGroupPack")) {
|
||||
new LiveFansGroupSendGiftDialog(mContext)
|
||||
.setLiveUid(liveUid)
|
||||
.setStream(mStream)
|
||||
.showDialog();
|
||||
dismiss();
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidFansGroupInfo")) {
|
||||
new LiveFansGroupInfoDialog(mContext).showDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,118 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.dialog.AbsDialogCenterPopupWindow;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveFansGroupBuyAdapter;
|
||||
|
||||
public class LiveFansGroupBuyDialog extends AbsDialogCenterPopupWindow {
|
||||
private TextView anchorName;
|
||||
private TextView buy;
|
||||
private TextView giftInfo;
|
||||
private RecyclerView recyclerView;
|
||||
private LiveFansGroupBuyAdapter adapter;
|
||||
private String id;
|
||||
private String name;
|
||||
private String liveUid;
|
||||
private String mSteam;
|
||||
|
||||
public LiveFansGroupBuyDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LiveFansGroupBuyDialog setGiftId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveFansGroupBuyDialog setAnchorName(String anchorName) {
|
||||
this.name = anchorName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveFansGroupBuyDialog setLiveUid(String liveUid) {
|
||||
this.liveUid = liveUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveFansGroupBuyDialog setSteam(String mSteam) {
|
||||
this.mSteam = mSteam;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.popupWidth(DpUtil.dp2px(370));
|
||||
builder.maxWidth(DpUtil.dp2px(370));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_fans_group_buy;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
anchorName = findViewById(R.id.anchorName);
|
||||
giftInfo = findViewById(R.id.giftInfo);
|
||||
buy = findViewById(R.id.buy);
|
||||
recyclerView = findViewById(R.id.giftList);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext,LinearLayoutManager.HORIZONTAL,false){
|
||||
@Override
|
||||
public boolean canScrollHorizontally() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
adapter = new LiveFansGroupBuyAdapter(mContext);
|
||||
recyclerView.setAdapter(adapter);
|
||||
anchorName.setText(name);
|
||||
buy.setOnClickListener(v -> {
|
||||
LiveNetManager.get(mContext)
|
||||
.buyFansExclusivePack(liveUid, id,mSteam, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getFansExclusivePack(liveUid, id, new HttpCallback<FansGroupGiftPackInfo>() {
|
||||
@Override
|
||||
public void onSuccess(FansGroupGiftPackInfo data) {
|
||||
adapter.setList(data.getData());
|
||||
giftInfo.setText(data.getDescription());
|
||||
buy.setText(String.format(mContext.getString(R.string.live_fans_group_buy_buy), data.getCoin()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.dialog.AbsDialogCenterPopupWindow;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveFansGroupInfoDialog extends AbsDialogCenterPopupWindow {
|
||||
public LiveFansGroupInfoDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.popupWidth(DpUtil.dp2px(370));
|
||||
builder.maxWidth(DpUtil.dp2px(370));
|
||||
builder.dismissOnTouchOutside(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_fans_group_info;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
findViewById(R.id.colse).setOnClickListener(v -> dismiss());
|
||||
}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.dialog.AbsDialogCenterPopupWindow;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveFansGroupSendGiftAdapter;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LiveFansGroupSendGiftDialog extends AbsDialogCenterPopupWindow {
|
||||
private RecyclerView recyclerView;
|
||||
private LiveFansGroupSendGiftAdapter adapter;
|
||||
private String liveUid;
|
||||
private String mStream;
|
||||
|
||||
public LiveFansGroupSendGiftDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LiveFansGroupSendGiftDialog setLiveUid(String liveUid) {
|
||||
this.liveUid = liveUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveFansGroupSendGiftDialog setStream(String mStream) {
|
||||
this.mStream = mStream;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.popupWidth(DpUtil.dp2px(370));
|
||||
builder.maxWidth(DpUtil.dp2px(370));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_fans_group_send;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
recyclerView = findViewById(R.id.giftList);
|
||||
adapter = new LiveFansGroupSendGiftAdapter(mContext);
|
||||
adapter.setOnItemClickListener((bean, position) -> {
|
||||
LiveHttpUtil.sendGift("0",
|
||||
liveUid,
|
||||
mStream,
|
||||
bean.getId(),
|
||||
"1",
|
||||
0,
|
||||
true,
|
||||
new com.yunbao.common.http.HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
ToastUtil.show(msg);
|
||||
System.err.println(">>>>>>>>>>>>>>>>>> code = " + code + "|msg = " + msg + "");
|
||||
if (code == 0) {
|
||||
// dismiss();
|
||||
initData();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
recyclerView.setAdapter(adapter);
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.userFansExclusivePackList(liveUid, new HttpCallback<List<FansGroupGiftPack>>() {
|
||||
@Override
|
||||
public void onSuccess(List<FansGroupGiftPack> data) {
|
||||
adapter.setList(data);
|
||||
if (data.size() == 0) {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -132,6 +132,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
EventBus.getDefault().post("checkNewLetter");
|
||||
Bus.getOff(this);
|
||||
|
||||
}
|
||||
|
@ -619,15 +619,17 @@ public class LiveHttpUtil {
|
||||
* 观众给主播送礼物
|
||||
*/
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, HttpCallback callback) {
|
||||
sendGift(by, liveUid, stream, giftId, giftCount, 0, callback);
|
||||
sendGift(by, liveUid, stream, giftId, giftCount, 0, false,callback);
|
||||
}
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
|
||||
sendGift(by, liveUid, stream, giftId, giftCount, isContactGift, false,callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 观众给主播送礼物
|
||||
*
|
||||
* @param isContactGift 是否为联系方式礼物
|
||||
*/
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift,HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
@ -635,6 +637,7 @@ public class LiveHttpUtil {
|
||||
.params("isContactGift", isContactGift)
|
||||
.params("giftcount", giftCount)
|
||||
.params("isprank", by)
|
||||
.params("fans_exclusive_pack",isFansGroupGift?"1":"0")
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.yunbao.live.interfaces;
|
||||
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
|
||||
public interface IDanmuActionListener {
|
||||
void onCanNext(int lineNum);
|
||||
|
||||
void onAnimEnd(AbsViewHolder vh);
|
||||
}
|
@ -1,10 +1,14 @@
|
||||
package com.yunbao.live.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.live.bean.LiveDanMuBean;
|
||||
import com.yunbao.live.interfaces.IDanmuActionListener;
|
||||
import com.yunbao.live.views.DanmuViewHolder;
|
||||
import com.yunbao.live.views.FansDanmuViewHolder;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@ -15,13 +19,14 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
* 弹幕
|
||||
*/
|
||||
|
||||
public class LiveDanmuPresenter implements DanmuViewHolder.ActionListener {
|
||||
public class LiveDanmuPresenter implements IDanmuActionListener {
|
||||
|
||||
private Context mContext;
|
||||
private ViewGroup mDanmuContainer;
|
||||
private boolean[] mLines;//弹幕的轨道
|
||||
private List<DanmuViewHolder> mList;
|
||||
private ConcurrentLinkedQueue<LiveDanMuBean> mQueue;
|
||||
private static final String TAG = "弹幕";
|
||||
|
||||
public LiveDanmuPresenter(Context context, ViewGroup danmuContainer) {
|
||||
mContext = context;
|
||||
@ -56,7 +61,11 @@ public class LiveDanmuPresenter implements DanmuViewHolder.ActionListener {
|
||||
}
|
||||
}
|
||||
if (danmuHolder == null) {
|
||||
danmuHolder = new DanmuViewHolder(mContext, mDanmuContainer);
|
||||
if (bean.getFensLevel() >= 16) {
|
||||
danmuHolder = new FansDanmuViewHolder(mContext, mDanmuContainer);
|
||||
} else {
|
||||
danmuHolder = new DanmuViewHolder(mContext, mDanmuContainer);
|
||||
}
|
||||
danmuHolder.setActionListener(this);
|
||||
mList.add(danmuHolder);
|
||||
}
|
||||
@ -100,7 +109,7 @@ public class LiveDanmuPresenter implements DanmuViewHolder.ActionListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimEnd(DanmuViewHolder vh) {
|
||||
public void onAnimEnd(AbsViewHolder vh) {
|
||||
if (mQueue.size() == 0) {
|
||||
if (vh != null) {
|
||||
vh.release();
|
||||
|
@ -215,6 +215,9 @@ public class SocketRyChatUtil {
|
||||
* 发送弹幕消息
|
||||
*/
|
||||
public static void sendDanmuMessage(String mLiveUid, String danmuToken) {
|
||||
sendDanmuMessage(mLiveUid,danmuToken,0);
|
||||
}
|
||||
public static void sendDanmuMessage(String mLiveUid, String danmuToken,int fansLevel) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u == null) {
|
||||
return;
|
||||
@ -227,6 +230,7 @@ public class SocketRyChatUtil {
|
||||
.param("uname", u.getUserNiceName())
|
||||
.param("uid", u.getId())
|
||||
.param("uhead", u.getAvatar())
|
||||
.param("fansLevel",fansLevel)
|
||||
.param("ct", danmuToken);
|
||||
msg.create();
|
||||
String targetId = "g" + mLiveUid;
|
||||
|
@ -403,6 +403,9 @@ public class SocketRyClient {
|
||||
liveDanMuBean2.setAvatar(map.getString("uhead"));
|
||||
liveDanMuBean2.setUserNiceName(map.getString("uname"));
|
||||
liveDanMuBean2.setContent(map.getString("ct"));
|
||||
if(map.containsKey("fansLevel")){
|
||||
liveDanMuBean2.setFensLevel(map.getInteger("fansLevel"));
|
||||
}
|
||||
mListener.onSendDanMu(liveDanMuBean2);
|
||||
break;
|
||||
case Constants.SOCKET_LEAVE_ROOM://离开房间
|
||||
@ -918,6 +921,8 @@ public class SocketRyClient {
|
||||
chatBean.setMedalNmae(obj.getString("medal_name"));
|
||||
chatBean.setUserNiceName(obj.getString("user_nicename"));//名字
|
||||
FansMedalBean fansMedalBean = CommonAppConfig.getInstance().getAnchorFansMedal(obj.getIntValue("medal_level"));
|
||||
u.setFansLevel(obj.getIntValue("medal_level"));
|
||||
u.setFansEnterRoomUrl(obj.getString("medal_backgroup_thumb"));
|
||||
if (fansMedalBean != null)
|
||||
chatBean.setMedalLevelImageUrl(fansMedalBean.getThumb());
|
||||
mListener.onEnterRoom(new LiveEnterRoomBean(u, chatBean));
|
||||
|
@ -18,6 +18,7 @@ import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveDanMuBean;
|
||||
import com.yunbao.live.interfaces.IDanmuActionListener;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/25.
|
||||
@ -40,7 +41,7 @@ public class DanmuViewHolder extends AbsViewHolder {
|
||||
private Animator.AnimatorListener mAnimatorListener;
|
||||
private boolean mCanNext;//是否可以有下一个
|
||||
private boolean mIdle;//是否空闲
|
||||
private ActionListener mActionListener;
|
||||
private IDanmuActionListener mActionListener;
|
||||
private int mLineNum;
|
||||
|
||||
public DanmuViewHolder(Context context, ViewGroup parentView) {
|
||||
@ -115,7 +116,7 @@ public class DanmuViewHolder extends AbsViewHolder {
|
||||
mIdle = idle;
|
||||
}
|
||||
|
||||
public void setActionListener(ActionListener actionListener) {
|
||||
public void setActionListener(IDanmuActionListener actionListener) {
|
||||
mActionListener = actionListener;
|
||||
}
|
||||
|
||||
@ -127,9 +128,4 @@ public class DanmuViewHolder extends AbsViewHolder {
|
||||
mActionListener = null;
|
||||
}
|
||||
|
||||
public interface ActionListener {
|
||||
void onCanNext(int lineNum);
|
||||
|
||||
void onAnimEnd(DanmuViewHolder vh);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,131 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveDanMuBean;
|
||||
import com.yunbao.live.interfaces.IDanmuActionListener;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/25.
|
||||
* 弹幕
|
||||
*/
|
||||
|
||||
public class FansDanmuViewHolder extends DanmuViewHolder {
|
||||
|
||||
private static final float SPEED = 0.2f;//弹幕的速度,这个值越小,弹幕走的越慢
|
||||
private static final int MARGIN_TOP = DpUtil.dp2px(150);
|
||||
private static final int SPACE = DpUtil.dp2px(50);
|
||||
private static final int DP_15 = DpUtil.dp2px(15);
|
||||
private ImageView mAvatar;
|
||||
private TextView mName;
|
||||
private TextView mContent;
|
||||
private int mScreenWidth;//屏幕宽度
|
||||
private int mWidth;//控件的宽度
|
||||
private ValueAnimator mAnimator;
|
||||
private ValueAnimator.AnimatorUpdateListener mUpdateListener;
|
||||
private Animator.AnimatorListener mAnimatorListener;
|
||||
private boolean mCanNext;//是否可以有下一个
|
||||
private boolean mIdle;//是否空闲
|
||||
private IDanmuActionListener mActionListener;
|
||||
private int mLineNum;
|
||||
|
||||
public FansDanmuViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_gift_danmu_fans;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||
mName = (TextView) findViewById(R.id.name);
|
||||
mContent = (TextView) findViewById(R.id.content);
|
||||
mScreenWidth = ScreenDimenUtil.getInstance().getScreenWdith();
|
||||
mUpdateListener = new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
float v = (float) animation.getAnimatedValue();
|
||||
mContentView.setX(v);
|
||||
if (!mCanNext && v <= mScreenWidth - mWidth - DP_15) {
|
||||
mCanNext = true;
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onCanNext(mLineNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
mAnimatorListener = new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
removeFromParent();
|
||||
mIdle = true;
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onAnimEnd(FansDanmuViewHolder.this);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void show(LiveDanMuBean bean, int lineNum) {
|
||||
mLineNum = lineNum;
|
||||
ImgLoader.display(mContext,bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName()+":");
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
mName.setTextColor(Color.parseColor(levelBean.getColor()));
|
||||
}
|
||||
mContent.setText(bean.getContent());
|
||||
mCanNext = false;
|
||||
mContentView.measure(0, 0);
|
||||
mWidth = mContentView.getMeasuredWidth();
|
||||
mContentView.setX(mScreenWidth);
|
||||
mContentView.setY(MARGIN_TOP + lineNum * SPACE);
|
||||
addToParent();
|
||||
mAnimator = ValueAnimator.ofFloat(mScreenWidth, -mWidth);
|
||||
mAnimator.addUpdateListener(mUpdateListener);
|
||||
mAnimator.setInterpolator(new LinearInterpolator());
|
||||
mAnimator.setDuration((int) ((mScreenWidth + mWidth) / SPEED));
|
||||
mAnimator.addListener(mAnimatorListener);
|
||||
mAnimator.start();
|
||||
}
|
||||
|
||||
public boolean isIdle() {
|
||||
return mIdle;
|
||||
}
|
||||
|
||||
public void setIdle(boolean idle) {
|
||||
mIdle = idle;
|
||||
}
|
||||
|
||||
public void setActionListener(IDanmuActionListener actionListener) {
|
||||
mActionListener = actionListener;
|
||||
}
|
||||
|
||||
public void release() {
|
||||
if (mAnimator != null) {
|
||||
mAnimator.cancel();
|
||||
}
|
||||
removeFromParent();
|
||||
mActionListener = null;
|
||||
}
|
||||
|
||||
}
|
@ -13,6 +13,7 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
@ -148,10 +149,12 @@ import com.yunbao.live.custom.LiveLightView;
|
||||
import com.yunbao.live.custom.RightGradual;
|
||||
import com.yunbao.live.custom.TopGradual;
|
||||
import com.yunbao.live.dialog.GiftWallDialog;
|
||||
import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGameDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
|
||||
import com.yunbao.live.dialog.ReceiveRendPacketPopup;
|
||||
@ -323,6 +326,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private LinearLayout lt_trickery;
|
||||
private TextView tv_trickery_time;
|
||||
private FrameLayout enterRoomLeave, enterRoomBg;
|
||||
private ConstraintLayout fans_enter_room_leave;
|
||||
private RecyclerView fastMsgRecyclerView;
|
||||
private LiveRoomFastMessageRecyclerViewAdapter fastMessageRecyclerViewAdapter;
|
||||
|
||||
@ -449,6 +453,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if("checkNewLetter".equals(str)){
|
||||
checkNewLetter();
|
||||
}
|
||||
}
|
||||
|
||||
@ -891,6 +897,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
});
|
||||
mAnchorSay.setOnLongClickListener(v -> {
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
btnEvent = findViewById(R.id.btn_event);
|
||||
fullScreen = (FullServiceNotificationView) findViewById(R.id.full_screen);
|
||||
noble = (NobleNoticeView) findViewById(R.id.noble);
|
||||
@ -899,6 +911,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
btn_event2 = (LinearLayout) findViewById(R.id.btn_event2);
|
||||
btn_event4 = (LinearLayout) findViewById(R.id.btn_event4);
|
||||
enterRoomLeave = (FrameLayout) findViewById(R.id.enter_room_leave);
|
||||
fans_enter_room_leave = (ConstraintLayout) findViewById(R.id.fans_enter_room_leave);
|
||||
enterRoomBg = (FrameLayout) findViewById(R.id.enter_room_bg);
|
||||
enterRoomLeave2 = (LinearLayout) findViewById(R.id.enter_room_leave2);
|
||||
mBanner1 = (Banner) findViewById(R.id.banner1);
|
||||
@ -1648,6 +1661,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
updataCleanMic();
|
||||
// initStarChallengeStatus();
|
||||
enterRoomLeave.setVisibility(View.GONE);
|
||||
fans_enter_room_leave.setVisibility(View.GONE);
|
||||
topBanner1.setVisibility(View.GONE);
|
||||
topBanner2.setVisibility(View.GONE);
|
||||
topBanner1.update(mTopBannerList);
|
||||
@ -4893,6 +4907,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
|
||||
enterRoomLeave.setLayoutParams(enterRoomParams);
|
||||
fans_enter_room_leave.setLayoutParams(enterRoomParams);
|
||||
|
||||
|
||||
}
|
||||
@ -4905,6 +4920,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
userName.setText(String.format(mContext.getString(R.string.come_hint), model.getUserNiceName()));
|
||||
ImgLoader.display(mContext, model.getAvatar(), imageAvatar);
|
||||
int level = model.getLevel();
|
||||
if (!StringUtil.isEmpty(model.getFansEnterRoomUrl())) {
|
||||
showFansGroupEnterRoom(model);
|
||||
return;
|
||||
}
|
||||
if (level < 50) {
|
||||
enterRoomLeave.setBackgroundResource(R.drawable.background_30);
|
||||
enterRoomLeave2.setBackgroundResource(R.drawable.bg_30_leave);
|
||||
@ -4963,6 +4982,72 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
private void showFansGroupEnterRoom(LiveUserGiftBean model) {
|
||||
|
||||
fans_enter_room_leave.post(() -> {
|
||||
TextView userName = fans_enter_room_leave.findViewById(R.id.user_name);
|
||||
ImageView bg = fans_enter_room_leave.findViewById(R.id.bg);
|
||||
|
||||
userName.setText(Html.fromHtml(String.format("@<font color='#99D5FF'>%s</font> %s",
|
||||
model.getUserNiceName(),
|
||||
mContext.getString(R.string.live_fans_group_enter_room)
|
||||
)));
|
||||
ImgLoader.display(mContext, model.getFansEnterRoomUrl(), bg);
|
||||
fans_enter_room_leave.setVisibility(View.VISIBLE);
|
||||
TranslateAnimation animationTranslate = new TranslateAnimation(DeviceUtils.getScreenWidth((Activity) mContext), 0, 0, 0);
|
||||
AnimationSet animationSet1 = new AnimationSet(true);
|
||||
animationSet1.addAnimation(animationTranslate);
|
||||
animationSet1.setFillAfter(true);
|
||||
animationSet1.setDuration(500);
|
||||
animationSet1.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
});
|
||||
fans_enter_room_leave.startAnimation(animationSet1);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏粉丝团入场提示
|
||||
*/
|
||||
public void hideFansGroupEnter() {
|
||||
if (fans_enter_room_leave.getVisibility() == View.GONE) return;
|
||||
TranslateAnimation animationTranslate = new TranslateAnimation(0, -(fans_enter_room_leave.getMeasuredWidth() + DpUtil.dp2px(6)), 0, 0);
|
||||
AnimationSet animationSet1 = new AnimationSet(true);
|
||||
animationSet1.addAnimation(animationTranslate);
|
||||
animationSet1.setFillAfter(true);
|
||||
animationSet1.setDuration(100);
|
||||
animationSet1.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
fans_enter_room_leave.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
});
|
||||
fans_enter_room_leave.startAnimation(animationSet1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏高等级入场提示
|
||||
*/
|
||||
@ -5138,13 +5223,25 @@ 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 -> {
|
||||
checkNewLetter();
|
||||
loading.dismiss();
|
||||
})
|
||||
.showDialog();
|
||||
return;
|
||||
}
|
||||
new LiveContactDetailsSendGiftDialog(mContext)
|
||||
.setGiftId(data.getGiftId())
|
||||
.setAnchorName(mAnchorName)
|
||||
.setStream(mStream)
|
||||
.setLiveUid(mLiveUid)
|
||||
.setOnDismissListener(dialog1 -> {
|
||||
checkNewLetter();
|
||||
})
|
||||
.showDialog();
|
||||
loading.dismiss();
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setmWishGiftId(data.getGiftId() + "")
|
||||
.setIsContactGift(true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -5206,15 +5303,25 @@ 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 -> {
|
||||
checkNewLetter();
|
||||
loading.dismiss();
|
||||
})
|
||||
.showDialog();
|
||||
return;
|
||||
}
|
||||
new LiveContactDetailsSendGiftDialog(mContext)
|
||||
.setGiftId(data.getGiftId())
|
||||
.setAnchorName(mAnchorName)
|
||||
.setStream(mStream)
|
||||
.setLiveUid(mLiveUid)
|
||||
.setOnDismissListener(dialog1 -> {
|
||||
checkNewLetter();
|
||||
})
|
||||
.showDialog();
|
||||
loading.dismiss();
|
||||
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setmWishGiftId(data.getGiftId() + "")
|
||||
.setIsContactGift(true));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -5299,6 +5406,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
return;
|
||||
}
|
||||
}
|
||||
((LiveAudienceActivity) mContext).showMsgRed(-1);
|
||||
|
||||
}
|
||||
|
||||
@ -5319,4 +5427,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mLiveGiftAnimPresenter.showSendGiftAnimAllServer2(receiveGiftBean);
|
||||
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid, mStream);
|
||||
}
|
||||
|
||||
public void sendWelcomeFans() {
|
||||
LiveChatBean chatBean = new LiveChatBean();
|
||||
chatBean.setContent("123123<font color='#FF8E43'>test</font>1243");
|
||||
chatBean.setType(LiveChatBean.SYSTEM3_COLOR);
|
||||
chatBean.setBubble("https://downs.yaoulive.com/20230322/g2_.9.png");
|
||||
insertChat(chatBean, 1);
|
||||
}
|
||||
}
|
||||
|
@ -1098,6 +1098,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public void run() {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.hideHighGrade();
|
||||
mLiveRoomViewHolder.hideFansGroupEnter();
|
||||
}
|
||||
enterRoomLeaveHandler.post(enterRoomLeaveRunnable);
|
||||
}
|
||||
@ -1122,7 +1123,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
LiveChatBean liveChatBean = bean.getLiveChatBean();
|
||||
LiveUserGiftBean liveUserGiftBean = bean.getUserBean();
|
||||
int level = liveUserGiftBean.getLevel();
|
||||
if (level >= 30) {
|
||||
if (level >= 30 || liveUserGiftBean.getFansLevel() >= 10) {
|
||||
//高等级飘屏
|
||||
liveUserGiftBean.setUserNiceName(liveChatBean.getUserNiceName());
|
||||
enterRoomModel.add(liveUserGiftBean);
|
||||
|
9
live/src/main/res/drawable/background_d6e8fe.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:topLeftRadius="30dp" android:topRightRadius="30dp"/>
|
||||
<solid android:color="#D6E8FE" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="9dp" />
|
||||
<solid android:color="#FEF9ED" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="96dp" android:height="22dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="#00000000" />
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#FFC300" android:endColor="#FFA900" android:angle="225" />
|
||||
<corners android:topLeftRadius="22dp" android:topRightRadius="22dp" android:bottomLeftRadius="22dp" android:bottomRightRadius="22dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="96dp" android:height="22dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="#00000000" />
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#E1E1E1" android:endColor="#E1E1E1" android:angle="270" />
|
||||
<corners android:topLeftRadius="22dp" android:topRightRadius="22dp" android:bottomLeftRadius="22dp" android:bottomRightRadius="22dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
94
live/src/main/res/layout/dialog_fans_group_buy.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="350dp"
|
||||
android:background="@mipmap/bg_fans_group_buy_dialog">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/anchorName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="37dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:textColor="#8670F5"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/giftName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="主播昵稱" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/giftName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anchorName"
|
||||
android:text="@string/live_fans_group_buy_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/giftInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="9dp"
|
||||
android:textColor="#B3000000"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/giftName"
|
||||
android:text="@string/live_fans_group_buy_info" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/giftList"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="19dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:orientation="horizontal"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/giftInfo"
|
||||
app:layout_constraintWidth_max="310dp"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_fans_group_buy_list" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/buy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="29dp"
|
||||
android:background="@mipmap/icon_fans_group_buy_dialog_buy"
|
||||
android:paddingStart="9dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="9dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/giftList"
|
||||
android:text="@string/live_fans_group_buy_buy" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
86
live/src/main/res/layout/dialog_fans_group_info.xml
Normal file
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="350dp"
|
||||
android:background="@mipmap/bg_fans_group_buy_dialog">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info_title" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info_text1" />
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info_text2" />
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info_text3" />
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info_text4" />
|
||||
|
||||
<TextView
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info2_title" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info2_text1" />
|
||||
<TextView
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/live_fans_group_info2_text2" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/colse"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:src="@mipmap/ic_live_fans_group_info_colse"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
52
live/src/main/res/layout/dialog_fans_group_send.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="480dp"
|
||||
android:background="@mipmap/bg_fans_group_buy_dialog">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/anchorName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="37dp"
|
||||
android:textColor="#8670F5"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="@string/live_fans_group_send_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/giftList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anchorName"
|
||||
tools:itemCount="4"
|
||||
app:spanCount="3"
|
||||
tools:listitem="@layout/item_fans_group_package_list" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
144
live/src/main/res/layout/dialog_live_contact_details_gift.xml
Normal file
@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/background_d6e8fe">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="22.5dp"
|
||||
android:layout_marginTop="7dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_contact_details_back" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="235dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginBottom="19dp"
|
||||
android:background="@mipmap/bg_live_user_mailbox"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="#3399FF"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="赠送时光怀表会获得到用户_98274的信件与联系方式" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28.5dp"
|
||||
android:layout_marginBottom="6.5dp"
|
||||
android:gravity="start"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="bottom"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="10sp"
|
||||
tools:text="TextView" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@mipmap/diamond" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/diamond"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="10sp"
|
||||
tools:text="20000" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="28.5dp"
|
||||
android:layout_marginBottom="13.5dp"
|
||||
android:background="@drawable/bg_item_live_send_details_gift"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="@string/live_details_send_gift_btn"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
84
live/src/main/res/layout/item_fans_group_buy_list.xml
Normal file
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="125dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@mipmap/icon_fans_group_buy_dialog_item">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/iconLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="73dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/bg_fans_group_buy_dialog_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/giftIcon"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="60dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/diamond" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/day"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@mipmap/icon_fans_group_buy_dialog_day"
|
||||
android:gravity="center"
|
||||
android:textColor="#7059BB"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="1天"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/introduce"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="浪漫啓航 *1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/introduce"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="5200" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/diamondIcon"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/introduce"
|
||||
app:layout_constraintEnd_toStartOf="@+id/introduce"
|
||||
app:layout_constraintTop_toTopOf="@+id/introduce"
|
||||
app:srcCompat="@mipmap/diamond" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
92
live/src/main/res/layout/item_fans_group_package_list.xml
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="155dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginBottom="19dp">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout4"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@mipmap/icon_fans_group_buy_dialog_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/iconLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="73dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:background="@drawable/bg_fans_group_buy_dialog_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/giftIcon"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="60dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/diamond" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iconLayout"
|
||||
tools:text="浪漫啓航 *1" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/day"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@mipmap/icon_fans_group_buy_dialog_day"
|
||||
android:gravity="center"
|
||||
android:textColor="#7059BB"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="1天"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:background="@mipmap/bg_funs_group_send_dialog_item"
|
||||
android:paddingStart="13dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="13dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textColor="#E6FFFFFF"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout4"
|
||||
android:text="@string/live_fans_group_send_sub" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/fans_enter_room_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/live_zt"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/come_hint"
|
||||
android:textColor="#fff"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="340dp"
|
||||
android:layout_height="75dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@mipmap/bg_funs_live_anchor_start">
|
||||
|
||||
<com.yunbao.common.custom.RatioRoundImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:src="@mipmap/icon_green_science"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:ri_ratio="0.5"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/anchorName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/main_anchor_live_notify_info"
|
||||
android:textSize="13sp"
|
||||
android:textColor="#CCFFFFFF"
|
||||
app:layout_constraintStart_toStartOf="@+id/anchorName"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anchorName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/liveGo"
|
||||
android:layout_width="41dp"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:background="@mipmap/bg_funs_live_go_start"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFEF3"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/main_anchor_live_notify_live"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
69
live/src/main/res/layout/view_gift_danmu_fans.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="27dp"
|
||||
android:background="@mipmap/bg_fans_danmu"
|
||||
android:gravity="center">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginStart="1dp">
|
||||
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:padding="7dp"
|
||||
android:src="@mipmap/beauty_jingbai"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_border_color="@color/white"
|
||||
app:riv_border_width="1dp"
|
||||
app:riv_oval="true" />
|
||||
<ImageView
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@mipmap/icon_fans_danmu_avatar"
|
||||
android:scaleType="centerInside"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/avatar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="visible"
|
||||
tools:text="用戶昵稱:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
android:visibility="visible"
|
||||
tools:text="彈幕~" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="370dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/viptip_box"
|
||||
android:orientation="vertical">
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
@ -60,9 +61,9 @@
|
||||
android:layout_marginStart="20dp"
|
||||
android:background="@drawable/bg_btn_common"
|
||||
android:enabled="true"
|
||||
android:paddingStart="48dp"
|
||||
android:paddingStart="30dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingEnd="48dp"
|
||||
android:paddingEnd="30dp"
|
||||
android:paddingBottom="15dp"
|
||||
android:text="@string/go_nobility"
|
||||
android:textColor="@color/white"
|
||||
|
@ -223,6 +223,15 @@
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginBottom="-350dp"
|
||||
android:visibility="gone" />
|
||||
<include
|
||||
android:id="@+id/fans_enter_room_leave"
|
||||
layout="@layout/view_fans_group_enter_room_leave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/chat_recyclerView"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginBottom="-350dp"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
BIN
live/src/main/res/mipmap-xhdpi/ic_contact_details_back.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
live/src/main/res/mipmap-xhdpi/ic_live_fans_group_info_colse.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_fans_danmu_avatar.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/bg_fans_danmu.9.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/bg_fans_group_buy_dialog.png
Normal file
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 6.0 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/bg_funs_live_anchor_start.png
Normal file
After Width: | Height: | Size: 150 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/bg_funs_live_go_start.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 49 KiB |
@ -93,4 +93,26 @@
|
||||
<string name="minute">Minute</string>
|
||||
<string name="live_setting_silence_title">Please select</string>
|
||||
<string name="live_ban_tip">You have been banned</string>
|
||||
<string name="live_details_send_gift_btn">Confirm</string>
|
||||
<string name="live_details_sned_gift_text1">Give</string>
|
||||
<string name="live_details_sned_gift_text2">obtain the</string>
|
||||
<string name="live_details_sned_gift_text3">\'s letter and contact information</string>
|
||||
<string name="me_edit_avatar_title">Select Avatar</string>
|
||||
<string name="me_edit_avatar_submit">Confirm</string>
|
||||
<string name="live_fans_group_info_text1">1 The fan exclusive gift pack is an exclusive benefit for fan group users, which can quickly increase their companionship with the host after purchase</string>
|
||||
<string name="live_fans_group_info_text2">2 Limited edition anchor gift (to protect you and love you dearly) is included in the Cherish Gift Bag and Zhenai Gift Bag. After purchase, it is placed in the fan gift backpack</string>
|
||||
<string name="live_fans_group_info_text3">3 The exclusive gift package is bound to the anchor in a one-on-one relationship, and purchasing gift resources in the exclusive gift package can only be given to the anchor</string>
|
||||
<string name="live_fans_group_info_text4">4 The gift resources in the gift package are valid for 30 days and can be given normally during the validity period; Gift resources become invalid and cannot be given after expiration</string>
|
||||
<string name="live_fans_group_info2_text1">1 Purchase can only be made once a month, and the gift package will be distributed in real-time after purchase</string>
|
||||
<string name="live_fans_group_info2_text2">2. The final interpretation rights of this gift package belong to PD Live</string>
|
||||
<string name="live_fans_group_info_title">Introduction</string>
|
||||
<string name="live_fans_group_info2_title">Rules</string>
|
||||
<string name="live_fans_follow_toast">Join the fan group and unlock exclusive gifts</string>
|
||||
<string name="live_fans_group_send_sub">Gift</string>
|
||||
<string name="live_fans_group_send_title">Currently Available To Send</string>
|
||||
<string name="live_fans_group_buy_title">The Perfect GiftPack</string>
|
||||
<string name="live_fans_group_buy_info">Purchase a %s Diamond Specific Gift And Receive ALimited Resource</string>
|
||||
<string name="live_fans_group_buy_buy">%s Diamond</string>
|
||||
<string name="live_fans_group_enter_room">Welcome fan group to enter the room</string>
|
||||
<string name="live_fans_group_send_gift_tips">Fan group level Of Lv%s Can send this gift</string>
|
||||
</resources>
|
@ -91,4 +91,26 @@
|
||||
<string name="minute">分鐘</string>
|
||||
<string name="live_setting_silence_title">請選擇禁言時間</string>
|
||||
<string name="live_ban_tip">您已被禁言</string>
|
||||
<string name="live_details_send_gift_btn">確認獲取</string>
|
||||
<string name="live_details_sned_gift_text1">贈送</string>
|
||||
<string name="live_details_sned_gift_text2">會獲取到</string>
|
||||
<string name="live_details_sned_gift_text3">的信件與聯繫方式</string>
|
||||
<string name="me_edit_avatar_title">選擇頭像</string>
|
||||
<string name="me_edit_avatar_submit">確認使用</string>
|
||||
<string name="live_fans_group_info_text1">1. 粉絲專屬禮包為粉絲團用戶專屬權益,購買後可 快速提昇與該主播的陪伴值</string>
|
||||
<string name="live_fans_group_info_text2">2. 珍愛禮包、臻愛禮包中包入限量主播禮物(守護 你,摯愛你),開啟后立即發放到包裹中</string>
|
||||
<string name="live_fans_group_info_text3">3. 專屬禮包與主播為 1 對 1 綁定關係,購買專屬 禮包中禮物資源只可送給該主播</string>
|
||||
<string name="live_fans_group_info_text4">4. 禮包中禮物資源有效期 30 天,有效期內均可正 常贈送;過期後禮物資源失效不可贈送</string>
|
||||
<string name="live_fans_group_info2_text1">1. 當月只可購買一次,購買后禮包实时發放</string>
|
||||
<string name="live_fans_group_info2_text2">2. 该禮包最終解釋權歸 PD Live 所有</string>
|
||||
<string name="live_fans_group_info_title">禮包介紹</string>
|
||||
<string name="live_fans_group_info2_title">購買規則</string>
|
||||
<string name="live_fans_follow_toast">加入粉絲團,解鎖專屬禮物</string>
|
||||
<string name="live_fans_group_send_sub">赠送</string>
|
||||
<string name="live_fans_group_send_title">當前可送出</string>
|
||||
<string name="live_fans_group_buy_title">的臻愛禮包</string>
|
||||
<string name="live_fans_group_buy_info">購買可獲得%s鑽特定禮物,同時可獲得限定資源</string>
|
||||
<string name="live_fans_group_buy_buy">%s鑽購買</string>
|
||||
<string name="live_fans_group_enter_room">粉絲團成員歡迎進房</string>
|
||||
<string name="live_fans_group_send_gift_tips">粉絲團等級達到 Lv%s 可送出該禮物</string>
|
||||
</resources>
|
||||
|
@ -156,6 +156,8 @@
|
||||
<activity
|
||||
android:name=".activity.RedPacketUsersActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".activity.UserAvatarSelectActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -36,6 +36,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.ActivityResultCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.CityUtil;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
@ -414,13 +415,19 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
private void editAvatar() {
|
||||
DialogUitl.showStringArrayDialog(mContext, new Integer[]{
|
||||
R.string.camera, R.string.alumb}, new DialogUitl.StringArrayDialogCallback() {
|
||||
R.string.camera, R.string.alumb, R.string.me_edit_avatar_system}, new DialogUitl.StringArrayDialogCallback() {
|
||||
@Override
|
||||
public void onItemClick(String text, int tag) {
|
||||
if (Integer.parseInt(IMLoginManager.get(mContext).getUserInfo().getLevel()) < 5 && tag != R.string.me_edit_avatar_system) {
|
||||
ToastUtil.show(R.string.me_edit_avatar_system_tip);
|
||||
return;
|
||||
}
|
||||
if (tag == R.string.camera) {
|
||||
mImageUtil.getImageByCamera();
|
||||
} else {
|
||||
} else if (tag == R.string.alumb) {
|
||||
mImageUtil.getImageByAlumb();
|
||||
} else {
|
||||
RouteUtil.forwardUserAvatarSelect();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -58,6 +58,7 @@ import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.adapter.ViewPagerAdapter;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.bean.ChatRemarksBean;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
@ -107,6 +108,7 @@ import com.yunbao.live.utils.LiveStorge;
|
||||
import com.yunbao.live.views.ChatListViewHolder;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.FullAdToBannerTransition;
|
||||
import com.yunbao.main.dialog.AnchorStartLiveNotifyDialog;
|
||||
import com.yunbao.main.dialog.MainStartDialogFragment;
|
||||
import com.yunbao.main.dialog.ReturnUserDialog;
|
||||
import com.yunbao.main.dialog.SigninDialog;
|
||||
@ -191,6 +193,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
private boolean isfloatBannernet = true, isFirst = true;
|
||||
|
||||
private View floatRedPacket;
|
||||
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
|
||||
|
||||
|
||||
@Override
|
||||
@ -1016,6 +1019,18 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onNotifyAnchorLive(AnchorStartLiveBean bean) {
|
||||
if (!IMLoginManager.get(mContext).isLiveNotifySettings()) return;
|
||||
|
||||
if (startListNotifyList.isEmpty()) {
|
||||
startListNotifyList.add(bean);
|
||||
notifyLiveFlot();
|
||||
} else {
|
||||
startListNotifyList.add(bean);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (isTabClose && isWebClose) {
|
||||
@ -1036,6 +1051,20 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
}
|
||||
}
|
||||
|
||||
private void notifyLiveFlot() {
|
||||
if (startListNotifyList.iterator().hasNext()) {
|
||||
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
|
||||
new AnchorStartLiveNotifyDialog(mContext, bean)
|
||||
.setOnDismissListener(dialog -> {
|
||||
startListNotifyList.remove(bean);
|
||||
if (startListNotifyList.iterator().hasNext()) {
|
||||
notifyLiveFlot();
|
||||
}
|
||||
})
|
||||
.showDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void loadPageData(int position, boolean needlLoadData) {
|
||||
if (mViewHolders == null) {
|
||||
|
@ -66,6 +66,7 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
private Handler mHandler;
|
||||
private SettingAdapter mAdapter;
|
||||
private ImageView studioGiftEffects, studioRideEffects, upSlideSettings, appWindow, systemWindow;
|
||||
private ImageView liveNotifySettings;
|
||||
private boolean giftEffect, mountEffect, slide, isFloat;
|
||||
private TextView systemHit, reward;
|
||||
|
||||
@ -81,6 +82,7 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
studioGiftEffects = findViewById(R.id.studio_gift_effects);
|
||||
studioRideEffects = findViewById(R.id.studio_ride_effects);
|
||||
upSlideSettings = findViewById(R.id.up_slide_settings);
|
||||
liveNotifySettings = findViewById(R.id.live_notify_settings);
|
||||
appWindow = findViewById(R.id.app_window);
|
||||
reward = findViewById(R.id.reward);
|
||||
systemHit = findViewById(R.id.system_hit);
|
||||
@ -237,6 +239,15 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
});
|
||||
}
|
||||
);
|
||||
ViewClicksAntiShake.clicksAntiShake(liveNotifySettings, () -> {
|
||||
boolean isTrue = IMLoginManager.get(mContext).isLiveNotifySettings();
|
||||
if (isTrue) {
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, liveNotifySettings);
|
||||
} else {
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, liveNotifySettings);
|
||||
}
|
||||
IMLoginManager.get(mContext).setLiveNotifySettings(!isTrue);
|
||||
});
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder(getString(com.yunbao.common.R.string.system_window_hint));
|
||||
String goTo = getString(com.yunbao.common.R.string.to_open_the);
|
||||
int star = builder.length();
|
||||
@ -274,6 +285,11 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
|
||||
} else {
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, studioRideEffects);
|
||||
}
|
||||
if(IMLoginManager.get(mContext).isLiveNotifySettings()){
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_on, liveNotifySettings);
|
||||
}else{
|
||||
ImgLoader.display(mContext, com.yunbao.common.R.mipmap.special_icon_off, liveNotifySettings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,100 @@
|
||||
package com.yunbao.main.activity;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.UserAvatarSelectAdapter;
|
||||
import com.yunbao.main.event.EditProfileEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Route(path = RouteUtil.PATH_SELECT_AVATAR)
|
||||
public class UserAvatarSelectActivity extends AbsActivity {
|
||||
RecyclerView recyclerView;
|
||||
UserAvatarSelectAdapter adapter;
|
||||
TextView titleView;
|
||||
View submit;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_user_select_avatar;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
super.main();
|
||||
titleView = findViewById(R.id.titleView);
|
||||
submit = findViewById(R.id.send);
|
||||
titleView.setText(R.string.me_edit_avatar_title);
|
||||
recyclerView = findViewById(R.id.recyclerView);
|
||||
adapter = new UserAvatarSelectAdapter(mContext);
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(mContext, 3));
|
||||
recyclerView.setAdapter(adapter);
|
||||
initData();
|
||||
|
||||
submit.setOnClickListener(v -> {
|
||||
int id = adapter.getSelect();
|
||||
if (id > -1) {
|
||||
adapter.setDef(id);
|
||||
LiveNetManager.get(mContext)
|
||||
.setSystemUserAvatar(id, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(data);
|
||||
IMLoginManager.get(mContext).upDataUserInfo();
|
||||
Bus.get().post(new EditProfileEvent());
|
||||
submit.setBackgroundResource(R.drawable.bg_item_live_send_details_gift_unselect);
|
||||
submit.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
adapter.setOnClickListener(new OnItemClickListener<Integer>() {
|
||||
@Override
|
||||
public void onItemClick(Integer bean, int position) {
|
||||
if (bean == position) {
|
||||
submit.setBackgroundResource(R.drawable.bg_item_live_send_details_gift_unselect);
|
||||
submit.setEnabled(false);
|
||||
} else {
|
||||
submit.setBackgroundResource(R.drawable.bg_item_live_send_details_gift);
|
||||
submit.setEnabled(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getSystemUserAvatar(new HttpCallback<List<UserAvatarSelectBean>>() {
|
||||
@Override
|
||||
public void onSuccess(List<UserAvatarSelectBean> data) {
|
||||
adapter.setList(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
adapter.setList(new ArrayList<>());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
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.UserAvatarSelectBean;
|
||||
import com.yunbao.common.custom.RatioRoundImageView;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UserAvatarSelectAdapter extends RecyclerView.Adapter<UserAvatarSelectAdapter.AvatarSelectViewHolder> {
|
||||
private Context mContext;
|
||||
private List<UserAvatarSelectBean> list = new ArrayList<>();
|
||||
private OnItemClickListener<Integer> onClickListener;
|
||||
private int select = -1;
|
||||
private int defId = -1;
|
||||
|
||||
public void setList(List<UserAvatarSelectBean> list) {
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public int getSelect() {
|
||||
if (select == -1 && getItemCount() > 0) {
|
||||
return list.get(0).getId();
|
||||
}
|
||||
return select;
|
||||
}
|
||||
|
||||
public void setOnClickListener(OnItemClickListener<Integer> onClickListener) {
|
||||
this.onClickListener = onClickListener;
|
||||
}
|
||||
|
||||
public int getDefId() {
|
||||
return defId;
|
||||
}
|
||||
|
||||
public UserAvatarSelectAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public AvatarSelectViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new AvatarSelectViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_user_avatar_select, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull AvatarSelectViewHolder holder, int position) {
|
||||
holder.setData(list.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public void setDef(int id) {
|
||||
this.defId = id;
|
||||
}
|
||||
|
||||
public class AvatarSelectViewHolder extends RecyclerView.ViewHolder {
|
||||
private View hide;
|
||||
private View show;
|
||||
private RatioRoundImageView avatar;
|
||||
|
||||
public AvatarSelectViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
hide = itemView.findViewById(R.id.hideCover);
|
||||
show = itemView.findViewById(R.id.showCover);
|
||||
avatar = itemView.findViewById(R.id.avatar);
|
||||
itemView.setOnClickListener(v -> {
|
||||
select = (int) v.getTag();
|
||||
notifyDataSetChanged();
|
||||
onClickListener.onItemClick(select, defId);
|
||||
});
|
||||
}
|
||||
|
||||
public void setData(UserAvatarSelectBean bean, int position) {
|
||||
ImgLoader.display(itemView.getContext(), bean.getPath(), avatar);
|
||||
if (select == -1 && bean.getChecked() == 1) {
|
||||
select = bean.getId();
|
||||
defId = bean.getId();
|
||||
}
|
||||
if (select == bean.getId()) {
|
||||
show.setVisibility(View.VISIBLE);
|
||||
hide.setVisibility(View.GONE);
|
||||
} else {
|
||||
show.setVisibility(View.INVISIBLE);
|
||||
hide.setVisibility(View.VISIBLE);
|
||||
}
|
||||
itemView.setTag(bean.getId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.yunbao.main.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.enums.PopupAnimation;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.custom.RatioRoundImageView;
|
||||
import com.yunbao.common.dialog.AbsDialogPositionPopupWindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
public class AnchorStartLiveNotifyDialog extends AbsDialogPositionPopupWindow {
|
||||
private AnchorStartLiveBean liveBean;
|
||||
private DialogInterface.OnDismissListener onDismissListener;
|
||||
|
||||
private TextView anchorName;
|
||||
private RatioRoundImageView avatar;
|
||||
|
||||
|
||||
public AnchorStartLiveNotifyDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public AnchorStartLiveNotifyDialog(@NonNull Context context, AnchorStartLiveBean bean) {
|
||||
super(context);
|
||||
this.liveBean = bean;
|
||||
}
|
||||
|
||||
public AnchorStartLiveNotifyDialog setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
|
||||
this.onDismissListener = onDismissListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.positionByWindowCenter(true);
|
||||
builder.moveUpToKeyboard(false);
|
||||
builder.dismissOnTouchOutside(false);
|
||||
builder.dismissOnBackPressed(false);
|
||||
builder.isTouchThrough(true);
|
||||
builder.isClickThrough(true);
|
||||
builder.isCenterHorizontal(true);
|
||||
builder.hasShadowBg(false);
|
||||
builder.animationDuration(500);
|
||||
builder.popupAnimation(PopupAnimation.ScaleAlphaFromCenter);
|
||||
builder.offsetY(DpUtil.dp2px(60));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.view_funs_live_anchor_start_notify;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
findViewById(R.id.liveGo).setOnClickListener(v -> {
|
||||
LiveHttpUtil.getLiveInfo(liveBean.getRoomId(), new HttpCallback() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckError(String contextError) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
avatar = findViewById(R.id.avatar);
|
||||
anchorName = findViewById(R.id.anchorName);
|
||||
ImgLoader.display(mContext, liveBean.getAvatar(), avatar);
|
||||
anchorName.setText(liveBean.getAnchorName());
|
||||
|
||||
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
dismiss();
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(null);
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
}
|
@ -1,15 +1,12 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.RedPacketListActivity;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/22.
|
||||
@ -42,7 +39,6 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
|
||||
|
||||
|
||||
|
||||
}
|
||||
public void setCurPosition(int position){
|
||||
mViewPager.setCurrentItem(position);
|
||||
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FFC300"/>
|
||||
</shape>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#99000000"/>
|
||||
</shape>
|
@ -13,7 +13,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView12"
|
||||
android:id="@+id/anchorName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:paddingStart="15dp"
|
||||
@ -34,5 +34,5 @@
|
||||
tools:listitem="@layout/item_red_packet"
|
||||
tools:itemCount="10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView12" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/anchorName" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -260,7 +260,14 @@
|
||||
android:paddingTop="13.67dp"
|
||||
android:paddingBottom="11dp">
|
||||
|
||||
<TextView
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:ellipsize="marquee"
|
||||
android:maxEms="13"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
@ -368,6 +375,35 @@
|
||||
android:layout_marginEnd="26.33dp"
|
||||
android:src="@mipmap/special_icon_off" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="13.67dp"
|
||||
android:paddingBottom="11dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:text="@string/live_notify_settings"
|
||||
android:textColor="#1E1F20"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_notify_settings"
|
||||
android:layout_width="46.67dp"
|
||||
android:layout_height="23.33dp"
|
||||
android:layout_marginEnd="26.33dp"
|
||||
android:src="@mipmap/special_icon_off" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
47
main/src/main/res/layout/activity_user_select_avatar.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#333333">
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/view_title2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toTopOf="@+id/send"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include"
|
||||
app:spanCount="3"
|
||||
tools:itemCount="18"
|
||||
tools:listitem="@layout/item_user_avatar_select" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/send"
|
||||
android:layout_width="185dp"
|
||||
android:layout_height="51dp"
|
||||
android:layout_marginBottom="72dp"
|
||||
android:background="@drawable/bg_item_live_send_details_gift_unselect"
|
||||
android:gravity="center"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="@string/me_edit_avatar_submit"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
54
main/src/main/res/layout/item_user_avatar_select.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="85dp"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginTop="32dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/showCover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_user_avatar_select_selected"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.yunbao.common.custom.RatioRoundImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:src="@mipmap/icon_green_science"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:ri_ratio="0.5"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<View
|
||||
android:id="@+id/hideCover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:background="@drawable/bg_user_avatar_select_unselected"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -42,7 +42,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView9"
|
||||
android:id="@+id/giftIcon"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="40dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|