点唱房功能
@@ -161,7 +161,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
//设置mqtt环境 false 测试环境 true 正式环境
|
||||
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
|
||||
//设置http环境 false 测试环境 true 正式环境
|
||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(true);
|
||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(false);
|
||||
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();
|
||||
|
||||
|
||||
|
||||
@@ -97,6 +97,9 @@ public class RoomMessageEvent {
|
||||
|
||||
private EmotionDeatils emoji;
|
||||
private String is_pk;//是否是pk
|
||||
|
||||
private SingerInfo.SongInfo song_info;
|
||||
private SingerInfo.SongInfo next_song_info;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.xscm.moduleutil.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SingerInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private SongInfo song_info;
|
||||
private SongInfo next_song_info;
|
||||
|
||||
@Data
|
||||
public static class SongInfo implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
/*"id": 29,
|
||||
"room_id": 6001,
|
||||
"user_id": 20001,
|
||||
"singer_song_id": 9,
|
||||
"status": 1,
|
||||
"sort": 0,
|
||||
"createtime": 1763435086,
|
||||
"boss_user_id": 20001,
|
||||
"boss_nickname": "高兴的小海腾",
|
||||
"boss_avatar": "https://yusheng-1369267578.cos.ap-guangzhou.myqcloud.com/images/ios_images/1761615690733.jpeg",
|
||||
"boss_dress": "",
|
||||
"boss_mic_cycle": "https://cos.xscmmidi.site/admin/ripple3695_17627709565119.svga",
|
||||
"singer_user_id": 20000,
|
||||
"singer_nickname": "坚定的故事",
|
||||
"singer_avatar": "https://yusheng-1369267578.cos.ap-guangzhou.myqcloud.com/images/android_images/4ead5077435f1da7b8aae1a878bb5ac9.jpg",
|
||||
"singer_dress": "",
|
||||
"singer_mic_cycle": "https://cos.xscmmidi.site/admin/ripple3695_17627709565119.svga",
|
||||
"song_name": "公敌"*/
|
||||
private int id = 0;
|
||||
private int room_id = 0;
|
||||
private int user_id = 0;
|
||||
private int singer_song_id = 0;
|
||||
private int status = 0;
|
||||
private int sort = 0;
|
||||
private long createtime = 0;
|
||||
private int boss_user_id = 0;
|
||||
private String boss_nickname = "";
|
||||
private String boss_avatar = "";
|
||||
private String boss_dress = "";
|
||||
private String boss_mic_cycle = "";
|
||||
private int singer_user_id = 0;
|
||||
private String singer_nickname = "";
|
||||
private String singer_avatar = "";
|
||||
private String singer_dress = "";
|
||||
private String singer_mic_cycle = "";
|
||||
private String song_name = "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.xscm.moduleutil.bean
|
||||
|
||||
/**
|
||||
* SingerSongCount 类,用于存储歌手和歌曲数量信息
|
||||
* 这个类可能用于统计或展示每位歌手的歌曲数量
|
||||
*/
|
||||
class SingerSongCount {
|
||||
// 类定义结束,这里可以添加属性和方法来存储和操作歌手及其歌曲数量
|
||||
|
||||
var total: Int = 0
|
||||
var today: Int = 0
|
||||
var yesterday: Int = 0
|
||||
var week: Int = 0
|
||||
var month: Int = 0
|
||||
var already: Int = 0
|
||||
|
||||
/* total
|
||||
string
|
||||
总数
|
||||
必需
|
||||
today
|
||||
string
|
||||
今天
|
||||
必需
|
||||
yesterday
|
||||
string
|
||||
昨天
|
||||
必需
|
||||
week
|
||||
string
|
||||
本周
|
||||
必需
|
||||
month
|
||||
string
|
||||
本月
|
||||
必需
|
||||
already
|
||||
string
|
||||
已点*/
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.xscm.moduleutil.bean
|
||||
|
||||
class SongPlaylist {
|
||||
|
||||
var count: Int = 0
|
||||
var lists: List<SongPlaylistBean> = ArrayList()
|
||||
|
||||
class SongPlaylistBean {
|
||||
|
||||
var id: Int = 0
|
||||
var room_id :String =""
|
||||
var user_id: String = ""
|
||||
var singer_song_id: String = ""
|
||||
var status:String =""
|
||||
var sort: Int = 0
|
||||
var boss_nickname: String = ""
|
||||
var song_name: String = ""
|
||||
var gift_id: String = ""
|
||||
var gift_num: String = ""
|
||||
var createtime: String = ""
|
||||
var gift_name: String = ""
|
||||
var gift_price: String = ""
|
||||
var base_image: String = ""
|
||||
var singer_nickname: String = ""
|
||||
|
||||
}
|
||||
|
||||
/* id
|
||||
string 列表ID
|
||||
|
||||
user_id
|
||||
string
|
||||
歌手ID
|
||||
|
||||
song_name
|
||||
string
|
||||
歌曲名
|
||||
|
||||
gift_id
|
||||
string
|
||||
礼物ID
|
||||
|
||||
gift_num
|
||||
string
|
||||
礼物数量
|
||||
|
||||
createtime
|
||||
string
|
||||
添加时间
|
||||
|
||||
gift_name
|
||||
string
|
||||
礼物名称
|
||||
|
||||
gift_price
|
||||
string
|
||||
礼物价格
|
||||
|
||||
base_image
|
||||
string
|
||||
礼物图片
|
||||
|
||||
nickname
|
||||
string
|
||||
歌手昵称*/
|
||||
|
||||
}
|
||||
@@ -80,7 +80,8 @@ public class UserInfo extends BaseEvent implements Serializable {
|
||||
|
||||
private String enter_image;//爵位飘屏的背景
|
||||
private String enter_text;//爵位飘屏的文字
|
||||
|
||||
private int singer_status;//歌手认证状态0-待审核,1-通过,2-拒绝 -1:未认证
|
||||
private int singer_level;//歌手等级
|
||||
|
||||
|
||||
// @Data
|
||||
|
||||
@@ -117,6 +117,15 @@ public class EMMessageInfo implements MultiItemEntity {
|
||||
///移除红包
|
||||
public static final int QXRoomMessageTypeQXRoomMessageRedRemove = 1061;
|
||||
|
||||
///点歌房当前歌曲发生变化
|
||||
public static final int QXRoomMessageTypeSingerRoomCurrentSongDidChanged=1070;
|
||||
|
||||
///点歌房下一首歌曲发生变化
|
||||
public static final int QXRoomMessageTypeSingerRoomNextSongDidChanged=1071;
|
||||
|
||||
//已点歌曲数量
|
||||
public static final int QXRoomMessageTypeSongerNum = 1072;
|
||||
|
||||
///房间内换麦
|
||||
public static final int QXRoomMessageTypehm = 1039;
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.xscm.moduleutil.bean.NobilitDeatils;
|
||||
import com.xscm.moduleutil.bean.SingerInfo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -34,6 +36,8 @@ public class RoomInfoResp implements Serializable {
|
||||
private int hour_ranking_open;//1:开启 0:关闭
|
||||
private NobilitDeatils.NobilityInfo nobility_info;
|
||||
|
||||
private SingerInfo singer_info;
|
||||
|
||||
|
||||
//弹出麦位操作弹出
|
||||
public boolean isWheatManager() {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class RoomPitBean implements Serializable {
|
||||
*/
|
||||
|
||||
private String id;//id
|
||||
private String pit_number = "";//麦位号
|
||||
private String pit_number="";//麦位号
|
||||
private String state;//麦位状态 正常 ,1封麦;3禁麦
|
||||
private int is_lock;//0未锁麦 1锁麦
|
||||
private int is_mute;//0未禁麦 1禁麦
|
||||
@@ -69,4 +69,8 @@ public class RoomPitBean implements Serializable {
|
||||
private String nickname_color;//昵称颜色
|
||||
private String mic_cycle;//麦圈
|
||||
|
||||
|
||||
private boolean occupied;
|
||||
private boolean imageType;//是否是演唱者
|
||||
|
||||
}
|
||||
|
||||
@@ -17,8 +17,10 @@ public enum QXRoomSeatViewType {
|
||||
* 拍卖麦位
|
||||
*/
|
||||
AUCTION(2, "拍卖麦位"),
|
||||
|
||||
|
||||
/**
|
||||
* 点唱
|
||||
*/
|
||||
JUKEBOX(9,"点唱麦位"),
|
||||
|
||||
/**
|
||||
* 小黑屋麦位
|
||||
@@ -30,6 +32,8 @@ public enum QXRoomSeatViewType {
|
||||
*/
|
||||
FRIEND(7, "交友房麦位");
|
||||
|
||||
|
||||
|
||||
private final int value;
|
||||
private final String description;
|
||||
|
||||
|
||||
@@ -14,8 +14,10 @@ enum class RoomType(
|
||||
AUCTION("拍卖(真爱拍小黑屋)", 2),
|
||||
DATING("交友", 1,3, 4, 8), // 1、3、4、8 均对应交友
|
||||
BLACK_ROOM("小黑屋", 6),
|
||||
JUKEBOX("点唱", 9),
|
||||
MUTUAL_ENTERTAINMENT("互娱", 7);
|
||||
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* 根据 type_id 字符串获取对应的枚举实例
|
||||
|
||||
@@ -31,6 +31,4 @@ public class RoomGiftGiveEvent extends BaseEvent {
|
||||
this.heart_id = heart_id;
|
||||
this.auction_id = auction_id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -128,6 +128,46 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_TEMP_KEY)
|
||||
Call<BaseModel<TempKeyBean>> getTempKey();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_AUTH)
|
||||
Call<BaseModel<String>> singerAuth(@Field("song") String song);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_GET_SONG)
|
||||
Call<BaseModel<SongPlaylist>> getSong(@Field("user_id") String user_id,@Field("room_id") String room_id,@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_CUT)
|
||||
Call<BaseModel<String>> singerSongCut(@Field("id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_TOP)
|
||||
Call<BaseModel<String>> singerSongTop(@Field("id") String id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_COUNT)
|
||||
Call<BaseModel<SingerSongCount>> singerSongCount(@Field("room_id") String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG)
|
||||
Call<BaseModel<String>> singerSong(@Field("song_id") String song_id,@Field("room_id") String room_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_SONG_LIST)
|
||||
Call<BaseModel<SongPlaylist>> singerSongList(@Field("room_id") String room_id,@Field("type") String type,@Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_DELETE_SONG)
|
||||
Call<BaseModel<String>> deleteSong(@Field("id") String song_id);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_ADD_SONG)
|
||||
Call<BaseModel<String>> singerAddSong(@Field("song_name") String song_name,@Field("gift_id") String gift_id,@Field("gift_num") String gift_num);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_SINGER_UPDATE_SONG)
|
||||
Call<BaseModel<String>> singerUpdateSong(@Field("id") String is,@Field("song_name") String song_name,@Field("gift_id") String gift_id,@Field("gift_num") String gift_num);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_RANK)
|
||||
Call<BaseModel<List<CharmRankingResp>>> getRoomRank(@Field("room_id") String room_id, @Field("type") String type, @Field("time_type") String time_type, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@@ -510,6 +510,236 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void singerAuth(String url, BaseObserver<String> observer) {
|
||||
sApiServer.singerAuth(url).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1)
|
||||
observer.onNext(baseModel.getMsg());
|
||||
else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
observer.onNext(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("认证失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void getSong(String userid, String roomId, String page, String pagaeSice, BaseObserver<SongPlaylist> observer) {
|
||||
sApiServer.getSong(userid, roomId, page, pagaeSice).enqueue(new Callback<BaseModel<SongPlaylist>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<SongPlaylist>> call, Response<BaseModel<SongPlaylist>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<SongPlaylist> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
observer.onNext(baseModel.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<SongPlaylist>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongCut(String id,BaseObserver<String> observer) {
|
||||
sApiServer.singerSongCut(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongTop(String id,BaseObserver<String> observer){
|
||||
sApiServer.singerSongTop(id).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
observer.onNext(baseModel.getMsg());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
observer.onNext(baseModel.getMsg());
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongCount(String roomId,BaseObserver<SingerSongCount> observer){
|
||||
sApiServer.singerSongCount(roomId).enqueue(new Callback<BaseModel<SingerSongCount>>(){
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<SingerSongCount>> call, Response<BaseModel<SingerSongCount>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<SingerSongCount> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<SingerSongCount>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲数量失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSong(String songId, String roomId, BaseObserver<String> observer) {
|
||||
sApiServer.singerSong(songId, roomId).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("singerSong", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerSongList(String room_id, String type, String page, String page_limit, BaseObserver<SongPlaylist> observer) {
|
||||
sApiServer.singerSongList(room_id, type, page, page_limit).enqueue(new Callback<BaseModel<SongPlaylist>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<SongPlaylist>> call, Response<BaseModel<SongPlaylist>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<SongPlaylist> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<SongPlaylist>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteSong(String songId, BaseObserver<String> observer) {
|
||||
sApiServer.deleteSong(songId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
observer.onNext(baseModel.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("获取歌曲失败", t.fillInStackTrace());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void getTempKey(BaseObserver<TempKeyBean> observer) {
|
||||
sApiServer.getTempKey().enqueue(new Callback<BaseModel<TempKeyBean>>() {
|
||||
@Override
|
||||
@@ -610,10 +840,9 @@ public class RetrofitClient {
|
||||
sApiServer.roomRanking(type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
} else if (ranking_type.equals("1") || ranking_type.equals("2")) {
|
||||
sApiServer.wealthRanking(ranking_type, type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}else if (ranking_type.equals("3")) {
|
||||
} else if (ranking_type.equals("3")) {
|
||||
sApiServer.loveRanking(type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
else if (ranking_type.equals("4")) {
|
||||
} else if (ranking_type.equals("4")) {
|
||||
sApiServer.guildRanking().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
}
|
||||
@@ -1420,7 +1649,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getBanners(String s,BaseObserver<List<BannerModel>> observer) {
|
||||
public void getBanners(String s, BaseObserver<List<BannerModel>> observer) {
|
||||
sApiServer.getBanners(s).enqueue(new Callback<BaseModel<List<BannerModel>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<BannerModel>>> call, Response<BaseModel<List<BannerModel>>> response) {
|
||||
@@ -1569,6 +1798,70 @@ public class RetrofitClient {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<RoonGiftModel>>> call, Throwable t) {
|
||||
t.fillInStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerUpdateSong(String songId, String song_name, String gift_id, String gift_num, BaseObserver<String> observer) {
|
||||
sApiServer.singerUpdateSong(songId, song_name, gift_id, gift_num).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(listBaseModel.getData());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(null);
|
||||
} else if (listBaseModel.getCode() == 301) {
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
ToastUtils.showShort(listBaseModel.getMsg());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void singerAddSong(String song_name, String gift_id, String gift_num, BaseObserver<String> observer) {
|
||||
sApiServer.singerAddSong(song_name, gift_id, gift_num).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(listBaseModel.getData());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
observer.onNext(null);
|
||||
} else if (listBaseModel.getCode() == 301) {
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
ToastUtils.showShort(listBaseModel.getMsg());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -1928,7 +2221,7 @@ public class RetrofitClient {
|
||||
public void onFailure(Call<BaseModel<RoomInfoResp>> call, Throwable t) {
|
||||
MessageListenerSingleton.getInstance().quitGroup(roomId);
|
||||
CommonAppContext.getInstance().isRoomJoininj = false;
|
||||
observer.onError( t);
|
||||
observer.onError(t);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -2144,8 +2437,8 @@ public class RetrofitClient {
|
||||
// });
|
||||
}
|
||||
|
||||
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id,String nobility_id, BaseObserver<AppPay> observer) {
|
||||
sApiServer.appPay(user_id, money, coin, type, type_params, type_id,nobility_id).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id, String nobility_id, BaseObserver<AppPay> observer) {
|
||||
sApiServer.appPay(user_id, money, coin, type, type_params, type_id, nobility_id).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
||||
if (response.code() == 200) {
|
||||
@@ -2963,8 +3256,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void setLockPit(String roomId, String pitNumber, String
|
||||
isLock, BaseObserver<String> observer) {
|
||||
public void setLockPit(String roomId, String pitNumber, String isLock, BaseObserver<String> observer) {
|
||||
sApiServer.setLockPit(roomId, pitNumber, isLock).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -3020,11 +3312,13 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void agreeSong(String room_id, String type, BaseObserver<String> observer) {
|
||||
sApiServer.agreeSong(room_id, type).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
LogUtils.e("练歌房","练歌房:"+response.body().toString());
|
||||
LogUtils.e("练歌房", "练歌房:" + response.body().toString());
|
||||
onNextRetu(response, observer);
|
||||
}
|
||||
|
||||
@@ -3401,7 +3695,8 @@ public class RetrofitClient {
|
||||
}
|
||||
});
|
||||
}
|
||||
public void getModifyHideStatus(String hide_status, BaseObserver<String> observer ){
|
||||
|
||||
public void getModifyHideStatus(String hide_status, BaseObserver<String> observer) {
|
||||
sApiServer.getModifyHideStatus(hide_status).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
@@ -3414,6 +3709,7 @@ public class RetrofitClient {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getPostData(String new_password, String mobile, String code, String userId, BaseObserver<String> observer) {
|
||||
sApiServer.getPostData(new_password, mobile, code, userId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
@@ -3755,7 +4051,7 @@ public class RetrofitClient {
|
||||
if (string != null) {
|
||||
int code = string.getCode();
|
||||
if (code == 1) {
|
||||
observer.onNext(string.getMsg()!= null ? string.getMsg() : "");
|
||||
observer.onNext(string.getMsg() != null ? string.getMsg() : "");
|
||||
|
||||
} else if (code == 301) {
|
||||
try {
|
||||
@@ -3815,22 +4111,22 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
|
||||
public void sendAppLog(String logName,String logPath,BaseObserver<String> observer) {
|
||||
sApiServer.postSendAppLog(logName,logPath).enqueue(new Callback<BaseModel<String>>() {
|
||||
public void sendAppLog(String logName, String logPath, BaseObserver<String> observer) {
|
||||
sApiServer.postSendAppLog(logName, logPath).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
int code = response.body().getCode();
|
||||
if (code == 1) {
|
||||
observer.onNext("成功");
|
||||
}else if (code == 301){
|
||||
} else if (code == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(response.body().getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
LogUtils.e( e.toString());
|
||||
LogUtils.e(e.toString());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
observer.onNext("失败");
|
||||
}
|
||||
}
|
||||
@@ -3996,7 +4292,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getNobilityDetail(BaseObserver<NobilitDeatils> observer){
|
||||
public void getNobilityDetail(BaseObserver<NobilitDeatils> observer) {
|
||||
sApiServer.getNobilityDetail().enqueue(new Callback<BaseModel<NobilitDeatils>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<NobilitDeatils>> call, Response<BaseModel<NobilitDeatils>> response) {
|
||||
@@ -4004,9 +4300,9 @@ public class RetrofitClient {
|
||||
BaseModel<NobilitDeatils> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
} else if (baseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
@@ -4015,6 +4311,7 @@ public class RetrofitClient {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<NobilitDeatils>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
@@ -4023,7 +4320,7 @@ public class RetrofitClient {
|
||||
|
||||
}
|
||||
|
||||
public void getNobilityList(BaseObserver<List<NobilitList>> observer){
|
||||
public void getNobilityList(BaseObserver<List<NobilitList>> observer) {
|
||||
sApiServer.getNobilityList().enqueue(new Callback<BaseModel<List<NobilitList>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<NobilitList>>> call, Response<BaseModel<List<NobilitList>>> response) {
|
||||
@@ -4031,9 +4328,9 @@ public class RetrofitClient {
|
||||
BaseModel<List<NobilitList>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
} else if (baseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
@@ -4050,7 +4347,7 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getNobilityPrice(String id, BaseObserver<NobilityPrice> observer){
|
||||
public void getNobilityPrice(String id, BaseObserver<NobilityPrice> observer) {
|
||||
sApiServer.getNobilityPrice(id).enqueue(new Callback<BaseModel<NobilityPrice>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<NobilityPrice>> call, Response<BaseModel<NobilityPrice>> response) {
|
||||
@@ -4058,9 +4355,9 @@ public class RetrofitClient {
|
||||
BaseModel<NobilityPrice> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
} else if (baseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
|
||||
@@ -411,6 +411,16 @@ public class Constants {
|
||||
public static final String GET_NOBILITY_DETAIL = "/api/Nobility/get_nobility_detail";//爵位详情
|
||||
public static final String GET_NOBILITY_LIST = "/api/Nobility/get_nobility_list";//爵位列表
|
||||
public static final String GET_NOBILITY_PRICE = "/api/Nobility/get_nobility_price";//爵位购买价格
|
||||
public static final String POST_SINGER_AUTH = "/api/SingerSong/singerAuth";//歌手认证
|
||||
public static final String POST_GET_SONG = "/api/SingerSong/getSong";//获取用户的歌单
|
||||
public static final String POST_SINGER_SONG = "/api/SingerSong/singerSong";//点歌
|
||||
public static final String POST_SINGER_SONG_TOP = "/api/SingerSong/singerSongTop";//歌曲置顶
|
||||
public static final String POST_SINGER_SONG_COUNT = "/api/SingerSong/singerSongCount";//点歌各类型各个总数
|
||||
public static final String POST_SINGER_SONG_LIST = "/api/SingerSong/singerSongList";//点歌列表
|
||||
public static final String POST_SINGER_SONG_CUT = "/api/SingerSong/singerSongCut";//切歌
|
||||
public static final String POST_SINGER_ADD_SONG = "/api/SingerSong/singerAddSong";//歌手添加歌曲
|
||||
public static final String POST_SINGER_DELETE_SONG = "/api/SingerSong/singerDelSong";//歌手删除 歌曲
|
||||
public static final String POST_SINGER_UPDATE_SONG = "/api/SingerSong/singerEditSong";//歌手修改歌曲
|
||||
public static final String POST_SEND_LOG = "api/Report/android_log_report";//上传log信息
|
||||
|
||||
|
||||
|
||||
10
BaseModule/src/main/res/drawable/bg_r14_1b1926.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#ff1b1926" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="14dp"
|
||||
android:topRightRadius="14dp" />
|
||||
</shape>
|
||||
6
BaseModule/src/main/res/drawable/bg_r16_2b2935.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#2B2935"/>
|
||||
<corners android:radius="@dimen/dp_16"/>
|
||||
|
||||
</shape>
|
||||
6
BaseModule/src/main/res/drawable/bg_r16_3abc6d.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#3ABC6D"/>
|
||||
<corners android:radius="@dimen/dp_16"/>
|
||||
|
||||
</shape>
|
||||
6
BaseModule/src/main/res/drawable/bg_r34_3abc6d.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#3ABC6D" />
|
||||
<corners android:radius="@dimen/dp_34"/>
|
||||
</shape>
|
||||
10
BaseModule/src/main/res/drawable/bg_r53_73040404.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#73040404" />
|
||||
<corners
|
||||
android:bottomLeftRadius="53dp"
|
||||
android:bottomRightRadius="53dp"
|
||||
android:topLeftRadius="53dp"
|
||||
android:topRightRadius="53dp" />
|
||||
</shape>
|
||||
10
BaseModule/src/main/res/drawable/bg_r8_262431.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#262431" />
|
||||
<corners
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"
|
||||
android:topLeftRadius="14dp"
|
||||
android:topRightRadius="14dp" />
|
||||
</shape>
|
||||
@@ -21,7 +21,7 @@
|
||||
android:gravity="center|left"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:text="全部评论(56)"
|
||||
tools:text="全部评论(56)"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -325,6 +325,11 @@
|
||||
<!-- 流光次数-->
|
||||
<attr name="shineCount" format="integer" />
|
||||
</declare-styleable>
|
||||
<style name="TabLayoutTextStyle" parent="TextAppearance.Design.Tab">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -3,11 +3,15 @@
|
||||
<!-- 前台定位权限 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- 后台定位权限(Android 10+) -->
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
|
||||
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
||||
|
||||
<application
|
||||
android:theme="@style/AppTheme">
|
||||
<application android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".activity.user.activity.UserPlaylistActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.user.activity.SingerVerificationActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.login.activity.SwitchAccountsActivity"
|
||||
android:exported="false" />
|
||||
@@ -17,16 +21,12 @@
|
||||
<activity
|
||||
android:name=".activity.login.activity.ForgetPasswordActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.login.activity.LoginActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.main.activity.MainActivity"
|
||||
android:configChanges="fontScale" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.room.activity.RoomActivity"
|
||||
android:alwaysRetainTaskState="true"
|
||||
@@ -36,23 +36,18 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.room.activity.RedResultActivity"
|
||||
android:exported="true" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.room.activity.SearchActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.room.activity.RankingListActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.room.activity.PopularRoomActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.plaza.activity.DynamicDetailActivity"
|
||||
android:exported="false"
|
||||
@@ -64,8 +59,6 @@
|
||||
<activity
|
||||
android:name=".activity.plaza.activity.ReleaseActivity"
|
||||
android:exported="false" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".activity.user.activity.AboutUsActivity"
|
||||
android:exported="false" />
|
||||
@@ -165,27 +158,24 @@
|
||||
<activity
|
||||
android:name=".activity.user.activity.RealNameActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.user.activity.NoblePaymentActivity"
|
||||
android:exported="false"/>
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.user.activity.NobleDetailsActivity"
|
||||
android:exported="false"/>
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.user.activity.NobleTitleActivity"
|
||||
android:exported="false"/>
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.user.activity.GiftWallActivity"
|
||||
android:exported="false"/>
|
||||
|
||||
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".activity.WebViewActivity"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="com.qxcm.qxlive.PROTOCOL_WEBVIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
@@ -196,7 +186,6 @@
|
||||
<service
|
||||
android:name=".service.MediaProjectionService"
|
||||
android:foregroundServiceType="mediaProjection" />
|
||||
|
||||
<service
|
||||
android:name=".service.ForegroundService"
|
||||
android:enabled="true"
|
||||
@@ -207,8 +196,6 @@
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
|
||||
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
|
||||
@@ -70,6 +70,7 @@ import com.xscm.modulemain.activity.main.activity.MainActivity
|
||||
import com.xscm.modulemain.activity.room.contacts.RoomContacts
|
||||
import com.xscm.modulemain.activity.room.fragment.ChatRoomFragment
|
||||
import com.xscm.modulemain.activity.room.fragment.RedEnvelopesFragment
|
||||
import com.xscm.modulemain.activity.room.fragment.RequestSongFragment
|
||||
import com.xscm.modulemain.activity.room.fragment.RoomCabinFragment
|
||||
import com.xscm.modulemain.activity.room.fragment.RoomChartsFragment
|
||||
import com.xscm.modulemain.activity.room.fragment.RoomFragment
|
||||
@@ -857,10 +858,19 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
private val imSdkListener = object : V2TIMSDKListener() {
|
||||
override fun onConnecting() {}
|
||||
|
||||
/**
|
||||
* 重连成功的回调处理函数
|
||||
* 当网络连接成功建立时,此方法会被调用
|
||||
* 如果存在有效的播放ID,则执行重连操作
|
||||
*/
|
||||
override fun onConnectSuccess() { //重连成功
|
||||
// 检查当前是否有有效的播放ID
|
||||
if (CommonAppContext.getInstance().playId != null) {
|
||||
// 输出重连成功的日志信息
|
||||
LogUtils.e("@@@", "重连成功")
|
||||
// 输出当前的播放ID信息
|
||||
LogUtils.e("@@@", "" + CommonAppContext.getInstance().playId)
|
||||
// 调用RetrofitClient执行房间用户重连操作
|
||||
RetrofitClient.getInstance()
|
||||
.roomUserReconnect(CommonAppContext.getInstance().playId)
|
||||
}
|
||||
@@ -1021,6 +1031,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
}
|
||||
|
||||
fun getRoomInfoResp(): List<RoomPitBean>? {
|
||||
val roomPitBeans = mRoomInfoResp?.room_info?.pit_list.orEmpty().filter {
|
||||
it.user_id != null && it.user_id != "0" && it.user_id.isNotEmpty()&& it.user_id.toInt() != SpUtil.getUserId()
|
||||
}
|
||||
return roomPitBeans.ifEmpty { null }
|
||||
}
|
||||
|
||||
fun getRoomIds(): String? {
|
||||
return roomId
|
||||
}
|
||||
|
||||
|
||||
// TODO: 发红包
|
||||
fun redDialogView() {
|
||||
@@ -1385,7 +1406,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
handleMsgType1034(messageEvent, text)
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomTypeDidChanged) {
|
||||
handleMsgType1016(messageEvent, text)
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypehm) {
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypehm) {//房间内换麦
|
||||
handleMsgType1039(messageEvent, text)
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeRoomIsHostvalue) {
|
||||
roomFragment!!.handleMsgType1028(messageEvent)
|
||||
@@ -1447,8 +1468,16 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
qxRedPacketManager!!.addRedPacket(messageEvent.text.redpacketInfo)
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeQXRoomMessageRedRemove) {
|
||||
qxRedPacketManager!!.removeRedPacket(messageEvent.text.redpacket_id)
|
||||
} else if (msgType == EMMessageInfo.QXRoomMessageTypeSongerNum //房间点歌数量变化
|
||||
|| msgType ==EMMessageInfo.QXRoomMessageTypeSingerRoomCurrentSongDidChanged //点歌房当前歌曲发生变化
|
||||
||msgType == EMMessageInfo.QXRoomMessageTypeSingerRoomNextSongDidChanged) { //点歌房下一首歌曲发生变化
|
||||
if (mRoomInfoResp != null && mRoomInfoResp!!.room_info != null) {
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private var endTime: Long = 0
|
||||
|
||||
@@ -1724,6 +1753,13 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
|
||||
RoomType.JUKEBOX -> {
|
||||
mBinding!!.rlMore.visibility = View.GONE
|
||||
mBinding!!.rlMisc.visibility = View.GONE
|
||||
|
||||
roomFragment?.handleRoomMessage(messageEvent)
|
||||
}
|
||||
|
||||
else -> {
|
||||
roomFragment!!.updateSeatViewExchangedWithPitArray(mRoomInfoResp)
|
||||
}
|
||||
@@ -2359,16 +2395,16 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.ivBg.setImageDrawable(resources.getDrawable(bjId))
|
||||
}
|
||||
|
||||
fun setvisibTop(`is`: Boolean) {
|
||||
mBinding!!.roomTop.root.visibility =
|
||||
if (`is`) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
fun setOnlineNumber(number: Int) {
|
||||
this.number = number
|
||||
mBinding!!.roomTop.tvNum.text = number.toString()
|
||||
}
|
||||
|
||||
fun setvisibTop(`is`: Boolean) {
|
||||
mBinding!!.roomTop.root.visibility =
|
||||
if (`is`) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
fun setUserInfo() {
|
||||
mRoomInfoResp!!.user_info.is_collect = 1
|
||||
mBinding!!.roomTop.btnFollow.background =
|
||||
@@ -3713,6 +3749,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
maxHeightDp = 453
|
||||
} else if (mRoomInfoResp!!.room_info.type_id == "7") {
|
||||
maxHeightDp = 373
|
||||
} else if (mRoomInfoResp!!.room_info.type_id == "9") {
|
||||
maxHeightDp = 373
|
||||
}
|
||||
adjustLayoutHeights()
|
||||
}
|
||||
@@ -3761,6 +3799,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
QXRoomSeatViewType.CABIN
|
||||
}
|
||||
|
||||
RoomType.JUKEBOX -> {
|
||||
changeBackgroundColor(mRoomInfoResp!!.room_info.room_background)
|
||||
setvisibTop(true)
|
||||
QXRoomSeatViewType.JUKEBOX
|
||||
}
|
||||
|
||||
null -> {
|
||||
LogUtils.e("@@@", "RoomType is null")
|
||||
QXRoomSeatViewType.NONE
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.xscm.modulemain.activity.room.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
|
||||
import com.xscm.modulemain.activity.room.fragment.RequestedSongsFragment;
|
||||
import com.xscm.modulemain.activity.room.fragment.SongHistoryFragment;
|
||||
import com.xscm.modulemain.activity.room.fragment.SongRequestFragment;
|
||||
|
||||
/**
|
||||
* 点歌页面ViewPager适配器
|
||||
*/
|
||||
public class RequestSongPagerAdapter extends FragmentStateAdapter {
|
||||
|
||||
private static final int TAB_COUNT = 3; // 三个标签页
|
||||
|
||||
public RequestSongPagerAdapter(@NonNull FragmentActivity fragmentActivity) {
|
||||
super(fragmentActivity);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
return new SongRequestFragment(); // 点歌页面
|
||||
case 1:
|
||||
return new RequestedSongsFragment(); // 已点歌曲页面
|
||||
case 2:
|
||||
return new SongHistoryFragment(); // 历史记录页面
|
||||
default:
|
||||
return new SongRequestFragment();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return TAB_COUNT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
|
||||
package com.xscm.modulemain.activity.room.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.xscm.modulemain.databinding.ItemRequestedSongBinding;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 已点歌曲列表适配器
|
||||
*/
|
||||
public class RequestedSongsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
||||
// 歌曲状态常量
|
||||
public static final int STATUS_PLAYING = 1; // 正在播放
|
||||
public static final int STATUS_PENDING = 2; // 等待播放
|
||||
public static final int STATUS_TOP = 3; // 置顶
|
||||
|
||||
// 列表项类型
|
||||
private static final int TYPE_NORMAL = 0; // 普通列表项
|
||||
private static final int TYPE_FOOTER = 1; // 底部加载更多项
|
||||
|
||||
private List<SongPlaylist.SongPlaylistBean> songList = new ArrayList<>();
|
||||
private boolean isShowFooter = false; // 是否显示底部加载更多
|
||||
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onPlayClick(SongPlaylist.SongPlaylistBean song, int position);
|
||||
|
||||
void onTopClick(SongPlaylist.SongPlaylistBean song, int position);
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
this.onItemClickListener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
// 创建普通列表项视图
|
||||
ItemRequestedSongBinding binding = ItemRequestedSongBinding.inflate(
|
||||
LayoutInflater.from(parent.getContext()), parent, false);
|
||||
return new SongViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof FooterViewHolder) {
|
||||
// 底部加载更多项,不需要处理
|
||||
return;
|
||||
}
|
||||
|
||||
if (holder instanceof SongViewHolder) {
|
||||
// 普通列表项
|
||||
SongViewHolder songHolder = (SongViewHolder) holder;
|
||||
|
||||
// 检查位置是否有效,防止索引越界
|
||||
if (position >= songList.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SongPlaylist.SongPlaylistBean song = songList.get(position);
|
||||
|
||||
// 设置歌曲信息
|
||||
songHolder.binding.tvSongName.setText(song.getSong_name());
|
||||
ImageUtils.loadHead(song.getBase_image(), songHolder.binding.ivSongCover);
|
||||
songHolder.binding.tvSinger.setText("演唱者:" + song.getSinger_nickname());
|
||||
songHolder.binding.tvRequestBos.setText("老板:" + song.getBoss_nickname());
|
||||
|
||||
// 根据位置显示不同的UI
|
||||
if (position == 0) {
|
||||
// 第一个是正在播放
|
||||
songHolder.binding.tvRequestStatus.setText("正在播放");
|
||||
songHolder.binding.tvRequestStatus.setTextColor(0xFF3ABC6D);
|
||||
songHolder.binding.tvRequestStatus.setBackgroundColor(android.graphics.Color.TRANSPARENT);
|
||||
} else {
|
||||
// 第三个以后都是置顶,文字是白色的
|
||||
songHolder.binding.tvRequestStatus.setText("置顶");
|
||||
songHolder.binding.tvRequestStatus.setTextColor(0xFFFFFFFF);
|
||||
songHolder.binding.tvRequestStatus.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r34_3abc6d);
|
||||
}
|
||||
|
||||
|
||||
// 设置tvRequestStatus的点击事件,只有置顶状态才能点击
|
||||
songHolder.binding.tvRequestStatus.setOnClickListener(v -> {
|
||||
// 只有第三个及以后的项目(position > 1)才能点击tvRequestStatus
|
||||
if (position > 1 && onItemClickListener != null) {
|
||||
onItemClickListener.onTopClick(song, position);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
// 如果是最后一项且需要显示底部加载更多,则返回底部类型
|
||||
if (position == songList.size() && isShowFooter) {
|
||||
return TYPE_FOOTER;
|
||||
}
|
||||
return TYPE_NORMAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
// 如果需要显示底部加载更多,则数量加1
|
||||
return songList.size() + (isShowFooter ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据歌曲对象获取状态
|
||||
*/
|
||||
private int getStatusFromSong(SongPlaylist.SongPlaylistBean song) {
|
||||
// 根据业务逻辑判断状态,这里仅作为示例
|
||||
if ("1".equals(song.getStatus())) {
|
||||
return STATUS_PLAYING;
|
||||
} else if ("0".equals(song.getStatus())) {
|
||||
return STATUS_TOP;
|
||||
} else {
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置歌曲列表
|
||||
*/
|
||||
public void setSongList(List<SongPlaylist.SongPlaylistBean> list) {
|
||||
if (list != null) {
|
||||
this.songList.clear();
|
||||
this.songList.addAll(list);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加歌曲列表(用于加载更多)
|
||||
*/
|
||||
public void addSongList(List<SongPlaylist.SongPlaylistBean> list) {
|
||||
if (list != null) {
|
||||
int startPos = this.songList.size();
|
||||
this.songList.addAll(list);
|
||||
notifyItemRangeInserted(startPos, list.size());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示或隐藏底部加载更多
|
||||
*/
|
||||
public void setShowFooter(boolean showFooter) {
|
||||
boolean wasShowing = this.isShowFooter;
|
||||
this.isShowFooter = showFooter;
|
||||
|
||||
if (wasShowing != showFooter) {
|
||||
if (showFooter) {
|
||||
notifyItemInserted(songList.size());
|
||||
} else {
|
||||
notifyItemRemoved(songList.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空列表
|
||||
*/
|
||||
public void clear() {
|
||||
this.songList.clear();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定位置的歌曲
|
||||
*/
|
||||
public SongPlaylist.SongPlaylistBean getItem(int position) {
|
||||
if (position >= 0 && position < songList.size()) {
|
||||
return songList.get(position);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通列表项ViewHolder
|
||||
*/
|
||||
static class SongViewHolder extends RecyclerView.ViewHolder {
|
||||
ItemRequestedSongBinding binding;
|
||||
|
||||
public SongViewHolder(@NonNull ItemRequestedSongBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 底部加载更多ViewHolder
|
||||
*/
|
||||
static class FooterViewHolder extends RecyclerView.ViewHolder {
|
||||
public FooterViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.xscm.modulemain.activity.room.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.view.RoomJukeboxWheatView;
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||
|
||||
public class RoomJukeboxAdapter extends BaseQuickAdapter<RoomPitBean, BaseViewHolder> {
|
||||
private OnWheatClickListener listener;
|
||||
|
||||
public interface OnWheatClickListener {
|
||||
void onWheatClick( RoomJukeboxWheatView roomJukeboxWheatView,int position);
|
||||
}
|
||||
|
||||
|
||||
public void setOnWheatClickListener(OnWheatClickListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
public RoomJukeboxAdapter(int layoutResId) {
|
||||
super(layoutResId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder helper, RoomPitBean item) {
|
||||
RoomJukeboxWheatView roomJukeboxWheatView= helper.getView(R.id.wheatView);
|
||||
// 确保pitNumber与数据匹配,而不是使用位置
|
||||
roomJukeboxWheatView.setRoomWheatNumber(item.getPit_number());
|
||||
roomJukeboxWheatView.setData(item);
|
||||
|
||||
roomJukeboxWheatView.setOnClickListener(v -> {
|
||||
if (listener != null) {
|
||||
listener.onWheatClick(roomJukeboxWheatView,helper.getLayoutPosition());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
package com.xscm.modulemain.activity.room.adapter;
|
||||
|
||||
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.bumptech.glide.Glide;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 歌曲列表适配器
|
||||
*/
|
||||
public class SongAdapter extends RecyclerView.Adapter<SongAdapter.ViewHolder> {
|
||||
|
||||
private List<SongPlaylist.SongPlaylistBean> songList = new ArrayList<>();
|
||||
private OnSongClickListener onSongClickListener;
|
||||
|
||||
public SongAdapter(List<SongPlaylist.SongPlaylistBean> songList) {
|
||||
this.songList = songList;
|
||||
}
|
||||
|
||||
public void setSongList(List<SongPlaylist.SongPlaylistBean> songList) {
|
||||
this.songList = songList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setOnSongClickListener(OnSongClickListener listener) {
|
||||
this.onSongClickListener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_song, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
SongPlaylist.SongPlaylistBean song = songList.get(position);
|
||||
|
||||
// 设置歌曲信息
|
||||
holder.tvSongName.setText(song.getSong_name());
|
||||
holder.tvSongSinger.setText("演唱者:" + song.getSinger_nickname());
|
||||
|
||||
// 设置礼物信息
|
||||
holder.tvGiftName.setText(song.getGift_name()+"*"+song.getGift_num());
|
||||
holder.tvGiftPrice.setText(song.getGift_price());
|
||||
|
||||
// 加载礼物图片
|
||||
Glide.with(holder.itemView.getContext())
|
||||
.load(song.getBase_image())
|
||||
.into(holder.ivGiftImage);
|
||||
|
||||
// 设置状态
|
||||
holder.tvGiftStatus.setText("点歌");
|
||||
|
||||
// 设置点击事件
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
if (onSongClickListener != null) {
|
||||
onSongClickListener.onSongClick(song, position);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return songList.size();
|
||||
}
|
||||
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvSongName;
|
||||
TextView tvSongSinger;
|
||||
ImageView ivGiftImage;
|
||||
TextView tvGiftName;
|
||||
TextView tvGiftPrice;
|
||||
TextView tvGiftStatus;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
tvSongName = itemView.findViewById(R.id.tv_song_name);
|
||||
tvSongSinger = itemView.findViewById(R.id.tv_song_singer);
|
||||
ivGiftImage = itemView.findViewById(R.id.iv_gift_image);
|
||||
tvGiftName = itemView.findViewById(R.id.tv_gift_name);
|
||||
tvGiftPrice = itemView.findViewById(R.id.tv_gift_price);
|
||||
tvGiftStatus = itemView.findViewById(R.id.tv_gift_status);
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnSongClickListener {
|
||||
void onSongClick(SongPlaylist.SongPlaylistBean song, int position);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.xscm.modulemain.activity.room.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
|
||||
/**
|
||||
* 歌曲历史记录适配器
|
||||
* 继承自BaseQuickAdapter,用于展示歌曲播放历史列表
|
||||
*
|
||||
*/
|
||||
public class SongHistoryAdapter extends BaseQuickAdapter<SongPlaylist.SongPlaylistBean, BaseViewHolder> {
|
||||
/**
|
||||
* 构造函数
|
||||
* 初始化适配器,设置历史记录项的布局文件
|
||||
*/
|
||||
public SongHistoryAdapter() {
|
||||
super(R.layout.item_history);
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法:将数据绑定到视图
|
||||
*
|
||||
* @param helper ViewHolder对象,用于获取视图组件
|
||||
* @param item 当前项的数据对象,包含歌曲的详细信息
|
||||
*/
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder helper, SongPlaylist.SongPlaylistBean item) {
|
||||
// 设置歌曲名称
|
||||
helper.setText(R.id.tv_song_name,item.getSong_name());
|
||||
// 设置演唱者信息,添加"演唱者:"前缀
|
||||
helper.setText(R.id.tv_song_singer,"演唱者:"+item.getSinger_nickname());
|
||||
// 设置礼物信息,包含礼物名称和数量
|
||||
helper.setText(R.id.tv_gift_name,item.getGift_name()+"*"+item.getGift_num());
|
||||
// 设置礼物价格
|
||||
helper.setText(R.id.tv_gift_price,item.getGift_price());
|
||||
// 设置老板昵称,添加"老板:"前缀
|
||||
helper.setText(R.id.tv_boss_name,"老板:"+item.getBoss_nickname());
|
||||
// 加载礼物图片
|
||||
ImageUtils.loadHead(item.getBase_image(),helper.getView(R.id.iv_gift_image));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.xscm.modulemain.activity.room.adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 麦位选择适配器
|
||||
*/
|
||||
public class WheatPositionAdapter extends RecyclerView.Adapter<WheatPositionAdapter.ViewHolder> {
|
||||
|
||||
private List<RoomPitBean> wheatPositions = new ArrayList<>();
|
||||
private int selectedPosition = 0;
|
||||
private OnItemSelectedListener onItemSelectedListener;
|
||||
|
||||
public WheatPositionAdapter(List<RoomPitBean> wheatPositions) {
|
||||
// 确保wheatPositions不为null
|
||||
if (wheatPositions == null) {
|
||||
this.wheatPositions = new ArrayList<>();
|
||||
} else {
|
||||
this.wheatPositions = new ArrayList<>(wheatPositions);
|
||||
}
|
||||
// 添加"全部"选项
|
||||
addAllOption();
|
||||
}
|
||||
|
||||
public void setWheatPositions(List<RoomPitBean> wheatPositions) {
|
||||
// 确保wheatPositions不为null
|
||||
if (wheatPositions == null) {
|
||||
this.wheatPositions = new ArrayList<>();
|
||||
} else {
|
||||
this.wheatPositions = new ArrayList<>(wheatPositions);
|
||||
}
|
||||
// 添加"全部"选项
|
||||
addAllOption();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加"全部"选项
|
||||
*/
|
||||
private void addAllOption() {
|
||||
// 创建一个"全部"选项的RoomPitBean
|
||||
RoomPitBean allOption = new RoomPitBean();
|
||||
allOption.setId("-1"); // 使用-1作为"全部"的ID
|
||||
allOption.setPit_number("全部");
|
||||
allOption.setOccupied(false);
|
||||
if (wheatPositions != null) {
|
||||
// 检查是否已经存在"全部"选项
|
||||
boolean hasAllOption = false;
|
||||
for (RoomPitBean bean : wheatPositions) {
|
||||
if ("-1".equals(bean.getId())) {
|
||||
hasAllOption = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 如果不存在"全部"选项,则添加到列表开头
|
||||
if (!hasAllOption) {
|
||||
wheatPositions.add(0, allOption);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setSelectedPosition(int position) {
|
||||
if (position >= 0 && position < wheatPositions.size()) {
|
||||
int lastSelectedPosition = selectedPosition;
|
||||
selectedPosition = position;
|
||||
notifyItemChanged(lastSelectedPosition);
|
||||
notifyItemChanged(selectedPosition);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
|
||||
this.onItemSelectedListener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_wheat_position, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
RoomPitBean wheatPosition = wheatPositions.get(position);
|
||||
|
||||
// 特殊处理"全部"选项的显示
|
||||
if ("-1".equals(wheatPosition.getId())) {
|
||||
holder.tvName.setText("全部");
|
||||
} else {
|
||||
holder.tvName.setText(wheatPosition.getPit_number() + "号麦");
|
||||
}
|
||||
|
||||
// 设置选中状态
|
||||
if (position == selectedPosition) {
|
||||
holder.itemView.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
} else {
|
||||
// "全部"选项使用默认背景,不受占用状态影响
|
||||
if ("-1".equals(wheatPosition.getId())) {
|
||||
holder.itemView.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_2b2935);
|
||||
} else {
|
||||
holder.itemView.setBackgroundResource(wheatPosition.isOccupied() ?
|
||||
com.xscm.moduleutil.R.drawable.bg_r16_3abc6d : com.xscm.moduleutil.R.drawable.bg_r16_2b2935);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置点击事件
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
// "全部"选项始终可点击
|
||||
if ("-1".equals(wheatPosition.getId()) || !wheatPosition.isOccupied()) {
|
||||
setSelectedPosition(position);
|
||||
if (onItemSelectedListener != null) {
|
||||
onItemSelectedListener.onItemSelected(wheatPosition);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return wheatPositions.size();
|
||||
}
|
||||
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView tvName;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
tvName = itemView.findViewById(R.id.tv_name);
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnItemSelectedListener {
|
||||
void onItemSelected(RoomPitBean wheatPosition);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.xscm.modulemain.activity.room.contacts;
|
||||
|
||||
import android.app.Activity;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
|
||||
/**
|
||||
* com.example.moduleroom.contacts
|
||||
* qx
|
||||
* 2025/11/12
|
||||
*/
|
||||
public class JukeboxContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
void applyPit();
|
||||
void setMutePit(String pitNumber, String is_mute);
|
||||
|
||||
void setLockPit(String pitNumber, String is_lock);
|
||||
}
|
||||
public interface IRoomPre extends IPresenter {
|
||||
void applyPit(String roomId, String pitNumber);
|
||||
|
||||
void setMutePit(String roomId, String pitNumber,String is_mute);//禁麦
|
||||
|
||||
void setLockPit(String roomId, String pitNumber, String is_lock);
|
||||
void singerSongCut(String id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.xscm.modulemain.activity.room.contacts;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.SingerSongCount;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RequestSongContacts {
|
||||
|
||||
public interface View extends IView<Activity> {
|
||||
void getSong(SongPlaylist s);
|
||||
void finishComment();
|
||||
|
||||
void singerSong();
|
||||
|
||||
//添加处理歌曲列表的方法
|
||||
void singerSongList(SongPlaylist s);
|
||||
void singerSongTop(String s);
|
||||
|
||||
void singerSongCount(SingerSongCount s);
|
||||
}
|
||||
|
||||
public interface IRoomPre extends IPresenter {
|
||||
void getSong(String userId,String roomId,String page,String pageSize);
|
||||
|
||||
void singerSong(String song_id,String roomId);
|
||||
|
||||
void singerSongList(String room_id,String type,String page,String page_limit);
|
||||
|
||||
void singerSongTop(String id);
|
||||
|
||||
void singerSongCount(String roomId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -71,8 +71,10 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
easeChatAdapter.clearData();
|
||||
}
|
||||
|
||||
public ChatRoomFragment(){}
|
||||
public ChatRoomFragment(RoomInfoResp resp){
|
||||
public ChatRoomFragment() {
|
||||
}
|
||||
|
||||
public ChatRoomFragment(RoomInfoResp resp) {
|
||||
roomInfoResp = resp;
|
||||
|
||||
roomId = resp.getRoom_info().getRoom_id();
|
||||
@@ -212,7 +214,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
|
||||
|
||||
public void upRoomInfo(RoomInfoResp resp){
|
||||
public void upRoomInfo(RoomInfoResp resp) {
|
||||
if (resp == null)
|
||||
return;
|
||||
roomInfoResp = resp;
|
||||
@@ -285,7 +287,6 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setUpPublicScreen() {
|
||||
//如果有数据或者recycle view有item view就删除;否则程序崩溃,找不到item
|
||||
if (mBinding.recycleViewPublic.getChildCount() > 0) {
|
||||
@@ -299,7 +300,6 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.room_fragement_trans_ease_chat;
|
||||
@@ -350,6 +350,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void fasong(RoomInputEvent roomInputEvent) {
|
||||
String message = roomInputEvent.text;
|
||||
RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
@@ -439,7 +440,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
return;
|
||||
}
|
||||
|
||||
if (roomId == null ||(!message.getRoomId().contains(roomId)&&message.getMsgType()!=125)) {
|
||||
if (roomId == null || (!message.getRoomId().contains(roomId) && message.getMsgType() != 125)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -542,6 +543,8 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
case 1061:
|
||||
case 1025:
|
||||
case 1058:
|
||||
case 1072:
|
||||
case 1071:
|
||||
case 125:
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).roomInfoEvent(message);
|
||||
@@ -620,7 +623,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
private EMMessageInfo createMessageInfoIfNeeded(RoomMessageEvent message) {
|
||||
int msgType = message.getMsgType();
|
||||
RoomMessageEvent.T text = message.getText();
|
||||
if (text.getIs_pk()!=null&&text.getIs_pk().equals("1")){
|
||||
if (text.getIs_pk() != null && text.getIs_pk().equals("1")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -654,7 +657,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
}
|
||||
|
||||
private void addSingleMessage(RoomMessageEvent message) {
|
||||
if (message.getText().getIs_pk()!=null&&message.getText().getIs_pk().equals("1")){
|
||||
if (message.getText().getIs_pk() != null && message.getText().getIs_pk().equals("1")) {
|
||||
return;
|
||||
}
|
||||
if (easeChatAdapter != null) {
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
package com.xscm.modulemain.activity.room.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import android.view.Gravity;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity;
|
||||
import com.xscm.modulemain.activity.room.contacts.RequestSongContacts;
|
||||
import com.xscm.modulemain.activity.room.presenter.RequestSongPresenter;
|
||||
import com.xscm.modulemain.activity.room.adapter.RequestSongPagerAdapter;
|
||||
import com.xscm.modulemain.databinding.FragmentRequestSongBinding;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.xscm.moduleutil.bean.SingerSongCount;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
/**
|
||||
点歌展示的页面
|
||||
*/
|
||||
public class RequestSongFragment extends BaseMvpDialogFragment<RequestSongPresenter, FragmentRequestSongBinding> implements RequestSongContacts.View{
|
||||
|
||||
private RequestSongPagerAdapter pagerAdapter;
|
||||
private final String[] tabTitles = new String[]{"点歌", "已点歌曲", "历史记录"};
|
||||
private int requestedSongsCount = 0; // 已点歌曲数量
|
||||
private int historySongsCount = 0; // 历史记录数量
|
||||
private String roomId;
|
||||
|
||||
public RequestSongFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static RequestSongFragment show(FragmentManager fragmentManager) {
|
||||
RequestSongFragment fragment = new RequestSongFragment();
|
||||
Bundle args = new Bundle();
|
||||
fragment.show(fragmentManager, "RequestSongFragment");
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
if (getActivity() != null) {
|
||||
// 假设Activity有获取麦位数据的方法
|
||||
roomId = ((RoomActivity) getActivity()).getRoomIds();
|
||||
}
|
||||
// 初始化数据
|
||||
MvpPre.singerSongCount(roomId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
// 初始化ViewPager2和TabLayout
|
||||
initViewPager();
|
||||
}
|
||||
|
||||
private void initViewPager() {
|
||||
// 创建适配器
|
||||
pagerAdapter = new RequestSongPagerAdapter(getActivity());
|
||||
|
||||
// 设置适配器
|
||||
mBinding.viewPager.setAdapter(pagerAdapter);
|
||||
|
||||
// 设置TabLayout和ViewPager2的联动
|
||||
new TabLayoutMediator(mBinding.tabLayout, mBinding.viewPager, (tab, position) -> {
|
||||
String title = tabTitles[position];
|
||||
if (position == 1) { // 已点歌曲
|
||||
title = "已点歌曲(" + requestedSongsCount + ")";
|
||||
} else if (position == 2) { // 历史记录
|
||||
title = "历史记录";
|
||||
}
|
||||
tab.setText(title);
|
||||
}).attach();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
super.initDialogStyle(window);
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
// 注册EventBus
|
||||
|
||||
Window window = getDialog().getWindow();
|
||||
if (window != null) {
|
||||
// 获取屏幕高度
|
||||
WindowManager wm = getActivity().getWindowManager();
|
||||
int screenHeight = wm.getDefaultDisplay().getHeight();
|
||||
// 设置高度为屏幕高度的510/812
|
||||
int dialogHeight = (int) (screenHeight * 510.0 / 812.0);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, dialogHeight);
|
||||
// 可选:设置动画样式(从底部弹出)
|
||||
window.setWindowAnimations(com.xscm.moduleutil.R.style.CommonShowDialogBottom);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_request_song;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RequestSongPresenter bindPresenter() {
|
||||
return new RequestSongPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(SongPlaylist s) {
|
||||
// 更新已点歌曲数量
|
||||
|
||||
}
|
||||
|
||||
public void setRequestedSongsCount(int count) {
|
||||
this.requestedSongsCount = count;
|
||||
updateTabTitles();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishComment() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSong() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongList(SongPlaylist s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongTop(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongCount(SingerSongCount s) {
|
||||
requestedSongsCount=s.getAlready();
|
||||
updateTabTitles();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新Tab标题显示数量
|
||||
*/
|
||||
private void updateTabTitles() {
|
||||
if (mBinding.tabLayout.getTabCount() > 0) {
|
||||
// 更新已点歌曲Tab
|
||||
if (mBinding.tabLayout.getTabAt(1) != null) {
|
||||
mBinding.tabLayout.getTabAt(1).setText("已点歌曲(" + requestedSongsCount + ")");
|
||||
}
|
||||
// 更新历史记录Tab
|
||||
if (mBinding.tabLayout.getTabAt(2) != null) {
|
||||
mBinding.tabLayout.getTabAt(2).setText("历史记录");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置历史记录数量
|
||||
* @param count 历史记录数量
|
||||
*/
|
||||
public void setHistorySongsCount(int count) {
|
||||
this.historySongsCount = count;
|
||||
updateTabTitles();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新当前页面的数据
|
||||
*/
|
||||
public void updateCurrentPageData() {
|
||||
// 获取当前ViewPager选中的页面位置
|
||||
int currentItem = mBinding.viewPager.getCurrentItem();
|
||||
|
||||
// 如果是已点歌曲页面(位置1),则刷新数据
|
||||
if (currentItem == 1) {
|
||||
// 获取适配器
|
||||
if (pagerAdapter != null) {
|
||||
// 获取Fragment并刷新数据
|
||||
// 注意:ViewPager2中的Fragment可能还未创建或已被销毁,所以需要检查
|
||||
try {
|
||||
// 通过反射获取当前显示的Fragment
|
||||
androidx.viewpager2.adapter.FragmentStateAdapter adapter = pagerAdapter;
|
||||
java.lang.reflect.Method createFragmentMethod = androidx.viewpager2.adapter.FragmentStateAdapter.class.getDeclaredMethod("createFragment", int.class);
|
||||
createFragmentMethod.setAccessible(true);
|
||||
androidx.fragment.app.Fragment fragment = (androidx.fragment.app.Fragment) createFragmentMethod.invoke(adapter, currentItem);
|
||||
|
||||
// 如果是RequestedSongsFragment,则刷新数据
|
||||
if (fragment instanceof RequestedSongsFragment) {
|
||||
((RequestedSongsFragment) fragment).refreshData();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
package com.xscm.modulemain.activity.room.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.constant.RefreshState;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity;
|
||||
import com.xscm.modulemain.activity.room.adapter.RequestedSongsAdapter;
|
||||
import com.xscm.modulemain.activity.room.contacts.RequestSongContacts;
|
||||
import com.xscm.modulemain.activity.room.presenter.RequestSongPresenter;
|
||||
import com.xscm.modulemain.databinding.FragmentRequestedSongsBinding;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.SingerSongCount;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 已点歌曲页面Fragment
|
||||
*/
|
||||
public class RequestedSongsFragment extends BaseMvpFragment<RequestSongPresenter, FragmentRequestedSongsBinding> implements RequestSongContacts.View {
|
||||
|
||||
private String roomId;
|
||||
private int page = 1;
|
||||
private RequestedSongsAdapter adapter;
|
||||
private List<SongPlaylist.SongPlaylistBean> songList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected RequestSongPresenter bindPresenter() {
|
||||
return new RequestSongPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return super.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
// 初始化RecyclerView
|
||||
initRecyclerView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
if (getActivity() != null) {
|
||||
// 假设Activity有获取麦位数据的方法
|
||||
roomId = ((RoomActivity) getActivity()).getRoomIds();
|
||||
}
|
||||
|
||||
// 显示加载中状态
|
||||
mBinding.smartRefreshLayout.autoRefresh();
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
// 初始化RecyclerView
|
||||
adapter = new RequestedSongsAdapter();
|
||||
mBinding.rvMyRequestedSongs.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
mBinding.rvMyRequestedSongs.setAdapter(adapter);
|
||||
|
||||
// 设置点击监听
|
||||
adapter.setOnItemClickListener(new RequestedSongsAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onPlayClick(SongPlaylist.SongPlaylistBean song, int position) {
|
||||
// 处理播放点击
|
||||
if (song != null) {
|
||||
// MvpPre.singerSong(song.singer_song_id, roomId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTopClick(SongPlaylist.SongPlaylistBean song, int position) {
|
||||
// 处理置顶点击
|
||||
if (song != null) {
|
||||
// 这里可以添加置顶逻辑
|
||||
// ToastUtil.showShort("已置顶: " + song.song_name);
|
||||
MvpPre.singerSongTop(song.getId()+"");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 设置刷新和加载更多监听
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.singerSongList(roomId, "1", page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
MvpPre.singerSongList(roomId, "1", page + "", "10");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_requested_songs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(SongPlaylist s) {
|
||||
// 这个方法似乎不是我们需要的,可能用于其他功能
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishComment() {
|
||||
// 评论完成回调
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSong() {
|
||||
// 歌曲播放回调
|
||||
// 可以在这里更新UI,显示当前播放状态
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongList(SongPlaylist s) {
|
||||
// 这个方法似乎是处理单个歌曲的,我们可能需要另一个方法处理列表
|
||||
|
||||
if (s != null &&s.getLists()!=null && s.getLists().size() > 0 ) {
|
||||
// 判断当前是刷新还是加载更多
|
||||
RefreshState state = mBinding.smartRefreshLayout.getState();
|
||||
if (state == RefreshState.Refreshing) {
|
||||
// 刷新,清空列表并添加新数据
|
||||
songList.clear();
|
||||
songList.addAll(s.getLists());
|
||||
adapter.setSongList(songList);
|
||||
mBinding.smartRefreshLayout.finishRefresh(true);
|
||||
} else if (state == RefreshState.Loading) {
|
||||
// 加载更多,添加数据到列表
|
||||
if (s.getLists().size() > 0) {
|
||||
songList.addAll(s.getLists());
|
||||
adapter.addSongList(songList);
|
||||
adapter.setShowFooter(true);
|
||||
mBinding.smartRefreshLayout.finishLoadMore(true);
|
||||
} else {
|
||||
// 没有更多数据
|
||||
adapter.setShowFooter(false);
|
||||
mBinding.smartRefreshLayout.finishLoadMoreWithNoMoreData();
|
||||
}
|
||||
} else {
|
||||
// 首次加载
|
||||
songList.clear();
|
||||
songList.addAll(s.getLists());
|
||||
adapter.setSongList(songList);
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
}
|
||||
|
||||
// 显示或隐藏空视图
|
||||
if (songList.isEmpty()) {
|
||||
mBinding.tvNoRequestedSongs.setVisibility(View.VISIBLE);
|
||||
mBinding.rvMyRequestedSongs.setVisibility(View.GONE);
|
||||
} else {
|
||||
mBinding.tvNoRequestedSongs.setVisibility(View.GONE);
|
||||
mBinding.rvMyRequestedSongs.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
// 数据为空
|
||||
if (mBinding.smartRefreshLayout.getState() == RefreshState.Refreshing) {
|
||||
mBinding.smartRefreshLayout.finishRefresh(false);
|
||||
} else if (mBinding.smartRefreshLayout.getState() == RefreshState.Loading) {
|
||||
mBinding.smartRefreshLayout.finishLoadMore(false);
|
||||
}
|
||||
|
||||
// 显示空视图
|
||||
mBinding.tvNoRequestedSongs.setVisibility(View.VISIBLE);
|
||||
mBinding.rvMyRequestedSongs.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongTop(String s) {
|
||||
page = 1;
|
||||
MvpPre.singerSongList(roomId, "1", page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongCount(SingerSongCount s) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新数据
|
||||
*/
|
||||
public void refreshData() {
|
||||
// 重新加载数据
|
||||
if (getActivity() != null) {
|
||||
roomId = ((RoomActivity) getActivity()).getRoomIds();
|
||||
}
|
||||
if (roomId != null && !roomId.isEmpty()) {
|
||||
page = 1;
|
||||
MvpPre.singerSongList(roomId, "1", page + "", "10");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,6 +98,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
private RoomCabinFragment roomCabinFragment;// 小黑屋
|
||||
|
||||
private RoomJukeboxFragment roomJukeboxFragment;//点唱房
|
||||
|
||||
public QXRoomSeatViewType qxRoomSeatViewType;
|
||||
|
||||
private void setRoomSeatViewType() {
|
||||
@@ -110,18 +112,20 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
|
||||
RoomType roomType = RoomType.Companion.fromTypeId(typeId);
|
||||
|
||||
if (roomType == RoomType.AUCTION){
|
||||
if (roomType == RoomType.AUCTION) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.AUCTION;
|
||||
}else if (roomType == RoomType.DATING){
|
||||
} else if (roomType == RoomType.DATING) {
|
||||
if ("2".equals(labelId)) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.KTV;
|
||||
} else if ("1".equals(labelId)) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.NORMAL;
|
||||
}
|
||||
}else if (roomType == RoomType.MUTUAL_ENTERTAINMENT){
|
||||
} else if (roomType == RoomType.MUTUAL_ENTERTAINMENT) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.FRIEND;
|
||||
}else if (roomType == RoomType.BLACK_ROOM){
|
||||
} else if (roomType == RoomType.BLACK_ROOM) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.CABIN;
|
||||
} else if (roomType == RoomType.JUKEBOX) {
|
||||
qxRoomSeatViewType = QXRoomSeatViewType.JUKEBOX;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,9 +175,6 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放所有子Fragment
|
||||
*/
|
||||
/**
|
||||
* 释放所有子Fragment
|
||||
*/
|
||||
@@ -195,6 +196,8 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
((RoomCabinFragment) fragment).releaseResources();
|
||||
} else if (fragment instanceof RoomAuctionFragment) {
|
||||
((RoomAuctionFragment) fragment).releaseResources();
|
||||
} else if (fragment instanceof RoomJukeboxFragment) {
|
||||
// ((RoomJukeboxFragment) fragment).releaseResources();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -293,6 +296,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
if (roomCabinFragment != null && roomCabinFragment.isAdded()) {
|
||||
roomCabinFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
} else if (roomType == RoomType.JUKEBOX) {
|
||||
if (roomJukeboxFragment != null && roomJukeboxFragment.isAdded()) {
|
||||
roomJukeboxFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -407,18 +414,23 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
else roomCabinFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
newFragment = roomCabinFragment;
|
||||
setviewyc();
|
||||
} else if (roomType == RoomType.JUKEBOX) {
|
||||
if (roomJukeboxFragment == null)
|
||||
roomJukeboxFragment = RoomJukeboxFragment.newInstance(mRoomInfoResp);
|
||||
else roomJukeboxFragment.roomInfoUpdate(mRoomInfoResp);
|
||||
newFragment = roomJukeboxFragment;
|
||||
}
|
||||
|
||||
if (newFragment != null) {
|
||||
replaceNestedFragment(newFragment, R.id.container);
|
||||
}else {
|
||||
} else {
|
||||
LogUtils.e("newFragment==null");
|
||||
}
|
||||
|
||||
setView();
|
||||
|
||||
// if (mRoomInfoResp.getUser_info().getPit_number() != 0) {
|
||||
// mRoomActivity.switchMic(CommonAppContext.getInstance().isMai?1:2);
|
||||
// mRoomActivity.switchMic(CommonAppContext.getInstance().isMai ? 1 : 2);
|
||||
// AgoraManager.getInstance().muteLocalAudioStream(CommonAppContext.getInstance().isMai);
|
||||
// } else {
|
||||
// AgoraManager.getInstance().muteLocalAudioStream(true);
|
||||
@@ -896,6 +908,10 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
handleFriendshipEvent(messageEvent);
|
||||
}
|
||||
break;
|
||||
case JUKEBOX:
|
||||
if (roomJukeboxFragment != null) {
|
||||
handleJukeboxEvent(messageEvent);
|
||||
}
|
||||
|
||||
case CABIN:
|
||||
default:
|
||||
@@ -904,6 +920,66 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 2025/11/17 点唱房
|
||||
private void handleJukeboxEvent(RoomMessageEvent messageEvent) {
|
||||
switch (messageEvent.getMsgType()) {
|
||||
case 1037:
|
||||
// roomJukeboxFragment.event1037(messageEvent);
|
||||
break;
|
||||
case 1003:
|
||||
roomJukeboxFragment.event1003(messageEvent);
|
||||
break;
|
||||
case 1004:
|
||||
roomJukeboxFragment.event1004(messageEvent);
|
||||
break;
|
||||
case 1005:
|
||||
// roomJukeboxFragment.event1005(messageEvent);
|
||||
break;
|
||||
case 1015:
|
||||
// roomJukeboxFragment.event1015(messageEvent);
|
||||
break;
|
||||
case 1030:
|
||||
break;
|
||||
|
||||
case 1031:
|
||||
// singSongFragment.event1031(messageEvent);
|
||||
break;
|
||||
case 1032:
|
||||
// singSongFragment.event1032(messageEvent);
|
||||
break;
|
||||
case 1033:
|
||||
// singSongFragment.event1033(messageEvent);
|
||||
break;
|
||||
case 1035:
|
||||
// singSongFragment.event1035(messageEvent);
|
||||
break;
|
||||
case 1021:
|
||||
// singSongFragment.event1021(messageEvent);
|
||||
break;
|
||||
case 1059:
|
||||
// singSongFragment.event1059(messageEvent);
|
||||
break;
|
||||
case 1058:
|
||||
// singSongFragment.event1058(messageEvent);
|
||||
break;
|
||||
case 1039:
|
||||
roomJukeboxFragment.event1039(messageEvent);
|
||||
break;
|
||||
case 1072:
|
||||
roomJukeboxFragment.event1072(messageEvent);
|
||||
break;
|
||||
case 1070:
|
||||
roomJukeboxFragment.event1070(messageEvent);
|
||||
break;
|
||||
case 1071:
|
||||
roomJukeboxFragment.event1071(messageEvent);
|
||||
break;
|
||||
default:
|
||||
LogUtils.w("Unhandled KTV message type: " + messageEvent.getMsgType());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO: Ktv模式
|
||||
private void handleKtvEvent(RoomMessageEvent messageEvent) {
|
||||
|
||||
@@ -0,0 +1,615 @@
|
||||
package com.xscm.modulemain.activity.room.fragment;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity;
|
||||
import com.xscm.modulemain.activity.room.contacts.JukeboxContacts;
|
||||
import com.xscm.modulemain.activity.room.presenter.JukeboxPresenter;
|
||||
import com.xscm.modulemain.activity.room.adapter.RoomJukeboxAdapter;
|
||||
import com.xscm.modulemain.databinding.FragmentJukeboxBinding;
|
||||
import com.xscm.modulemain.dialog.RoomOnlineDialogFragment;
|
||||
import com.xscm.modulemain.dialog.RoomUserInfoFragment;
|
||||
import com.xscm.modulemain.view.RoomJukeboxWheatView;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||
import com.xscm.moduleutil.rtc.AgoraManager;
|
||||
import com.xscm.moduleutil.utils.ClickUtils;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点唱房
|
||||
*/
|
||||
public class RoomJukeboxFragment extends BaseMvpFragment<JukeboxPresenter, FragmentJukeboxBinding> implements JukeboxContacts.View {
|
||||
RoomInfoResp roomInfoResp;
|
||||
RoomJukeboxAdapter adapter;
|
||||
private String roomId;
|
||||
private PopupWindow popupWindow;
|
||||
protected String pitNumber;//当前点击的麦序
|
||||
private RoomPitBean roomPitBean;
|
||||
private static final long CLICK_INTERVAL = 500; // 500ms内不允许重复点击
|
||||
private RequestSongFragment requestSongFragment; // 保存RequestSongFragment的引用
|
||||
private long lastClickTime = 0;
|
||||
private String lastClickedUserId = ""; // 记录上次点击的用户ID
|
||||
private String lastClickedPitNumber = ""; // 记录上次点击的麦位号
|
||||
private int myPitNumber;
|
||||
private RoomFragment parentFragment;
|
||||
private int songId;//歌曲id,当前歌曲的
|
||||
|
||||
public RoomJukeboxFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
public RoomJukeboxFragment(RoomInfoResp roomInfoResp) {
|
||||
this.roomInfoResp = roomInfoResp;
|
||||
}
|
||||
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static RoomJukeboxFragment newInstance(RoomInfoResp roomInfoResp) {
|
||||
RoomJukeboxFragment fragment = new RoomJukeboxFragment(roomInfoResp);
|
||||
Bundle args = new Bundle();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JukeboxPresenter bindPresenter() {
|
||||
return new JukeboxPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
setRoomInfo(roomInfoResp);
|
||||
parentFragment = (RoomFragment) getParentFragment();
|
||||
}
|
||||
|
||||
private void setRoomInfo(RoomInfoResp roomInfoResp) {
|
||||
this.roomInfoResp = roomInfoResp;
|
||||
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
||||
|
||||
setView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
mBinding.guestContainer.setVisibility(GONE);
|
||||
adapter = new RoomJukeboxAdapter(R.layout.item_jukebox);
|
||||
GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 4);
|
||||
mBinding.rvJukebox.setLayoutManager(layoutManager);
|
||||
mBinding.rvJukebox.setAdapter(adapter);
|
||||
adapter.setOnWheatClickListener(new RoomJukeboxAdapter.OnWheatClickListener() {
|
||||
|
||||
@Override
|
||||
public void onWheatClick(RoomJukeboxWheatView roomJukeboxWheatView, int position) {
|
||||
|
||||
if (ClickUtils.isFastDoubleClick(roomJukeboxWheatView)) {
|
||||
return;
|
||||
}
|
||||
|
||||
RoomPitBean pitBean = roomJukeboxWheatView.pitBean;
|
||||
// 可选:点击事件处理
|
||||
Log.d("Wheat", "Clicked pit: " + position);
|
||||
if (!pitBean.getUser_id().equals("0") && !pitBean.getUser_id().isEmpty()) {
|
||||
RoomUserInfoFragment.show(roomId, pitBean.getUser_id(), pitBean.getPit_number(), getHostUser(), false, 3, isNumberWhether(), getChildFragmentManager());
|
||||
} else {
|
||||
if (cheackWether(pitBean.getPit_number())) {
|
||||
pitNumber = pitBean.getPit_number();
|
||||
roomPitBean = pitBean;
|
||||
showPopupMenu(roomJukeboxWheatView); // v 是点击的按钮视图
|
||||
} else if ((position + 1) == 10) {
|
||||
if (ActivityUtils.getTopActivity() instanceof RoomActivity) {
|
||||
if (((RoomActivity) ActivityUtils.getTopActivity()).getHostUser() < 4) {
|
||||
if (!isFastDoubleClick("online_dialog", position + 1 + "")) {
|
||||
RoomOnlineDialogFragment.show(roomId, position + 1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
}
|
||||
} else {
|
||||
com.hjq.toast.ToastUtils.show("请等待主持抱麦");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
MvpPre.applyPit(roomId, position + 1 + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
mBinding.wvZc.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (ClickUtils.isFastDoubleClick(v)) {
|
||||
return;
|
||||
}
|
||||
if (!mBinding.wvZc.getUserId().equals("") && !mBinding.wvZc.getUserId().equals("0")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.wvZc.getUserId(), mBinding.wvZc.pitNumber, getHostUser(), false, 2, isNumberWhether(), getChildFragmentManager());
|
||||
} else {
|
||||
MvpPre.applyPit(roomInfoResp.getRoom_info().getRoom_id(), "9");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.imDg.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (ClickUtils.isFastDoubleClick(v)) {
|
||||
return;
|
||||
}
|
||||
// 保存RequestSongFragment的引用,以便后续调用其方法
|
||||
requestSongFragment = RequestSongFragment.show(getChildFragmentManager());
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.imQg.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MvpPre.singerSongCut(songId+"");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否为快速重复点击
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param pitNumber 麦位号
|
||||
* @return true表示是快速重复点击,false表示不是
|
||||
*/
|
||||
private boolean isFastDoubleClick(String userId, String pitNumber) {
|
||||
long currentTime = System.currentTimeMillis();
|
||||
if (currentTime - lastClickTime < CLICK_INTERVAL &&
|
||||
userId.equals(lastClickedUserId) &&
|
||||
pitNumber.equals(lastClickedPitNumber)) {
|
||||
return true; // 是快速重复点击
|
||||
}
|
||||
|
||||
// 更新上次点击信息
|
||||
lastClickTime = currentTime;
|
||||
lastClickedUserId = userId;
|
||||
lastClickedPitNumber = pitNumber;
|
||||
return false; // 不是快速重复点击
|
||||
}
|
||||
|
||||
private void showPopupMenu(View anchorView) {
|
||||
if (popupWindow != null && !popupWindow.isShowing()) {
|
||||
// 获取锚点视图的坐标
|
||||
int[] location = new int[2];
|
||||
anchorView.getLocationOnScreen(location);
|
||||
|
||||
// 设置弹出位置
|
||||
popupWindow.showAtLocation(anchorView, Gravity.NO_GRAVITY, location[0], location[1] + anchorView.getHeight());
|
||||
|
||||
setPopupMenuClickListener(popupWindow.getContentView(), anchorView);
|
||||
}
|
||||
}
|
||||
|
||||
private void setPopupMenuClickListener(View popupView, View view) {
|
||||
|
||||
TextView tvHugMic = popupView.findViewById(R.id.tv_hug_mic);
|
||||
Switch switchCloseMic = popupView.findViewById(R.id.sw_close_mic);
|
||||
Switch switchLockMic = popupView.findViewById(R.id.sw_lock_mic);
|
||||
if (view != null) {
|
||||
switchCloseMic.setChecked(roomPitBean.getIs_mute() == 1 ? true : false);//是否禁麦
|
||||
switchLockMic.setChecked(roomPitBean.getIs_lock() == 1 ? true : false);//是否闭麦
|
||||
}
|
||||
switchCloseMic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
MvpPre.setMutePit(roomId, pitNumber + "", b ? "2" : "4");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
switchLockMic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||
MvpPre.setLockPit(roomId, pitNumber + "", b ? "1" : "0");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
tvHugMic.setOnClickListener(v -> {
|
||||
// 处理抱麦逻辑
|
||||
RoomOnlineDialogFragment.show(roomId, pitNumber, roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||
popupWindow.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
private int isNumberWhether() {
|
||||
if (roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int getHostUser() {
|
||||
if (roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
} else if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
} else if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
} else {
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||
return 2;
|
||||
}
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean cheackWether(String pitNumber) {
|
||||
if (roomInfoResp.getRoom_info().getRoom_up_pit_type().equals("1")) {//排麦模式
|
||||
if (roomInfoResp.getUser_info().getIs_management() == 1
|
||||
|| roomInfoResp.getUser_info().getIs_host() == 1
|
||||
|| roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||
if (pitNumber.equals("9")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
if (roomInfoResp.getRoom_info().getPit_list().size() > 8) {
|
||||
if (roomInfoResp.getUser_info().getPit_number() == 9 && !pitNumber.equals("10")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_jukebox;
|
||||
}
|
||||
|
||||
|
||||
public void roomInfoUpdate(RoomInfoResp roomInfoResp) {
|
||||
this.roomInfoResp = roomInfoResp;
|
||||
roomId = roomInfoResp == null ? "" : roomInfoResp.getRoom_info().getRoom_id();
|
||||
|
||||
setView();
|
||||
}
|
||||
|
||||
public void setView() {
|
||||
List<RoomPitBean> roomPitBeans = new ArrayList<>();
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
|
||||
|
||||
if (!roomPitBean.getPit_number().equals("9") && !roomPitBean.getPit_number().equals("10")) {
|
||||
roomPitBeans.add(roomPitBean);
|
||||
} else if (roomPitBean.getPit_number().equals("9")) {
|
||||
// 确保视图的pitNumber与数据的pit_number匹配
|
||||
mBinding.wvZc.setRoomWheatNumber("9");
|
||||
mBinding.wvZc.setData(roomPitBean);
|
||||
}
|
||||
}
|
||||
adapter.setNewData(roomPitBeans);
|
||||
|
||||
if (roomInfoResp.getSinger_info()!=null){
|
||||
if (roomInfoResp.getSinger_info().getSong_info()!=null){
|
||||
mBinding.tvPerformerName.setVisibility(GONE);
|
||||
mBinding.tvNetName.setVisibility(VISIBLE);
|
||||
mBinding.ciNetAva.setVisibility(VISIBLE);
|
||||
ImageUtils.loadHead(roomInfoResp.getSinger_info().getSong_info().getSinger_avatar(),mBinding.ciUserAva);
|
||||
mBinding.tvSong.setText("演唱歌曲:"+roomInfoResp.getSinger_info().getSong_info().getSong_name());
|
||||
ImageUtils.loadHead(roomInfoResp.getSinger_info().getSong_info().getBoss_avatar(),mBinding.ciNetAva);
|
||||
mBinding.tvNetName.setText("老板");
|
||||
songId= roomInfoResp.getSinger_info().getSong_info().getSinger_song_id();
|
||||
|
||||
if (roomInfoResp.getSinger_info().getNext_song_info()!=null){
|
||||
mBinding.guestContainer.setVisibility(View.VISIBLE);
|
||||
ImageUtils.loadHead(roomInfoResp.getSinger_info().getNext_song_info().getSinger_avatar(),mBinding.ciGsAva);
|
||||
mBinding.tvGsName.setText(roomInfoResp.getSinger_info().getNext_song_info().getSinger_nickname());
|
||||
}else {
|
||||
mBinding.guestContainer.setVisibility(GONE);
|
||||
}
|
||||
|
||||
String userId= String.valueOf(roomInfoResp.getSinger_info().getSong_info().getSinger_user_id());
|
||||
if(mBinding.wvZc.getUserId().equals(userId)){
|
||||
mBinding.wvZc.pitBean.setImageType(true);
|
||||
mBinding.wvZc.setData(mBinding.wvZc.pitBean);
|
||||
}else {
|
||||
for (RoomPitBean roomPitBean : roomPitBeans) {
|
||||
if (roomPitBean.getUser_id().equals(userId)){
|
||||
roomPitBean.setImageType(true);
|
||||
}else {
|
||||
roomPitBean.setImageType(false);
|
||||
}
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}else {
|
||||
mBinding.tvNetName.setVisibility(GONE);
|
||||
mBinding.ciNetAva.setVisibility(GONE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyPit() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMutePit(String pitNumber, String is_mute) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockPit(String pitNumber, String is_lock) {
|
||||
|
||||
}
|
||||
|
||||
public void event1003(RoomMessageEvent messageEvent) {
|
||||
UserInfo fromUserInfo = messageEvent.getText().getFromUserInfo();
|
||||
if (fromUserInfo == null) return;
|
||||
|
||||
String pitNumber = messageEvent.getText().getPit_number();
|
||||
int userId = fromUserInfo.getUser_id();
|
||||
|
||||
// 获取适配器数据
|
||||
List<RoomPitBean> dataList = adapter.getData();
|
||||
int position = Integer.parseInt(pitNumber) - 1;
|
||||
// 确保位置有效
|
||||
if (position < 0 || (position >= dataList.size() && !pitNumber.equals("9"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pitNumber.equals("9") || pitNumber.equals("10")) {
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setPit_number(pitNumber);
|
||||
pitBean.setUser_id(userId + "");
|
||||
pitBean.setAvatar(fromUserInfo.getAvatar());
|
||||
pitBean.setNickname(fromUserInfo.getNickname());
|
||||
pitBean.setSex(fromUserInfo.getSex() + "");
|
||||
pitBean.setCharm(fromUserInfo.getCharm());
|
||||
pitBean.setDress(fromUserInfo.getDress());
|
||||
|
||||
// 确保视图的pitNumber与数据的pit_number匹配
|
||||
if (pitNumber.equals("9")) {
|
||||
mBinding.wvZc.setRoomWheatNumber("9");
|
||||
mBinding.wvZc.setData(pitBean);
|
||||
}
|
||||
|
||||
} else {
|
||||
// 获取对应位置的bean并更新
|
||||
RoomPitBean pitBean = dataList.get(position);
|
||||
pitBean.setUser_id(userId + "");
|
||||
pitBean.setAvatar(fromUserInfo.getAvatar());
|
||||
pitBean.setNickname(fromUserInfo.getNickname());
|
||||
pitBean.setSex(fromUserInfo.getSex() + "");
|
||||
pitBean.setCharm(fromUserInfo.getCharm());
|
||||
pitBean.setDress(fromUserInfo.getDress());
|
||||
|
||||
// 使用set方法更新数据,然后通知适配器
|
||||
dataList.set(position, pitBean);
|
||||
adapter.notifyItemChanged(position);
|
||||
}
|
||||
|
||||
|
||||
if (userId == SpUtil.getUserId()) {
|
||||
myPitNumber = Integer.parseInt(pitNumber);
|
||||
if (pitNumber.equals("9")) {
|
||||
configGameOptionBtn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 配置操作按钮
|
||||
private void configGameOptionBtn() {
|
||||
if (myPitNumber == 9) {
|
||||
mBinding.imQg.setVisibility(VISIBLE);
|
||||
} else {
|
||||
mBinding.imQg.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void event1004(RoomMessageEvent messageEvent) {
|
||||
boolean b = false;
|
||||
String pitNumber = messageEvent.getText().getPit_number();
|
||||
int userId = messageEvent.getText().getFromUserInfo().getUser_id();
|
||||
if (pitNumber.equals("9") || pitNumber.equals("10")) {
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setPit_number(pitNumber);
|
||||
pitBean.setUser_id("");
|
||||
pitBean.setAvatar("");
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
|
||||
if (pitNumber.equals("9")) {
|
||||
RoomJukeboxWheatView roomDefaultWheatView = mBinding.wvZc;
|
||||
roomDefaultWheatView.setRoomWheatNumber("9");
|
||||
roomDefaultWheatView.setData(pitBean);
|
||||
}
|
||||
|
||||
if (SpUtil.getUserId() == messageEvent.getText().getFromUserInfo().getUser_id()) {
|
||||
b = true;
|
||||
AgoraManager.getInstance().ClientRole(false);
|
||||
AgoraManager.getInstance().muteLocalAudioStream(true);
|
||||
} else {
|
||||
b = false;
|
||||
}
|
||||
|
||||
if (parentFragment != null) {
|
||||
parentFragment.updateWheatStatus(pitBean, Integer.parseInt(pitNumber), false, b);
|
||||
}
|
||||
} else {
|
||||
// 获取适配器数据
|
||||
List<RoomPitBean> dataList = adapter.getData();
|
||||
int position = Integer.parseInt(pitNumber) - 1;
|
||||
|
||||
// 确保位置有效
|
||||
if (position < 0 || position >= dataList.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取对应位置的bean并更新
|
||||
RoomPitBean pitBean = dataList.get(position);
|
||||
pitBean.setUser_id("");
|
||||
pitBean.setAvatar("");
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
pitBean.setDress("");
|
||||
|
||||
// 使用set方法更新数据,然后通知适配器
|
||||
dataList.set(position, pitBean);
|
||||
adapter.notifyItemChanged(position);
|
||||
}
|
||||
if (userId == SpUtil.getUserId()) {
|
||||
myPitNumber = 0;
|
||||
if (pitNumber.equals("9")) {
|
||||
configGameOptionBtn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void event1039(RoomMessageEvent event) {
|
||||
String fromPit = event.getText().getFrom_pit_number();
|
||||
String toPit = event.getText().getTo_pit_number();
|
||||
if (fromPit == null || toPit == null) return;
|
||||
List<RoomPitBean> dataList = new ArrayList<>(adapter.getData());
|
||||
int fromIndex = Integer.parseInt(fromPit) - 1;
|
||||
int toIndex = Integer.parseInt(toPit) - 1;
|
||||
if(toIndex>adapter.getData().size()-1){
|
||||
UserInfo fromUserInfo=event.getText().getFromUserInfo();
|
||||
pitNumber= toPit;
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
pitBean.setPit_number(pitNumber);
|
||||
pitBean.setUser_id(fromUserInfo.getUser_id() + "");
|
||||
pitBean.setAvatar(fromUserInfo.getAvatar());
|
||||
pitBean.setNickname(fromUserInfo.getNickname());
|
||||
pitBean.setSex(fromUserInfo.getSex() + "");
|
||||
pitBean.setCharm(fromUserInfo.getCharm());
|
||||
pitBean.setDress(fromUserInfo.getDress());
|
||||
|
||||
// 确保视图的pitNumber与数据的pit_number匹配
|
||||
if (pitNumber.equals("9")) {
|
||||
mBinding.wvZc.setRoomWheatNumber("9");
|
||||
mBinding.wvZc.setData(pitBean);
|
||||
}
|
||||
RoomPitBean temp = dataList.get(fromIndex);
|
||||
temp.setUser_id("");
|
||||
temp.setAvatar("");
|
||||
temp.setNickname("");
|
||||
temp.setSex("");
|
||||
temp.setCharm("");
|
||||
temp.setDress("");
|
||||
dataList.set(fromIndex,temp);
|
||||
adapter.notifyDataSetChanged();
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取当前数据列表
|
||||
|
||||
|
||||
// 保存原始pit_number
|
||||
String fromPitNumber = dataList.get(fromIndex).getPit_number();
|
||||
String toPitNumber = dataList.get(toIndex).getPit_number();
|
||||
|
||||
// 交换两个位置的对象
|
||||
RoomPitBean temp = dataList.get(fromIndex);
|
||||
dataList.set(fromIndex, dataList.get(toIndex));
|
||||
dataList.set(toIndex, temp);
|
||||
|
||||
// 确保pit_number正确
|
||||
dataList.get(fromIndex).setPit_number(fromPitNumber);
|
||||
dataList.get(toIndex).setPit_number(toPitNumber);
|
||||
|
||||
// 更新数据并通知适配器
|
||||
adapter.getData().clear();
|
||||
adapter.getData().addAll(dataList);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新已点歌曲数量
|
||||
*
|
||||
* @param messageEvent 已点歌曲数量
|
||||
*/
|
||||
public void event1072(RoomMessageEvent messageEvent) {
|
||||
int count = messageEvent.getText().getCount();
|
||||
|
||||
if (requestSongFragment != null && requestSongFragment.isVisible()) {
|
||||
requestSongFragment.setRequestedSongsCount(count);
|
||||
requestSongFragment.updateCurrentPageData();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 2025/11/18 下一首歌的演唱者
|
||||
public void event1071(RoomMessageEvent messageEvent) {
|
||||
if (messageEvent.getText().getNext_song_info()!=null){
|
||||
mBinding.guestContainer.setVisibility(View.VISIBLE);
|
||||
ImageUtils.loadHead(messageEvent.getText().getNext_song_info().getSinger_avatar(),mBinding.ciGsAva);
|
||||
mBinding.tvGsName.setText(messageEvent.getText().getNext_song_info().getSinger_nickname());
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 2025/11/18 当前 歌曲的演唱者
|
||||
public void event1070(RoomMessageEvent messageEvent) {
|
||||
|
||||
if(messageEvent.getText().getSong_info()!=null){
|
||||
mBinding.tvPerformerName.setVisibility(GONE);
|
||||
mBinding.tvNetName.setVisibility(VISIBLE);
|
||||
mBinding.ciNetAva.setVisibility(VISIBLE);
|
||||
ImageUtils.loadHead(messageEvent.getText().getSong_info().getSinger_avatar(),mBinding.ciUserAva);
|
||||
mBinding.tvSong.setText("演唱歌曲:"+messageEvent.getText().getSong_info().getSong_name());
|
||||
|
||||
ImageUtils.loadHead(messageEvent.getText().getSong_info().getBoss_avatar(),mBinding.ciNetAva);
|
||||
mBinding.tvNetName.setText("老板");
|
||||
songId= messageEvent.getText().getSong_info().getSinger_song_id();
|
||||
String userId= String.valueOf(messageEvent.getText().getSong_info().getSinger_user_id());
|
||||
if(mBinding.wvZc.getUserId().equals(userId)){
|
||||
mBinding.wvZc.pitBean.setImageType(true);
|
||||
mBinding.wvZc.setData(mBinding.wvZc.pitBean);
|
||||
}else {
|
||||
for (RoomPitBean roomPitBean : adapter.getData()) {
|
||||
if (roomPitBean.getUser_id().equals(userId)){
|
||||
roomPitBean.setImageType(true);
|
||||
}else {
|
||||
roomPitBean.setImageType(false);
|
||||
}
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
package com.xscm.modulemain.activity.room.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.constant.RefreshState;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity;
|
||||
import com.xscm.modulemain.activity.room.adapter.SongHistoryAdapter;
|
||||
import com.xscm.modulemain.activity.room.contacts.RequestSongContacts;
|
||||
import com.xscm.modulemain.activity.room.presenter.RequestSongPresenter;
|
||||
import com.xscm.modulemain.databinding.FragmentSongHistoryBinding;
|
||||
import com.xscm.modulemain.activity.room.fragment.RequestSongFragment;
|
||||
import com.xscm.moduleutil.base.BaseFragment;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.SingerSongCount;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 历史记录页面Fragment
|
||||
*/
|
||||
public class SongHistoryFragment extends BaseMvpFragment<RequestSongPresenter,FragmentSongHistoryBinding> implements RequestSongContacts.View {
|
||||
|
||||
private String currentTimeFilter = "today"; // 默认为今日
|
||||
private int page = 1;
|
||||
private String roomId;
|
||||
private String type="1";
|
||||
|
||||
private SongHistoryAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected RequestSongPresenter bindPresenter() {
|
||||
return new RequestSongPresenter(this,getActivity());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return super.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
if (getActivity() != null) {
|
||||
// 假设Activity有获取麦位数据的方法
|
||||
roomId = ((RoomActivity) getActivity()).getRoomIds();
|
||||
}
|
||||
// 初始化时间筛选
|
||||
initTimeFilters();
|
||||
|
||||
// 初始化RecyclerView
|
||||
initRecyclerView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
|
||||
private void initTimeFilters() {
|
||||
// 设置默认选中今日
|
||||
mBinding.tvFilterToday.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
updateHistoryList();
|
||||
// 今日点击事件
|
||||
mBinding.tvFilterToday.setOnClickListener(v -> {
|
||||
if (!currentTimeFilter.equals("today")) {
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterToday.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "today";
|
||||
type="1";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
|
||||
// 昨日点击事件
|
||||
mBinding.tvFilterYesterday.setOnClickListener(v -> {
|
||||
if (!currentTimeFilter.equals("yesterday")) {
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterYesterday.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "yesterday";
|
||||
type="2";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
|
||||
// 本周点击事件
|
||||
mBinding.tvFilterThisWeek.setOnClickListener(v -> {
|
||||
if (!currentTimeFilter.equals("this_week")) {
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterThisWeek.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "this_week";
|
||||
type="3";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
|
||||
// 上周点击事件
|
||||
mBinding.tvFilterLastWeek.setOnClickListener(v -> {
|
||||
if (!currentTimeFilter.equals("last_week")) {
|
||||
resetFilterStyles();
|
||||
mBinding.tvFilterLastWeek.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_3abc6d);
|
||||
currentTimeFilter = "last_week";
|
||||
type="4";
|
||||
updateHistoryList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void resetFilterStyles() {
|
||||
mBinding.tvFilterToday.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_2b2935);
|
||||
mBinding.tvFilterYesterday.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_2b2935);
|
||||
mBinding.tvFilterThisWeek.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_2b2935);
|
||||
mBinding.tvFilterLastWeek.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_r16_2b2935);
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
// 初始化RecyclerView,设置适配器等
|
||||
// binding.rvSongHistory.setAdapter(adapter);
|
||||
adapter=new SongHistoryAdapter();
|
||||
mBinding.rvSongHistory.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
mBinding.rvSongHistory.setAdapter(adapter);
|
||||
// 设置刷新和加载更多监听
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.singerSongList(roomId, type, page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
MvpPre.singerSongList(roomId, type, page + "", "10");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateHistoryList() {
|
||||
// 根据选择的时间筛选条件更新历史记录列表
|
||||
// 可以在这里调用接口获取对应时间段的历史记录
|
||||
page = 1;
|
||||
MvpPre.singerSongList(roomId, type, page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_song_history;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(SongPlaylist s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishComment() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSong() {
|
||||
|
||||
}
|
||||
private List<SongPlaylist.SongPlaylistBean> songList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void singerSongList(SongPlaylist s) {
|
||||
|
||||
if (s != null &&s.getLists()!=null && s.getLists().size() > 0 ) {
|
||||
// 判断当前是刷新还是加载更多
|
||||
RefreshState state = mBinding.smartRefreshLayout.getState();
|
||||
if (state == RefreshState.Refreshing) {
|
||||
// 刷新,清空列表并添加新数据
|
||||
songList.clear();
|
||||
songList.addAll(s.getLists());
|
||||
adapter.setNewData(songList);
|
||||
mBinding.smartRefreshLayout.finishRefresh(true);
|
||||
} else if (state == RefreshState.Loading) {
|
||||
// 加载更多,添加数据到列表
|
||||
if (s.getLists().size() > 0) {
|
||||
songList.addAll(s.getLists());
|
||||
adapter.addData(songList);
|
||||
mBinding.smartRefreshLayout.finishLoadMore(true);
|
||||
} else {
|
||||
// 没有更多数据
|
||||
mBinding.smartRefreshLayout.finishLoadMoreWithNoMoreData();
|
||||
}
|
||||
} else {
|
||||
// 首次加载
|
||||
songList.clear();
|
||||
songList.addAll(s.getLists());
|
||||
adapter.setNewData(songList);
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
}
|
||||
|
||||
} else {
|
||||
// 数据为空
|
||||
if (mBinding.smartRefreshLayout.getState() == RefreshState.Refreshing) {
|
||||
mBinding.smartRefreshLayout.finishRefresh(false);
|
||||
} else if (mBinding.smartRefreshLayout.getState() == RefreshState.Loading) {
|
||||
mBinding.smartRefreshLayout.finishLoadMore(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongTop(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongCount(SingerSongCount s) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
package com.xscm.modulemain.activity.room.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity;
|
||||
import com.xscm.modulemain.activity.room.contacts.RequestSongContacts;
|
||||
import com.xscm.modulemain.activity.room.presenter.RequestSongPresenter;
|
||||
import com.xscm.modulemain.activity.room.adapter.SongAdapter;
|
||||
import com.xscm.modulemain.activity.room.adapter.WheatPositionAdapter;
|
||||
import com.xscm.modulemain.databinding.FragmentSongRequestBinding;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.SingerSongCount;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 点歌页面Fragment
|
||||
*/
|
||||
public class SongRequestFragment extends BaseMvpFragment<RequestSongPresenter, FragmentSongRequestBinding> implements RequestSongContacts.View {
|
||||
|
||||
private WheatPositionAdapter wheatPositionAdapter;
|
||||
private int selectedWheatPosition = 0; // 默认选中第一个麦位
|
||||
private String roomId;
|
||||
private int page = 0;
|
||||
|
||||
private SongAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected RequestSongPresenter bindPresenter() {
|
||||
return new RequestSongPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return super.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
// 初始化麦位选择
|
||||
initWheatPositions();
|
||||
// 初始化RecyclerView
|
||||
initRecyclerView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
// 加载数据
|
||||
loadWheatPositions();
|
||||
}
|
||||
|
||||
private void loadWheatPositions() {
|
||||
// 从Activity获取麦位数据
|
||||
List<RoomPitBean> wheatPositions = new ArrayList<>();
|
||||
|
||||
// 这里应该从Activity获取实际数据,这里仅为示例
|
||||
if (getActivity() != null) {
|
||||
// 假设Activity有获取麦位数据的方法
|
||||
wheatPositions = ((RoomActivity) getActivity()).getRoomInfoResp();
|
||||
roomId = ((RoomActivity) getActivity()).getRoomIds();
|
||||
}
|
||||
|
||||
// 更新适配器数据
|
||||
wheatPositionAdapter.setWheatPositions(wheatPositions);
|
||||
|
||||
// 默认选中第一个可用麦位
|
||||
if (wheatPositions!=null&&!wheatPositions.isEmpty()) {
|
||||
selectedWheatPosition = Integer.parseInt(wheatPositions.get(0).getId());
|
||||
wheatPositionAdapter.setSelectedPosition(0);
|
||||
updateSongList(selectedWheatPosition);
|
||||
}
|
||||
|
||||
MvpPre.getSong("", roomId, "1", "20");
|
||||
}
|
||||
|
||||
private void initWheatPositions() {
|
||||
// 初始化麦位RecyclerView
|
||||
wheatPositionAdapter = new WheatPositionAdapter(new ArrayList<>());
|
||||
wheatPositionAdapter.setOnItemSelectedListener(position -> {
|
||||
selectedWheatPosition = Integer.parseInt(position.getUser_id());
|
||||
updateSongList(selectedWheatPosition);
|
||||
});
|
||||
|
||||
mBinding.rvWheatPositions.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||
mBinding.rvWheatPositions.setAdapter(wheatPositionAdapter);
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
// 初始化歌曲RecyclerView,设置适配器等
|
||||
// mBinding.rvRequestSongs.setAdapter(adapter);
|
||||
|
||||
adapter = new SongAdapter(new ArrayList<>());
|
||||
mBinding.rvRequestSongs.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
mBinding.rvRequestSongs.setAdapter(adapter);
|
||||
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getSong("", roomId, page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getSong("", roomId, page + "", "10");
|
||||
}
|
||||
});
|
||||
|
||||
adapter.setOnSongClickListener(new SongAdapter.OnSongClickListener() {
|
||||
|
||||
@Override
|
||||
public void onSongClick(SongPlaylist.SongPlaylistBean song, int position) {
|
||||
MvpPre.singerSong(song.getId() + "", roomId);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void updateSongList(int wheatPosition) {
|
||||
// 根据选中的麦位更新歌曲列表
|
||||
// 可以在这里调用接口获取对应麦位的歌曲列表
|
||||
MvpPre.getSong(wheatPosition + "", "", "1", "10");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_song_request;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(SongPlaylist s) {
|
||||
if (s != null && s.getLists() != null && s.getLists().size() > 0) {
|
||||
adapter.setSongList(s.getLists());
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
mBinding.smartRefreshLayout.finishLoadMore();
|
||||
} else {
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
mBinding.smartRefreshLayout.finishLoadMore();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishComment() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSong() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongList(SongPlaylist s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongTop(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongCount(SingerSongCount s) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.xscm.modulemain.activity.room.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
||||
import com.xscm.modulemain.activity.room.contacts.JukeboxContacts;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* com.example.moduleroom.presenter
|
||||
* qx
|
||||
* 2025/11/12
|
||||
*/
|
||||
public class JukeboxPresenter extends BasePresenter<JukeboxContacts.View> implements JukeboxContacts.IRoomPre{
|
||||
JukeboxContacts.View mView;
|
||||
public JukeboxPresenter(JukeboxContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyPit(String roomId, String pitNumber) {
|
||||
RetrofitClient.getInstance().applyPit(roomId, pitNumber, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().applyPit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMutePit(String roomId, String pitNumber, String is_mute) {
|
||||
RetrofitClient.getInstance().setMutePit(roomId, pitNumber, is_mute, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setMutePit(pitNumber, is_mute);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLockPit(String roomId, String pitNumber, String is_lock) {
|
||||
RetrofitClient.getInstance().setLockPit(roomId, pitNumber, is_lock, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setLockPit(pitNumber, is_lock);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongCut(String id) {
|
||||
api.singerSongCut(id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.xscm.modulemain.activity.room.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.xscm.modulemain.activity.room.contacts.RequestSongContacts;
|
||||
import com.xscm.moduleutil.bean.SingerSongCount;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class RequestSongPresenter extends BasePresenter<RequestSongContacts.View> implements RequestSongContacts.IRoomPre {
|
||||
RequestSongContacts.View mView;
|
||||
|
||||
public RequestSongPresenter(RequestSongContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(String userId, String roomId, String page, String pageSize) {
|
||||
api.getSong(userId, roomId, page, pageSize, new BaseObserver<SongPlaylist>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SongPlaylist songPlaylist) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getSong(songPlaylist);
|
||||
MvpRef.get().finishComment();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSong(String song_id, String roomId) {
|
||||
api.singerSong(song_id, roomId, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null)
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
MvpRef.get().singerSong();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongList(String room_id, String type, String page, String page_limit) {
|
||||
api.singerSongList(room_id, type, page, page_limit, new BaseObserver<SongPlaylist>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SongPlaylist songPlaylistBean) {
|
||||
if (MvpRef == null)
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
MvpRef.get().singerSongList(songPlaylistBean);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongTop(String id) {
|
||||
api.singerSongTop(id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null)
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
MvpRef.get().singerSongTop(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerSongCount(String roomId) {
|
||||
api.singerSongCount(roomId, new BaseObserver<SingerSongCount>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SingerSongCount singerSongCount) {
|
||||
if (MvpRef == null)
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
MvpRef.get().singerSongCount(singerSongCount);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,6 +44,7 @@ public class NobleDetailsActivity extends BaseMvpActivity<NobleTitlePresenter, A
|
||||
GridNobleAdapter mGiftWallAdapter;
|
||||
|
||||
private String lid="";
|
||||
|
||||
private String xlid="";
|
||||
|
||||
@Override
|
||||
@@ -181,6 +182,8 @@ public class NobleDetailsActivity extends BaseMvpActivity<NobleTitlePresenter, A
|
||||
mBinding.imLjkt.setImageResource(com.xscm.moduleutil.R.mipmap.noble_h_kt);
|
||||
mBinding.imLjkt.setClickable( false);
|
||||
}
|
||||
|
||||
xlid=nobilitLists.getLid()+"";
|
||||
}
|
||||
private void applyGradientToTextView(TextView textView) {
|
||||
ViewTreeObserver vto = textView.getViewTreeObserver();
|
||||
|
||||
@@ -72,13 +72,13 @@ public class NobleTitleActivity extends BaseMvpActivity<NobleTitlePresenter, Act
|
||||
Intent intent = new Intent(this, NobleDetailsActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("lid",lid);
|
||||
intent.putExtras( bundle);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
}else if (id== R.id.im_me_noble_xf) {
|
||||
Intent intent = new Intent(this, NoblePaymentActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("lid",lid);
|
||||
intent.putExtras( bundle);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,471 @@
|
||||
package com.xscm.modulemain.activity.user.activity;
|
||||
|
||||
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.media.MediaRecorder;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.user.conacts.SingerVerificationContract;
|
||||
import com.xscm.modulemain.activity.user.presenter.SingerVerificationPresenter;
|
||||
import com.xscm.modulemain.databinding.ActivitySingerVerificationBinding;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/**
|
||||
* 歌手认证
|
||||
* 该Activity用于处理用户进行歌手认证的相关功能,包括录音、试听、重新录制和提交认证等操作。
|
||||
*/
|
||||
|
||||
public class SingerVerificationActivity extends BaseMvpActivity<SingerVerificationPresenter, ActivitySingerVerificationBinding> implements SingerVerificationContract.View {
|
||||
// 权限请求码
|
||||
private static final int REQUEST_RECORD_AUDIO_PERMISSION = 200;
|
||||
// 录音权限
|
||||
private static final String[] PERMISSIONS = {Manifest.permission.RECORD_AUDIO};
|
||||
|
||||
// 录音和播放相关变量
|
||||
private MediaRecorder mediaRecorder; // 媒体录音对象
|
||||
private MediaPlayer mediaPlayer; // 媒体播放对象
|
||||
private File recordingFile; // 录音文件
|
||||
private final Handler handler = new Handler(Looper.getMainLooper()); // 主线程Handler
|
||||
private long recordingStartTime; // 录音开始时间
|
||||
private boolean isRecording = false; // 是否正在录音
|
||||
private boolean isPlaying = false; // 是否正在播放
|
||||
private long recordingDuration = 0L; // 录音时长
|
||||
private Timer timer; // 计时器
|
||||
|
||||
private int isSinger;//传递过来的参数,
|
||||
/**
|
||||
* 绑定Presenter
|
||||
* @return 返回该Activity对应的Presenter实例
|
||||
*/
|
||||
@Override
|
||||
protected SingerVerificationPresenter bindPresenter() {
|
||||
return new SingerVerificationPresenter(this, this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取布局ID
|
||||
* @return 返回Activity的布局资源ID
|
||||
*/
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_singer_verification;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
* 设置UI组件的初始状态和事件监听
|
||||
*/
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
||||
// 请求录音权限
|
||||
if (!hasPermissions()) {
|
||||
ActivityCompat.requestPermissions(this, PERMISSIONS, REQUEST_RECORD_AUDIO_PERMISSION);
|
||||
}
|
||||
mBinding.progressArc.setProgress(0);
|
||||
mBinding.progressArc.setMax(100); // 设置最大值
|
||||
mBinding.progressArc.setIndeterminate(false);
|
||||
// 设置长按录音逻辑
|
||||
mBinding.recordButton.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
if (!isRecording && !isPlaying && recordingFile == null) {
|
||||
startRecording();
|
||||
}
|
||||
return true;
|
||||
case MotionEvent.ACTION_UP:
|
||||
if (isRecording) {
|
||||
stopRecording();
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
// 设置播放按钮点击事件
|
||||
mBinding.playButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (isPlaying) {
|
||||
// 正在播放,点击停止播放
|
||||
stopPlaying();
|
||||
// 恢复按钮状态
|
||||
mBinding.playButton.setText("试听");
|
||||
mBinding.playButton.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.but_st, 0, 0);
|
||||
} else {
|
||||
// 未播放,点击开始播放
|
||||
startPlaying();
|
||||
// 更改按钮状态为"结束"
|
||||
mBinding.playButton.setText("结束");
|
||||
mBinding.playButton.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.but_tz, 0, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
//
|
||||
mBinding.reRecordButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
reRecord();
|
||||
}
|
||||
});
|
||||
//认证
|
||||
mBinding.imSubmit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
submitVerification();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("歌手认证");
|
||||
mBinding.topBar.setColor(getResources().getColor(R.color.white));
|
||||
isSinger= getIntent().getIntExtra("isSinger",-1);
|
||||
if (isSinger==-1){
|
||||
mBinding.clCorner.setVisibility(VISIBLE);
|
||||
mBinding.cornerStatus.setText("暂未认证");
|
||||
}else if (isSinger==0){
|
||||
mBinding.clCorner.setVisibility(GONE);
|
||||
mBinding.cornerStatus.setText("认证中");
|
||||
}else if (isSinger==1){
|
||||
mBinding.clCorner.setVisibility(GONE);
|
||||
mBinding.cornerStatus.setText("已认证");
|
||||
}else if (isSinger==2){
|
||||
mBinding.clCorner.setVisibility(VISIBLE);
|
||||
mBinding.cornerStatus.setText("认证失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查应用是否拥有所有必要的权限
|
||||
* 遍历权限列表,检查每个权限是否已被授予
|
||||
*
|
||||
* @return 如果所有权限都已授予则返回true,否则返回false
|
||||
*/
|
||||
private boolean hasPermissions() {
|
||||
// 遍历权限数组中的每个权限
|
||||
for (String permission : PERMISSIONS) {
|
||||
// 检查当前权限是否已被授予
|
||||
// 如果权限未被授予(返回值不等于PERMISSION_GRANTED),则返回false
|
||||
if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 如果所有权限都已检查并授予,则返回true
|
||||
return true;
|
||||
}
|
||||
|
||||
// 开始录音
|
||||
private void startRecording() {
|
||||
if (!hasPermissions()) {
|
||||
ActivityCompat.requestPermissions(this, PERMISSIONS, REQUEST_RECORD_AUDIO_PERMISSION);
|
||||
return;
|
||||
}
|
||||
|
||||
// 停止可能正在播放的音频
|
||||
stopPlaying();
|
||||
|
||||
// 创建录音文件
|
||||
try {
|
||||
recordingFile = createAudioFile();
|
||||
|
||||
mediaRecorder = new MediaRecorder();
|
||||
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
|
||||
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
|
||||
mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
|
||||
mediaRecorder.setOutputFile(recordingFile.getAbsolutePath());
|
||||
mediaRecorder.prepare();
|
||||
mediaRecorder.start();
|
||||
|
||||
isRecording = true;
|
||||
recordingStartTime = System.currentTimeMillis();
|
||||
recordingDuration = 0L;
|
||||
|
||||
// 启动计时器
|
||||
timer = new Timer();
|
||||
timer.scheduleAtFixedRate(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isRecording) {
|
||||
recordingDuration = System.currentTimeMillis() - recordingStartTime;
|
||||
|
||||
// 检查是否达到最大录音时间(5分钟)
|
||||
if (recordingDuration >= 5 * 60 * 1000) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(SingerVerificationActivity.this, "已达到最大录音时间5分钟,录音自动停止", Toast.LENGTH_SHORT).show();
|
||||
stopRecording();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateUI();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 1000, 1000);
|
||||
|
||||
} catch (IOException e) {
|
||||
Log.e("SingerVerification", "录音失败: " + e.getMessage());
|
||||
Toast.makeText(this, "录音失败: " + e.getMessage() + ",请重试", Toast.LENGTH_SHORT).show();
|
||||
// 重置录音状态,允许重新录制
|
||||
isRecording = false;
|
||||
if (mediaRecorder != null) {
|
||||
mediaRecorder.release();
|
||||
mediaRecorder = null;
|
||||
}
|
||||
if (recordingFile != null && recordingFile.exists()) {
|
||||
recordingFile.delete();
|
||||
recordingFile = null;
|
||||
}
|
||||
updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
// 停止录音
|
||||
private void stopRecording() {
|
||||
try {
|
||||
if (isRecording && mediaRecorder != null) {
|
||||
isRecording = false;
|
||||
mediaRecorder.stop();
|
||||
mediaRecorder.release();
|
||||
mediaRecorder = null;
|
||||
|
||||
// 取消计时器
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
|
||||
// 检查录音时长是否达到最小要求(60秒)
|
||||
if (recordingDuration < 60 * 1000) {
|
||||
Toast.makeText(this, "录音时间太短,请至少录制60秒", Toast.LENGTH_SHORT).show();
|
||||
// 删除不符合要求的录音文件
|
||||
if (recordingFile != null && recordingFile.exists()) {
|
||||
recordingFile.delete();
|
||||
recordingFile = null;
|
||||
}
|
||||
recordingDuration = 0L;
|
||||
} else {
|
||||
Toast.makeText(this, "录音完成", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
updateUI();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SingerVerification", "停止录音失败: " + e.getMessage());
|
||||
Toast.makeText(this, "停止录音失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
// 发生异常时重置状态,允许重新录制
|
||||
isRecording = false;
|
||||
if (mediaRecorder != null) {
|
||||
mediaRecorder.release();
|
||||
mediaRecorder = null;
|
||||
}
|
||||
if (recordingFile != null && recordingFile.exists()) {
|
||||
recordingFile.delete();
|
||||
recordingFile = null;
|
||||
}
|
||||
recordingDuration = 0L;
|
||||
updateUI();
|
||||
}
|
||||
}
|
||||
|
||||
// 开始播放
|
||||
private void startPlaying() {
|
||||
if (recordingFile == null || !recordingFile.exists()) {
|
||||
Toast.makeText(this, "没有录制的文件", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
stopRecording();
|
||||
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setDataSource(recordingFile.getAbsolutePath());
|
||||
mediaPlayer.prepare();
|
||||
mediaPlayer.start();
|
||||
|
||||
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
isPlaying = false;
|
||||
|
||||
// 恢复按钮状态
|
||||
mBinding.playButton.setText("试听");
|
||||
mBinding.playButton.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.but_st, 0, 0);
|
||||
|
||||
updateUI();
|
||||
}
|
||||
});
|
||||
|
||||
isPlaying = true;
|
||||
updateUI();
|
||||
} catch (IOException e) {
|
||||
Log.e("SingerVerification", "播放失败: " + e.getMessage());
|
||||
Toast.makeText(this, "播放失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
// 停止播放
|
||||
private void stopPlaying() {
|
||||
try {
|
||||
if (isPlaying && mediaPlayer != null) {
|
||||
isPlaying = false;
|
||||
mediaPlayer.stop();
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
|
||||
// 恢复按钮状态
|
||||
mBinding.playButton.setText("试听");
|
||||
mBinding.playButton.setCompoundDrawablesWithIntrinsicBounds(0, R.mipmap.but_st, 0, 0);
|
||||
|
||||
updateUI();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SingerVerification", "停止播放失败: " + e.getMessage());
|
||||
Toast.makeText(this, "停止播放失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
// 重新录音
|
||||
private void reRecord() {
|
||||
stopPlaying();
|
||||
stopRecording();
|
||||
if (recordingFile != null && recordingFile.exists()) {
|
||||
recordingFile.delete();
|
||||
}
|
||||
recordingFile = null;
|
||||
recordingDuration = 0L;
|
||||
updateUI();
|
||||
}
|
||||
|
||||
// 提交认证
|
||||
private void submitVerification() {
|
||||
if (recordingFile == null || !recordingFile.exists()) {
|
||||
Toast.makeText(this, "请先录制音频", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
MvpPre.uploadFile(recordingFile, 3);
|
||||
}
|
||||
|
||||
// 创建音频文件
|
||||
private File createAudioFile() throws IOException {
|
||||
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date());
|
||||
String audioFileName = "AUDIO_" + timeStamp + "_";
|
||||
File storageDir = getExternalFilesDir(Environment.DIRECTORY_MUSIC);
|
||||
|
||||
return File.createTempFile(
|
||||
audioFileName,
|
||||
".m4a",
|
||||
storageDir
|
||||
);
|
||||
}
|
||||
|
||||
// 更新UI
|
||||
private void updateUI() {
|
||||
|
||||
// 更新时间显示
|
||||
mBinding.timeTextView.setText(formatTime(recordingDuration));
|
||||
// 计算录音进度(假设最大录音时间为5分钟=300秒)
|
||||
int maxRecordingTime = 300; // 5分钟
|
||||
int progress = (int) ((recordingDuration / 1000) * 100 / maxRecordingTime);
|
||||
mBinding.progressArc.setProgress(progress); // 更新按钮状态
|
||||
}
|
||||
|
||||
// 格式化时间显示
|
||||
private String formatTime(long millis) {
|
||||
long totalSeconds = millis / 1000;
|
||||
long minutes = totalSeconds / 60;
|
||||
long seconds = totalSeconds % 60;
|
||||
return String.format(Locale.getDefault(), "%02d:%02d", minutes, seconds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if (requestCode == REQUEST_RECORD_AUDIO_PERMISSION) {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
Toast.makeText(this, "录音权限已获取", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(this, "需要录音权限才能进行认证", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
stopRecording();
|
||||
stopPlaying();
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upLoadSuccess(String url, int type) {
|
||||
MvpPre.singerAuth(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerAuth(String s) {
|
||||
reRecord();
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(SongPlaylist s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishComment() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSong() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package com.xscm.modulemain.activity.user.activity;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.modulemain.adapter.UserPlaylistAdapter;
|
||||
import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.user.conacts.SingerVerificationContract;
|
||||
import com.xscm.modulemain.activity.user.presenter.SingerVerificationPresenter;
|
||||
import com.xscm.modulemain.databinding.ActivityUserPlaylistBinding;
|
||||
import com.xscm.modulemain.dialog.CustomInputDialog;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 我的歌单
|
||||
*/
|
||||
public class UserPlaylistActivity extends BaseMvpActivity<SingerVerificationPresenter, ActivityUserPlaylistBinding> implements SingerVerificationContract.View {
|
||||
|
||||
private int page = 0;
|
||||
private UserPlaylistAdapter mAdapter;
|
||||
private List<SongPlaylist.SongPlaylistBean> mSongPlaylistBean;
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
mBinding.topBar.setTitle("歌单列表");
|
||||
mBinding.topBar.setRightText("新增");
|
||||
mBinding.topBar.setRightTxtVisible(true);
|
||||
mBinding.topBar.setRightColor(Color.parseColor("#3ABC6D"));
|
||||
mBinding.topBar.getTvRight().setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//新增歌单
|
||||
// 在Activity或Fragment中调用
|
||||
CustomInputDialog customInputDialog = new CustomInputDialog(UserPlaylistActivity.this);
|
||||
customInputDialog.show();
|
||||
}
|
||||
});
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
// 初始化适配器
|
||||
mAdapter = new UserPlaylistAdapter(this, new ArrayList<>());
|
||||
mBinding.recycleView.setAdapter(mAdapter);
|
||||
// 设置滑动操作
|
||||
// ItemTouchHelper itemTouchHelper = UserPlaylistAdapter.getItemTouchHelper(mAdapter);
|
||||
// itemTouchHelper.attachToRecyclerView(mBinding.recycleView);
|
||||
|
||||
|
||||
// 设置编辑点击事件
|
||||
mAdapter.setOnEditClickListener(position -> {
|
||||
// 处理编辑点击事件
|
||||
CustomInputDialog customInputDialog = new CustomInputDialog(UserPlaylistActivity.this);
|
||||
customInputDialog.PlaylistBean(mSongPlaylistBean.get(position));
|
||||
customInputDialog.setOnDialogDismissListener(new CustomInputDialog.OnDialogDismissListener() {
|
||||
@Override
|
||||
public void onDialogDismiss(boolean dataChanged) {
|
||||
if (dataChanged)
|
||||
// 数据已更改,重新加载数据
|
||||
page = 1;
|
||||
MvpPre.getSong(SpUtil.getUserId() + "", "", page + "", "10");
|
||||
}
|
||||
});
|
||||
customInputDialog.show();
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 设置删除点击事件
|
||||
mAdapter.setOnDeleteClickListener(position -> {
|
||||
// 处理删除点击事件
|
||||
MvpPre.deleteSong(mSongPlaylistBean.get(position).getId() + "");
|
||||
|
||||
});
|
||||
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getSong(SpUtil.getUserId() + "", "", page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
// EventBus.getDefault().post(new BannerRefreshEvent());
|
||||
page = 1;
|
||||
MvpPre.getSong(SpUtil.getUserId() + "", "", page + "", "10");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
page = 1;
|
||||
MvpPre.getSong(SpUtil.getUserId() + "", "", page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_user_playlist;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SingerVerificationPresenter bindPresenter() {
|
||||
return new SingerVerificationPresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upLoadSuccess(String url, int type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerAuth(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(SongPlaylist s) {
|
||||
if (mAdapter != null) {
|
||||
if (page == 1) {
|
||||
// 第一页,直接设置数据
|
||||
if (s == null || s.getLists() == null || s.getLists().size() == 0) {
|
||||
return;
|
||||
}
|
||||
mSongPlaylistBean = s.getLists();
|
||||
mAdapter.setNewData(s.getLists());
|
||||
} else {
|
||||
if (s == null || s.getLists() == null || s.getLists().size() == 0) {
|
||||
return;
|
||||
}
|
||||
mSongPlaylistBean.addAll(s.getLists());
|
||||
// 更多页面,添加数据
|
||||
mAdapter.addData(s.getLists());
|
||||
}
|
||||
|
||||
// 更新歌单数量
|
||||
mBinding.tvNum.setText("共" + s.getCount() + "首歌");
|
||||
}
|
||||
|
||||
// 结束刷新或加载更多
|
||||
if (mBinding.smartRefreshLayout != null) {
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
mBinding.smartRefreshLayout.finishLoadMore();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishComment() {
|
||||
mBinding.smartRefreshLayout.finishRefresh();
|
||||
mBinding.smartRefreshLayout.finishLoadMore();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSong() {
|
||||
page = 1;
|
||||
MvpPre.getSong(SpUtil.getUserId() + "", "", page + "", "10");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.xscm.modulemain.activity.user.conacts;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* 歌手验证合约类,定义了歌手验证功能所需的视图和 presenter 接口
|
||||
* 该类采用了合约模式,将视图和 presenter 的接口定义在一起,便于维护
|
||||
*/
|
||||
public class SingerVerificationContract {
|
||||
/**
|
||||
* 歌手验证视图接口,继承自 IView<Activity>
|
||||
* 该接口定义了歌手验证功能所需的视图层方法
|
||||
*/
|
||||
public interface View extends IView<Activity> {
|
||||
void upLoadSuccess(String url, int type);
|
||||
void singerAuth(String s);
|
||||
void getSong(SongPlaylist s);
|
||||
|
||||
void finishComment();
|
||||
|
||||
void deleteSong();
|
||||
}
|
||||
|
||||
/**
|
||||
* 歌手验证的 presenter 接口,继承自 IPresenter
|
||||
* 该接口定义了歌手验证功能所需的 presenter 层方法
|
||||
*/
|
||||
public interface IMePre extends IPresenter {
|
||||
void uploadFile(File file, int type);
|
||||
|
||||
void singerAuth(String url);
|
||||
|
||||
void getSong(String userId,String roomId,String page,String pageSize);
|
||||
|
||||
void deleteSong(String songId);
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,8 @@ import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.NobleTitleActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.RechargeActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.SingerVerificationActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.UserPlaylistActivity;
|
||||
import com.xscm.modulemain.databinding.FragmentVocalRangeBinding;
|
||||
import com.xscm.modulemain.activity.user.activity.BlacklistActivity;
|
||||
import com.xscm.modulemain.activity.user.activity.DailyTasksActivity;
|
||||
@@ -54,7 +56,7 @@ import java.util.List;
|
||||
*/
|
||||
public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVocalRangeBinding> implements MeConacts.View {
|
||||
|
||||
// private MyInfoResp mMyInfoResp;
|
||||
// private MyInfoResp mMyInfoResp;
|
||||
private UserInfo userInfo;
|
||||
|
||||
public static VocalRangeFragment newInstance() {
|
||||
@@ -84,7 +86,6 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
mBinding.llVisit.setOnClickListener(this::onClick);
|
||||
@@ -119,6 +120,8 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
mBinding.llMeHelp.setOnClickListener(this::onClick);
|
||||
mBinding.llGiftWall.setOnClickListener(this::onClick);
|
||||
mBinding.clNobleTitle.setOnClickListener(this::onClick);
|
||||
mBinding.llSinger.setOnClickListener(this::onClick);
|
||||
mBinding.llPlaylist.setOnClickListener(this::onClick);
|
||||
|
||||
mBinding.banner.loadImage(new XBanner.XBannerAdapter() {
|
||||
@Override
|
||||
@@ -140,15 +143,13 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
* type=1时,该值表示房间id;type=2时,表示文章id
|
||||
*/
|
||||
BannerModel bannerModel = (BannerModel) model;
|
||||
Intent intent=new Intent(getActivity(), WebViewActivity.class);
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", bannerModel.getUrl());
|
||||
intent.putExtra("title", "防骗指南");
|
||||
startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", bannerModel.getUrl()).withString("title", "首页横幅").navigation();
|
||||
}
|
||||
});
|
||||
ShineTextView tvNickName = mBinding.tvNickName;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -172,28 +173,33 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
// ARouter.getInstance().build(ARouteConstants.ME_VISIT).navigation();
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.C0104);
|
||||
} else if (id == R.id.ll_follow) {//关注
|
||||
Intent intent=new Intent(getContext(), BlacklistActivity.class);
|
||||
intent.putExtra("type",0);
|
||||
Intent intent = new Intent(getContext(), BlacklistActivity.class);
|
||||
intent.putExtra("type", 0);
|
||||
startActivity(intent);
|
||||
} else if (id == R.id.ll_me_guild) {
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/union/index?id=" + SpUtil.getToken());
|
||||
}else if (id==R.id.ll_me_guild){
|
||||
Intent intent=new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_GUILD_URL(),SpUtil.getToken()));
|
||||
intent.putExtra("title", "公会");
|
||||
startActivity(intent);
|
||||
} else if (id == R.id.ll_my_shopping) {
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/prop/propMall?id=" + SpUtil.getToken());
|
||||
}else if (id==R.id.ll_my_shopping){
|
||||
Intent intent=new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_PROP_MALL_URL(),SpUtil.getToken()));
|
||||
intent.putExtra("title", "道具商城");
|
||||
startActivity(intent);
|
||||
}
|
||||
else if (id == R.id.ll_fans) {//粉丝
|
||||
Intent intent=new Intent(getContext(), BlacklistActivity.class);
|
||||
intent.putExtra("type",2);
|
||||
} else if (id == R.id.ll_fans) {//粉丝
|
||||
Intent intent = new Intent(getContext(), BlacklistActivity.class);
|
||||
intent.putExtra("type", 2);
|
||||
startActivity(intent);
|
||||
} else if (id == R.id.ll_friends) {//访客
|
||||
// if (userInfo.getCharm_level()>=20){
|
||||
Intent intent=new Intent(getContext(), BlacklistActivity.class);
|
||||
intent.putExtra("type",3);
|
||||
Intent intent = new Intent(getContext(), BlacklistActivity.class);
|
||||
intent.putExtra("type", 3);
|
||||
startActivity(intent);
|
||||
// }else {
|
||||
// ToastUtils.showShort("需要魅力等级20以上才能查看");
|
||||
@@ -201,17 +207,16 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.ME_MY_FRIENDS).withInt("type", 0).navigation();
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.C0112);
|
||||
}
|
||||
else if (id == R.id.im_my_room) {
|
||||
} else if (id == R.id.im_my_room) {
|
||||
//我的房间
|
||||
startActivity(new Intent(getContext(), MyRoomActivity.class));
|
||||
} else if (id == R.id.tv_nick_name || id == R.id.tv_home) {//编辑信息
|
||||
startActivity(new Intent(getContext(), EditUserInfoActivity.class));
|
||||
}else if (id == R.id.tv_my_wallet){//钱包
|
||||
} else if (id == R.id.tv_my_wallet) {//钱包
|
||||
startActivity(new Intent(getContext(), MyMoneyActivity.class));
|
||||
}else if (id == R.id.riv_user_head ){//用户主页
|
||||
} else if (id == R.id.riv_user_head) {//用户主页
|
||||
Intent intent = new Intent(getContext(), UserHomepageActivity.class);
|
||||
intent.putExtra("userId",SpUtil.getUserId()+"");
|
||||
intent.putExtra("userId", SpUtil.getUserId() + "");
|
||||
startActivity(intent);
|
||||
}
|
||||
// else if (id == R.id.me_my_lv) {
|
||||
@@ -220,42 +225,44 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
// //装扮商城
|
||||
// ARouter.getInstance().build(ARouteConstants.ME_SHOP).withString("from", "我的界面").navigation();
|
||||
// }
|
||||
else if (id == R.id.me_dress_up){//个性装扮
|
||||
else if (id == R.id.me_dress_up) {//个性装扮
|
||||
startActivity(new Intent(getContext(), PersonalityActivity.class));
|
||||
}
|
||||
else if (id == R.id.tv_my_bb) {
|
||||
} else if (id == R.id.tv_my_bb) {
|
||||
//我的背包
|
||||
startActivity(new Intent(getContext(), MyBagActivity.class));
|
||||
} else if (id==R.id.me_daily) {//每日任务
|
||||
} else if (id == R.id.me_daily) {//每日任务
|
||||
startActivity(new Intent(getContext(), DailyTasksActivity.class));
|
||||
}
|
||||
else if (id == R.id.iv_sz) {//设置
|
||||
} else if (id == R.id.iv_sz) {//设置
|
||||
// startActivity(new Intent(getContext(), SettingActivity.class));
|
||||
Intent intent = new Intent(getContext(), SettingActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userInfo", userInfo);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
}else if (id == R.id.me_my_dan){//等级
|
||||
} else if (id == R.id.me_my_dan) {//等级
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/other/grade?id=" + SpUtil.getToken());
|
||||
intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_GRADE_URL(),SpUtil.getToken()));
|
||||
intent.putExtra("title", "等级");
|
||||
startActivity(intent);
|
||||
}else if (id == R.id.ll_me_help){//反馈
|
||||
} else if (id == R.id.ll_me_help) {//反馈
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/help?id=" + SpUtil.getToken());
|
||||
// intent.putExtra("url", "http://192.168.110.17:8080/web/index.html#/pages/feedback/help?id=" + SpUtil.getToken());
|
||||
intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_HELP_URL(), SpUtil.getToken()));
|
||||
intent.putExtra("title", "反馈");
|
||||
startActivity(intent);
|
||||
}else if (id == R.id.iv_hb){//邀请
|
||||
} else if (id == R.id.iv_hb) {//邀请
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/other/income?id=" + SpUtil.getToken());
|
||||
intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_INVITATION_URL(),SpUtil.getToken()));
|
||||
intent.putExtra("title", "邀请");
|
||||
startActivity(intent);
|
||||
}else if (id==R.id.tv_copy){
|
||||
} else if (id == R.id.tv_copy) {
|
||||
copyComment(mBinding.beautifulView.getText().toString());
|
||||
}else if (id==R.id.ll_recharge){//充值
|
||||
} else if (id == R.id.ll_recharge) {//充值
|
||||
startActivity(new Intent(getActivity(), RechargeActivity.class));
|
||||
}else if (id==R.id.ll_me_income){
|
||||
} else if (id == R.id.ll_me_income) {
|
||||
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(); // 填移动应用(App)的 AppId
|
||||
IWXAPI api = WXAPIFactory.createWXAPI(getContext(), appId);
|
||||
|
||||
@@ -264,12 +271,21 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
req.corpId = "ww1de4300858c0b461"; // 企业ID
|
||||
req.url = "https://work.weixin.qq.com/kfid/kfcb3d23a59c188a0e7"; // 客服URL
|
||||
api.sendReq(req);
|
||||
}else if (id==R.id.ll_gift_wall){//我的页面的礼物墙
|
||||
} else if (id == R.id.ll_gift_wall) {//我的页面的礼物墙
|
||||
startActivity(new Intent(getContext(), GiftWallActivity.class));
|
||||
}else if (id==R.id.cl_noble_title){//爵位展示页面
|
||||
} else if (id == R.id.cl_noble_title) {//爵位展示页面
|
||||
startActivity(new Intent(getContext(), NobleTitleActivity.class));
|
||||
} else if (id == R.id.ll_singer) {//歌手认证
|
||||
Intent intent = new Intent(getContext(), SingerVerificationActivity.class);
|
||||
intent.putExtra("isSinger", userInfo.getSinger_status());
|
||||
startActivity(intent);
|
||||
|
||||
} else if (id == R.id.ll_playlist) {//我的歌单
|
||||
Intent intent = new Intent(getContext(), UserPlaylistActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyComment(String content) {
|
||||
// 获取剪贴板管理器
|
||||
ClipboardManager clipboard = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
@@ -281,66 +297,28 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
// 可选:通知用户文本已复制
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查看用户主页(我的空间)
|
||||
*/
|
||||
public void userOnclick(View view) {
|
||||
//我的空间
|
||||
// if (mMyInfoResp != null) {
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", mMyInfoResp.getUser_id()).navigation();
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public void myInfoSuccess(MyInfoResp data) {
|
||||
// this.mMyInfoResp = data;
|
||||
// SpUtils.saveUserId(data.getUser_id());
|
||||
// SpUtils.saveMyRoomId(data.getRoom_id());
|
||||
// mBinding.tvNickName.setText(data.getNickname());
|
||||
// mBinding.tvFollow.setText(data.getFollow_count());
|
||||
// mBinding.tvFans.setText(data.getFans_count());
|
||||
// mBinding.tvFriends.setText(data.getFriend_count());
|
||||
// mBinding.tvVisit.setText(data.getVisit_count());
|
||||
// mBinding.beautifulView.setText("ID:"+data.getUser_code());
|
||||
// mBinding.beautifulViewCopy.setOnClickListener(v->copyUserId(data.getUser_code()));
|
||||
// mBinding.rivUserHead.setData(data.getHead_picture(), data.getRank_info().getPicture(), data.getSex());
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void myInfoSuccess(UserInfo data) {
|
||||
SpUtil.saveUserInfo(data);
|
||||
this.userInfo = data;
|
||||
mBinding.rivUserHead.setData(data.getAvatar(), data.getDress(),data.getNobility_image());
|
||||
mBinding.rivUserHead.setData(data.getAvatar(), data.getDress(), data.getNobility_image());
|
||||
mBinding.tvNickName.setText(data.getNickname());
|
||||
mBinding.tvNickName.setTextColor((data.getNickname_color() != null && !data.getNickname_color().equals("")) ? Color.parseColor(data.getNickname_color()) : Color.parseColor("#ffffff"));
|
||||
String sex = data.getSex() == 1 ? "男" : "女";
|
||||
mBinding.beautifulView.setText(sex + " | ID:" + data.getUser_code());
|
||||
mBinding.tvFollow.setText(data.getFollow_num() + "");
|
||||
mBinding.tvFans.setText(data.getFans_num() + "");
|
||||
mBinding.tvFriends.setText(data.getLook_me_num() + "");
|
||||
|
||||
|
||||
if (!data.getNickname_color().isEmpty()){
|
||||
mBinding.tvNickName.setStartColor(Color.parseColor(data.getNickname_color()));
|
||||
mBinding.tvNickName.setShineColor(Color.parseColor(data.getNickname_color()));
|
||||
mBinding.tvNickName.setEndColor(Color.parseColor(data.getNickname_color()));
|
||||
mBinding.tvNickName.setShine(true);
|
||||
mBinding.tvNickName.setShineType(0);
|
||||
}
|
||||
|
||||
// mBinding.tvNickName.setTextColor( (data.getNickname_color()!=null&& !data.getNickname_color().equals(""))? Color.parseColor(data.getNickname_color()): Color.parseColor("#ffffff"));
|
||||
String sex = data.getSex()==1?"男":"女";
|
||||
mBinding.beautifulView.setText(sex+" | ID:"+data.getUser_code());
|
||||
mBinding.tvFollow.setText(data.getFollow_num()+"");
|
||||
mBinding.tvFans.setText(data.getFans_num()+"");
|
||||
mBinding.tvFriends.setText(data.getLook_me_num()+"");
|
||||
|
||||
if (data.getIs_use_code()==1){
|
||||
if (data.getIs_use_code() == 1) {
|
||||
mBinding.imBeautiful.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
} else {
|
||||
mBinding.imBeautiful.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (data.getAuth()==1){
|
||||
if (data.getAuth() == 1) {
|
||||
SpUtil.setRealName(true);
|
||||
}else {
|
||||
} else {
|
||||
SpUtil.setRealName(false);
|
||||
}
|
||||
|
||||
@@ -369,6 +347,14 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
}
|
||||
}
|
||||
|
||||
if (data.getSinger_status()!=1){
|
||||
mBinding.llSinger.setVisibility(View.VISIBLE);
|
||||
mBinding.llPlaylist.setVisibility(View.GONE);
|
||||
}else {
|
||||
mBinding.llSinger.setVisibility(View.GONE);
|
||||
mBinding.llPlaylist.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -385,6 +371,7 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
public void hideSkill(boolean hideSkill) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wallet(WalletBean walletBean) {
|
||||
mBinding.tvIcon.setText(walletBean.getCoin());
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.xscm.modulemain.activity.user.presenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.modulemain.activity.user.conacts.SingerVerificationContract;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
import com.xscm.moduleutil.utils.Md5Utils;
|
||||
import com.xscm.moduleutil.utils.cos.CosUploadManager;
|
||||
import com.xscm.moduleutil.utils.oss.OSSOperUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* 歌手验证器Presenter类,负责处理歌手验证相关的业务逻辑
|
||||
* 继承自BasePresenter,实现了SingerVerificationContract.IMePre接口
|
||||
*/
|
||||
public class SingerVerificationPresenter extends BasePresenter<SingerVerificationContract.View> implements SingerVerificationContract.IMePre {
|
||||
// 视图接口对象,用于与View层交互
|
||||
SingerVerificationContract.View mView;
|
||||
|
||||
/**
|
||||
* 构造函数,初始化Presenter
|
||||
*
|
||||
* @param view 视图接口对象,用于与View层交互
|
||||
* @param context 上下文对象,用于获取系统资源等
|
||||
*/
|
||||
public SingerVerificationPresenter(SingerVerificationContract.View view, Context context) {
|
||||
super(view, context); // 调用父类构造函数
|
||||
mView = view; // 保存视图接口对象的引用
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadFile(File file, int type) {
|
||||
String fileMD5 = Md5Utils.getFileMD5(file);
|
||||
String suffix = "";
|
||||
if (file.getName().contains(".")) {
|
||||
suffix = file.getName().substring(file.getName().lastIndexOf("."));
|
||||
}
|
||||
String url = "audio/" + fileMD5 + suffix;
|
||||
CosUploadManager.getInstance(CommonAppContext.getInstance()).upParameters(url, file.getPath(), new CosUploadManager.UploadCallback() {
|
||||
@Override
|
||||
public void onSuccess(String url) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().upLoadSuccess(url, type);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Exception e) {
|
||||
ToastUtils.show("上传失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure1(IllegalStateException e) {
|
||||
ToastUtils.show("上传失败");
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void singerAuth(String url) {
|
||||
api.singerAuth(url, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().singerAuth(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSong(String userId, String roomId, String page, String pageSize) {
|
||||
api.getSong(userId, roomId, page, pageSize, new BaseObserver<SongPlaylist>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SongPlaylist songPlaylist) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getSong(songPlaylist);
|
||||
MvpRef.get().finishComment();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSong(String songId) {
|
||||
api.deleteSong(songId, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().deleteSong();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.xscm.modulemain.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.app.AlertDialog;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户歌单适配器,支持长按显示编辑和删除选项
|
||||
*/
|
||||
public class UserPlaylistAdapter extends BaseQuickAdapter<SongPlaylist.SongPlaylistBean, BaseViewHolder> {
|
||||
|
||||
private OnItemClickListener mOnItemClickListener;
|
||||
private OnEditClickListener mOnEditClickListener;
|
||||
private OnDeleteClickListener mOnDeleteClickListener;
|
||||
|
||||
public UserPlaylistAdapter(Context context, List<SongPlaylist.SongPlaylistBean> data) {
|
||||
super(R.layout.item_user_playlist, data);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示选项对话框
|
||||
*/
|
||||
private void showOptionsDialog(int position) {
|
||||
if (position < 0 || position >= getData().size()) {
|
||||
return;
|
||||
}
|
||||
String[] options = {"编辑", "删除"};
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
|
||||
builder.setTitle("选择操作")
|
||||
.setItems(options, (dialog, which) -> {
|
||||
switch (which) {
|
||||
case 0: // 编辑
|
||||
if (mOnEditClickListener != null) {
|
||||
mOnEditClickListener.onEditClick(position);
|
||||
}
|
||||
break;
|
||||
case 1: // 删除
|
||||
if (mOnDeleteClickListener != null) {
|
||||
mOnDeleteClickListener.onDeleteClick(position);
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, SongPlaylist.SongPlaylistBean item) {
|
||||
helper.setText(R.id.tv_song_name,item.getSong_name()).setText(R.id.tv_count,"x"+item.getGift_num())
|
||||
.setText(R.id.tv_gift_name,item.getGift_name())
|
||||
.setText(R.id.tv_gift_value,item.getGift_price());
|
||||
ImageUtils.loadHeadCC(item.getBase_image(),helper.getView(R.id.iv_gift));
|
||||
|
||||
// 设置点击事件
|
||||
helper.itemView.setOnClickListener(v -> {
|
||||
if (mOnItemClickListener != null) {
|
||||
mOnItemClickListener.onItemClick(helper.getAdapterPosition());
|
||||
}
|
||||
});
|
||||
|
||||
// 设置长按事件
|
||||
helper.itemView.setOnLongClickListener(v -> {
|
||||
showOptionsDialog(helper.getLayoutPosition());
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
this.mOnItemClickListener = listener;
|
||||
}
|
||||
|
||||
public void setOnEditClickListener(OnEditClickListener listener) {
|
||||
this.mOnEditClickListener = listener;
|
||||
}
|
||||
|
||||
public void setOnDeleteClickListener(OnDeleteClickListener listener) {
|
||||
this.mOnDeleteClickListener = listener;
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(int position);
|
||||
}
|
||||
|
||||
public interface OnEditClickListener {
|
||||
void onEditClick(int position);
|
||||
}
|
||||
|
||||
public interface OnDeleteClickListener {
|
||||
void onDeleteClick(int position);
|
||||
}
|
||||
|
||||
// 移除了ItemTouchHelper相关代码,因为不再需要滑动操作
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.xscm.modulemain.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.blankj.utilcode.util.TouchUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.DialogCustomInputBinding;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
import com.xscm.moduleutil.bean.SongPlaylist;
|
||||
import com.xscm.moduleutil.event.GiftUserRefreshEvent;
|
||||
import com.xscm.moduleutil.event.RoomGiftClickToEvent;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* 自定义输入对话框
|
||||
*/
|
||||
public class CustomInputDialog extends BaseDialog<DialogCustomInputBinding> {
|
||||
|
||||
GiftSongDialog giftSongDialog;
|
||||
private String mGiftId, mGiftNum;
|
||||
private SongPlaylist.SongPlaylistBean mSongPlaylistBean;
|
||||
private OnDialogDismissListener mListener;
|
||||
|
||||
public CustomInputDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
// 设置监听器
|
||||
public void setOnDialogDismissListener(OnDialogDismissListener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
// 定义回调接口
|
||||
public interface OnDialogDismissListener {
|
||||
void onDialogDismiss(boolean dataChanged);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.dialog_custom_input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 315.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.ivClose.setOnClickListener(v -> dismiss());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
|
||||
mBinding.ivClose.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
// 通知Activity对话框关闭,但数据未更改
|
||||
if (mListener != null) {
|
||||
mListener.onDialogDismiss(false);
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.tvCancel.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
// 通知Activity对话框关闭,但数据未更改
|
||||
if (mListener != null) {
|
||||
mListener.onDialogDismiss(false);
|
||||
}
|
||||
});
|
||||
mBinding.tvClickable.setOnClickListener(v -> {
|
||||
giftSongDialog = new GiftSongDialog(getContext());
|
||||
giftSongDialog.show();
|
||||
giftSongDialog.setOnGiftConfirmListener(new GiftSongDialog.OnGiftConfirmListener() {
|
||||
@Override
|
||||
public void onGiftConfirm(String giftId, String name, String giftNum) {
|
||||
mGiftId = giftId;
|
||||
mGiftNum = giftNum;
|
||||
mBinding.tvClickable.setText(name);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
mBinding.tvConfirm.setOnClickListener(v -> {
|
||||
if (mBinding.etInput.getText().toString().isEmpty()) {
|
||||
ToastUtils.showLong("请输入歌曲名称");
|
||||
return;
|
||||
}
|
||||
if (mBinding.tvClickable.getText().toString().isEmpty()) {
|
||||
ToastUtils.showLong("请选择礼物");
|
||||
return;
|
||||
}
|
||||
if (mSongPlaylistBean != null) {
|
||||
RetrofitClient.getInstance().singerUpdateSong(mSongPlaylistBean.getId() + "", mBinding.etInput.getText().toString(), mGiftId, mGiftNum, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
dismiss();
|
||||
// 通知Activity数据已更新
|
||||
if (mListener != null) {
|
||||
mListener.onDialogDismiss(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RetrofitClient.getInstance().singerAddSong(mBinding.etInput.getText().toString(), mGiftId, mGiftNum, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
dismiss();
|
||||
// 通知Activity数据已更新
|
||||
if (mListener != null) {
|
||||
mListener.onDialogDismiss(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void PlaylistBean(SongPlaylist.SongPlaylistBean songPlaylistBean) {
|
||||
this.mSongPlaylistBean = songPlaylistBean;
|
||||
setPlaylistBean();
|
||||
}
|
||||
|
||||
private void setPlaylistBean() {
|
||||
if (mSongPlaylistBean != null) {
|
||||
mBinding.etInput.setText(mSongPlaylistBean.getSong_name());
|
||||
mBinding.tvClickable.setText(mSongPlaylistBean.getGift_name());
|
||||
mGiftId=mSongPlaylistBean.getGift_id();
|
||||
mGiftNum=mSongPlaylistBean.getGift_num();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.xscm.modulemain.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.DialogGiftSongBinding;
|
||||
import com.xscm.moduleutil.adapter.GiftRoomAdapter;
|
||||
import com.xscm.moduleutil.base.BaseFragment;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.GiftNumBean;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
import com.xscm.moduleutil.event.GiftUserRefreshEvent;
|
||||
import com.xscm.moduleutil.event.RoomGiftClickToEvent;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||
import com.xscm.moduleutil.widget.dialog.KeyboardPopupWindow;
|
||||
import com.xscm.moduleutil.widget.dialog.SelectGiftNumPopupWindow;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* 礼物歌曲对话框类
|
||||
* 该类可能用于实现一个展示歌曲相关礼物的对话框界面
|
||||
*/
|
||||
public class GiftSongDialog extends BaseDialog<DialogGiftSongBinding> {
|
||||
private GiftRoomAdapter roomAdapter;
|
||||
private List<GiftNumBean> mGiftNumList;
|
||||
private SelectGiftNumPopupWindow mSelectGiftNumPopupWindow;
|
||||
private KeyboardPopupWindow mKeyboardPopupWindow;
|
||||
|
||||
private List<RoonGiftModel> giftList = new ArrayList<>();
|
||||
private OnGiftConfirmListener onGiftConfirmListener;
|
||||
|
||||
public GiftSongDialog(@NonNull Context context) {
|
||||
super(context, com.xscm.moduleutil.R.style.dialogBottom);
|
||||
}
|
||||
|
||||
public interface OnGiftConfirmListener {
|
||||
void onGiftConfirm(String giftId,String name, String giftNum);
|
||||
}
|
||||
|
||||
public void setOnGiftConfirmListener(OnGiftConfirmListener listener) {
|
||||
this.onGiftConfirmListener = listener;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.dialog_gift_song;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
EventBus.getDefault().register(this);
|
||||
setCancelable(true);
|
||||
setCanceledOnTouchOutside(true);
|
||||
Window window = getWindow();
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.tvGiveCoinNum.setOnClickListener(this::onClick);
|
||||
mBinding.tvGive.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void onClick(View view1) {
|
||||
if (view1.getId()== com.xscm.moduleutil.R.id.tv_give_coin_num){
|
||||
if (mSelectGiftNumPopupWindow == null) {
|
||||
|
||||
mSelectGiftNumPopupWindow = new SelectGiftNumPopupWindow(getContext(), (adapter, view, position) -> {
|
||||
GiftNumBean giftNumBean = (GiftNumBean) adapter.getItem(position);
|
||||
if ("0".equals(giftNumBean.getNumber())) {//自定义
|
||||
mKeyboardPopupWindow = new KeyboardPopupWindow(getContext(), getCurrentFocus());
|
||||
mKeyboardPopupWindow.refreshKeyboardOutSideTouchable(false);//false开启键盘 ,true关闭键盘
|
||||
mKeyboardPopupWindow.addRoomPasswordListener(new KeyboardPopupWindow.KeyboardCompleteListener() {//监听自定键盘的完成
|
||||
@Override
|
||||
public void inputComplete(String inputContent) {
|
||||
mBinding.tvGiveCoinNum.setText(inputContent);
|
||||
mKeyboardPopupWindow.releaseResources();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mBinding.tvGiveCoinNum.setText(giftNumBean.getNumber());
|
||||
}
|
||||
mSelectGiftNumPopupWindow.dismiss();
|
||||
});
|
||||
}
|
||||
mSelectGiftNumPopupWindow.setData(mGiftNumList);
|
||||
mSelectGiftNumPopupWindow.showAtLocation(mBinding.tvGiveCoinNum, Gravity.BOTTOM | Gravity.RIGHT, 100, 230);
|
||||
|
||||
}else if (view1.getId()== com.xscm.moduleutil.R.id.tv_give){
|
||||
// 获取选中的礼物ID
|
||||
String selectedGiftId = null;
|
||||
String name="";
|
||||
for (RoonGiftModel giftModel : giftList) {
|
||||
if (giftModel.isChecked()) {
|
||||
selectedGiftId = giftModel.getGift_id();
|
||||
name=giftModel.getGift_name();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 获取礼物数量
|
||||
String giftNum = mBinding.tvGiveCoinNum.getText().toString();
|
||||
|
||||
// 如果有选中的礼物,通过回调传递数据
|
||||
if (selectedGiftId != null && onGiftConfirmListener != null) {
|
||||
onGiftConfirmListener.onGiftConfirm(selectedGiftId,name, giftNum);
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mGiftNumList=new ArrayList<>();
|
||||
mGiftNumList.add(new GiftNumBean("20", "x20"));
|
||||
mGiftNumList.add(new GiftNumBean("15", "x15"));
|
||||
mGiftNumList.add(new GiftNumBean("10", "x10"));
|
||||
mGiftNumList.add(new GiftNumBean("5", "x5"));
|
||||
mGiftNumList.add(new GiftNumBean("1", "x1"));
|
||||
|
||||
RetrofitClient.getInstance().getGiftList(0,"",new BaseObserver<List<RoonGiftModel>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<RoonGiftModel> roonGiftModels) {
|
||||
giftList= roonGiftModels;
|
||||
roomAdapter = new GiftRoomAdapter(CommonAppContext.getInstance(), roonGiftModels, 0, "0");
|
||||
mBinding.rvGift.setAdapter(roomAdapter);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onGiftClicRoomkTEvent(RoomGiftClickToEvent event) {
|
||||
String id = event.gift.getGift_id();
|
||||
for (int i = 0; i < giftList.size(); i++) {
|
||||
RoonGiftModel giftModel = giftList.get(i);
|
||||
if (giftModel.getGift_id().equals(id)) {
|
||||
if (giftModel.isChecked()) {
|
||||
giftModel.setChecked(false);
|
||||
} else {
|
||||
giftModel.setChecked(true);
|
||||
}
|
||||
} else {
|
||||
giftModel.setChecked(false);
|
||||
}
|
||||
}
|
||||
if (event.adapter != null && event.adapter.get() != null) {
|
||||
event.adapter.get().notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,12 +136,12 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
LogUtils.e("effectOn=" + effectOn);
|
||||
// 添加标题和对应的内容项
|
||||
dataList.add(new RoomSettingBean("房间类型", null, null, null, -1, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("点唱", "ic_sing", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeSing, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("交友", "ic_sing", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeSing, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("拍卖", "ic_auction", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeAuction, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("男神", "ic_boy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeBoy, read, isSelected, false, false));
|
||||
// dataList.add(new RoomSettingBean("女神", "ic_girl", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeGirl, read, isSelected, false, false));
|
||||
dataList.add(new RoomSettingBean("交友", "jiao_y", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU, read, isSelected, false, false));// 添加的新的房间类型 ,交友 ,是原来的男神女神类型
|
||||
dataList.add(new RoomSettingBean("互娱", "ic_jiaoy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy, read, isSelected, false, false)); //原交友,更改互娱 2025年9月19日11:18:01
|
||||
dataList.add(new RoomSettingBean("点唱", "jiao_y", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy, read, isSelected, false, false));// 添加的新的房间类型 ,交友 ,是原来的男神女神类型
|
||||
dataList.add(new RoomSettingBean("互娱", "ic_jiaoy", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU, read, isSelected, false, false)); //原交友,更改互娱 2025年9月19日11:18:01
|
||||
dataList.add(new RoomSettingBean("练歌房", "ic_liang", null, null, RoomSettingBean.QXRoomSettingTypeRoomTypeLianG, read, isSelected, false, false)); //练歌房,原点歌房,同意的时候,走同意点歌的逻辑
|
||||
|
||||
|
||||
@@ -278,9 +278,9 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
// }
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy) {
|
||||
// MvpPre.changeRoomType(roomId, "7");
|
||||
queren("7");
|
||||
queren("9");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU) {
|
||||
queren("8");
|
||||
queren("7");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeLianG){
|
||||
queren("-1");
|
||||
}else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||
@@ -335,7 +335,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(getActivity(),
|
||||
"提示",
|
||||
"即将修改房间类型为" + (type.equals("1") ? "点唱" : (type.equals("2") ? "拍卖" : (type.equals("3") ? "男神" : (type.equals("4") ? "女神" : (type.equals("7") ? "互娱" : (type.equals("8") ? "交友" :(type.equals("-1") ? "练歌房" : ""))))))),
|
||||
"即将修改房间类型为" + (type.equals("1") ? "交友" : (type.equals("2") ? "拍卖" : (type.equals("3") ? "男神" : (type.equals("4") ? "女神" : (type.equals("7") ? "互娱" : (type.equals("9") ? "点唱" :(type.equals("-1") ? "练歌房" : ""))))))),
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
@@ -361,7 +361,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
boolean onMic = false; // 是否是特定房间
|
||||
|
||||
if ((roomInfoResp.getRoom_info().getType_id().equals("1") || roomInfoResp.getRoom_info().getType_id().equals("3")
|
||||
|| roomInfoResp.getRoom_info().getType_id().equals("4") || roomInfoResp.getRoom_info().getType_id().equals("8")) && roomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
|| roomInfoResp.getRoom_info().getType_id().equals("4") || roomInfoResp.getRoom_info().getType_id().equals("9")) && roomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
onMic = true;
|
||||
}
|
||||
// 2025年9月22日14:18:50,因为声网sdk不对,和点唱有关系的所有,需要关闭
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.xscm.modulemain.model;
|
||||
|
||||
/**
|
||||
* 麦位模型
|
||||
*/
|
||||
public class WheatPosition {
|
||||
private int id;
|
||||
private String name;
|
||||
private boolean occupied;
|
||||
private String userId; // 占用该麦位的用户ID
|
||||
private String userName; // 占用该麦位的用户名
|
||||
|
||||
public WheatPosition() {
|
||||
}
|
||||
|
||||
public WheatPosition(int id, String name, boolean occupied) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.occupied = occupied;
|
||||
}
|
||||
|
||||
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 boolean isOccupied() {
|
||||
return occupied;
|
||||
}
|
||||
|
||||
public void setOccupied(boolean occupied) {
|
||||
this.occupied = occupied;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.xscm.modulemain.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.widget.BaseWheatView;
|
||||
|
||||
/**
|
||||
* com.xscm.moduleutil.widget
|
||||
* qx 这是点唱的麦位视图
|
||||
* 2025/11/12
|
||||
*/
|
||||
public class RoomJukeboxWheatView extends BaseWheatView {
|
||||
private ImageView iv_tag_type;
|
||||
|
||||
public RoomJukeboxWheatView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public RoomJukeboxWheatView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
|
||||
public RoomJukeboxWheatView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initPit(Context context, AttributeSet attrs) {
|
||||
TypedArray typedArray = null;
|
||||
try {
|
||||
typedArray = context.obtainStyledAttributes(attrs, com.xscm.moduleutil.R.styleable.RoomDefaultWheatView);
|
||||
pitNumber = typedArray.getString(com.xscm.moduleutil.R.styleable.RoomDefaultWheatView_room_wheat_number);
|
||||
} finally {
|
||||
if (typedArray != null) {
|
||||
typedArray.recycle();
|
||||
}
|
||||
}
|
||||
|
||||
mCharmView = findViewById(R.id.charm_view);
|
||||
mIvRipple = findViewById(R.id.iv_ripple);
|
||||
mIvFrame = findViewById(R.id.iv_frame);
|
||||
mIvShutup = findViewById(R.id.iv_shutup);
|
||||
mRiv = findViewById(R.id.riv);
|
||||
iv_tag_type =findViewById(R.id.iv_tag_type);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.room_view_jukebox_wheat;
|
||||
}
|
||||
|
||||
// 提供一个方法来设置这个属性,便于在代码中动态更改
|
||||
public void setRoomWheatNumber(String number) {
|
||||
this.pitNumber = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setPitData(RoomPitBean bean) {
|
||||
if (bean == null) return;
|
||||
|
||||
pitBean = bean; // 统一使用参数 bean
|
||||
stopAndClearAnimation(); // 清理之前的动画资源
|
||||
|
||||
if (isOn()) {
|
||||
handleOnState(bean);
|
||||
} else {
|
||||
handleOffState(bean);
|
||||
}
|
||||
|
||||
iv_tag_type.setVisibility(bean.isImageType()?VISIBLE:GONE);
|
||||
iv_tag_type.setImageResource(com.xscm.moduleutil.R.mipmap.mu_yc);
|
||||
}
|
||||
|
||||
public void setSex(String value, boolean format) {
|
||||
mCharmView.setSex("", "", value, format);
|
||||
}
|
||||
|
||||
public void setImageType(boolean b){
|
||||
if(b){
|
||||
iv_tag_type.setVisibility(VISIBLE);
|
||||
}else
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
}
|
||||
|
||||
private void handleOnState(RoomPitBean bean) {
|
||||
|
||||
mIvRipple.setVisibility(VISIBLE);
|
||||
mTvName.setVisibility(VISIBLE);
|
||||
mTvName.setText(bean.getNickname());
|
||||
ImageUtils.loadHeadCC(bean.getAvatar(), mRiv);
|
||||
mCharmView.setVisibility(VISIBLE);
|
||||
if (TextUtils.isEmpty(bean.getDress())) {
|
||||
mIvFrame.stopAll();
|
||||
mIvFrame.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
mIvFrame.setVisibility(VISIBLE);
|
||||
mIvFrame.setSource(bean.getDress(), 3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if(pitNumber.equals("9")){
|
||||
// iv_tag_type.setVisibility(GONE);
|
||||
// mTvName.setBackgroundColor(com.xscm.moduleutil.R.color.transparent);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private String getPitNumberText() {
|
||||
if ("-1".equals(pitNumber)) return "";
|
||||
if ("9".equals(pitNumber)) return "";
|
||||
if ("10".equals(pitNumber)) return "老板";
|
||||
return pitNumber + "号麦";
|
||||
}
|
||||
|
||||
private void handleOffState(RoomPitBean bean) {
|
||||
|
||||
if (bean.getPit_number().equals("9")){
|
||||
mTvName.setVisibility(GONE);
|
||||
}else {
|
||||
mTvName.setVisibility(VISIBLE);
|
||||
mTvName.setText(getPitNumberText());
|
||||
}
|
||||
mCharmView.setVisibility(GONE);
|
||||
mRiv.setVisibility(VISIBLE);
|
||||
mRiv.setImageResource(R.mipmap.jukebox_room_mask);
|
||||
mIvShutup.setVisibility( GONE);
|
||||
iv_tag_type.setVisibility(GONE);
|
||||
// ImageUtils.loadRes(com.xscm.moduleutil.R.mipmap.room_microphone_off, mIvShutup);
|
||||
mIvFrame.stopAll();
|
||||
mIvFrame.setVisibility(GONE);
|
||||
mIvRipple.setVisibility(GONE);
|
||||
}
|
||||
|
||||
private void stopAndClearAnimation() {
|
||||
if (mIvRipple != null) {
|
||||
// mIvRipple.stopAnimation();
|
||||
mIvRipple.stopAnimation(true);
|
||||
// 清理SVGA资源,避免内存泄漏
|
||||
// mIvRipple.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onRemoteSoundLevelUpdate(String userId, int soundLevel) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocalSoundLevelUpdate(int volume) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userJoined(int userId, int elapsd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userOffline(int userId, int reason) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pkOffSide(int userId) {
|
||||
|
||||
}
|
||||
}
|
||||
13
MainModule/src/main/res/drawable/arc_progress_drawable.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromDegrees="270"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%">
|
||||
<shape android:shape="ring">
|
||||
<solid android:color="#4CAF50" />
|
||||
<stroke
|
||||
android:width="6dp"
|
||||
android:color="#4CAF50"
|
||||
android:height="6dp" />
|
||||
</shape>
|
||||
</rotate>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 背景圆环 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="ring"
|
||||
android:innerRadiusRatio="2.5"
|
||||
android:thicknessRatio="15.0">
|
||||
<solid android:color="#E0E0E0" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 进度圆环 -->
|
||||
<item android:id="@android:id/progress">
|
||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromDegrees="270"
|
||||
android:toDegrees="270"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%">
|
||||
<shape android:shape="ring"
|
||||
android:innerRadiusRatio="2.5"
|
||||
android:thicknessRatio="15.0">
|
||||
<solid android:color="#4CAF50" />
|
||||
</shape>
|
||||
</rotate>
|
||||
</item>
|
||||
</layer-list>
|
||||
215
MainModule/src/main/res/layout/activity_singer_verification.xml
Normal file
@@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
tools:context=".activity.user.activity.SingerVerificationActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<!-- 背景渐变 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/singer_bj"
|
||||
android:elevation="-1dp" />
|
||||
|
||||
<!-- 顶部标题栏 -->
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_corner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/card_corner_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/me_corner"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_corner"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_corner"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_corner" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/corner_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:text="暂未认证"
|
||||
android:textColor="#73000000"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_corner"
|
||||
app:layout_constraintEnd_toEndOf="@id/im_corner"
|
||||
app:layout_constraintStart_toStartOf="@id/im_corner" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_corner_status"
|
||||
app:layout_constraintBottom_toTopOf="@+id/corner_status"
|
||||
app:layout_constraintEnd_toEndOf="@id/im_corner"
|
||||
app:layout_constraintStart_toStartOf="@id/im_corner" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_corner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_me_corner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/me_corner_bj"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_me_corner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="我的认证"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_me_corner"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_me_corner"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_me_corner" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time_text_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="00:00"
|
||||
android:textColor="#73000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_me_corner"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_me_corner" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time_text_view2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text=" | 05:00"
|
||||
android:textColor="#73000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/time_text_view"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_me_corner" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_submit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/but_corner"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_me_corner"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_me_corner" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/re_record_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:background="@color/transparent"
|
||||
android:drawableTop="@mipmap/but_cl"
|
||||
android:text="重录"
|
||||
android:textColor="#73000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_me_corner"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_me_corner" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/play_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:background="@color/transparent"
|
||||
android:drawableTop="@mipmap/but_st"
|
||||
android:text="试听"
|
||||
android:textColor="#73000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_me_corner"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_me_corner" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/record_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/but_ly"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/progress_arc"
|
||||
app:layout_constraintEnd_toEndOf="@+id/progress_arc"
|
||||
app:layout_constraintStart_toStartOf="@+id/progress_arc"
|
||||
app:layout_constraintTop_toTopOf="@+id/progress_arc" />
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_arc"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="@dimen/dp_101"
|
||||
android:layout_height="@dimen/dp_101"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:indeterminate="false"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/circular_progress_drawable"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_me_corner"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_me_corner"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_me_corner" />
|
||||
|
||||
<!-- 文字提示 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="长按录音"
|
||||
android:textColor="#73000000"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/progress_arc"
|
||||
app:layout_constraintStart_toStartOf="@+id/progress_arc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/progress_arc" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
66
MainModule/src/main/res/layout/activity_user_playlist.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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"
|
||||
tools:context=".activity.user.activity.UserPlaylistActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="共8首音乐"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
/>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_num"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar_layout" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
108
MainModule/src/main/res/layout/dialog_custom_input.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:orientation="vertical">
|
||||
<!-- 标题栏 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_50">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="新增歌单"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:src="@mipmap/gb" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_20">
|
||||
|
||||
<!-- 输入框 -->
|
||||
<EditText
|
||||
android:id="@+id/et_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:background="@drawable/bg_r11_effef8"
|
||||
android:hint="请输入内容"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textColorHint="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<!-- 可点击的文本框 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_clickable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@drawable/bg_r11_effef8"
|
||||
android:drawableEnd="@mipmap/room_rig_jt"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:text="点击选择"
|
||||
android:textColor="#9B9B9B"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 按钮区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r53_f3f3f3"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r53_0dffb9"
|
||||
android:backgroundTint="#3ABC6D"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
87
MainModule/src/main/res/layout/dialog_gift_song.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".widget.dialog.RewardGiftDialogFragment">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="460dp"
|
||||
android:background="@drawable/bg_r16_fff"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_29"
|
||||
|
||||
>
|
||||
|
||||
|
||||
<GridView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="280dp"
|
||||
android:id="@+id/rv_gift"
|
||||
android:gravity="center"
|
||||
android:listSelector="#00000000"
|
||||
android:numColumns="4"
|
||||
android:stretchMode="columnWidth"
|
||||
android:verticalSpacing="10dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/rl"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rv_gift"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gift_num"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/bg_r65_eff2f8"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<com.xscm.moduleutil.widget.MarqueeTextView
|
||||
android:id="@+id/tv_give_coin_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="x1"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_give"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r65_0dffb9"
|
||||
android:gravity="center"
|
||||
android:text="确认"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_FF333333"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
244
MainModule/src/main/res/layout/fragment_jukebox.xml
Normal file
@@ -0,0 +1,244 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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"
|
||||
tools:context=".fragment.JukeboxFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:clipChildren="false">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_performer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/performer_bj"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
|
||||
<!-- <com.xscm.modulemain.view.RoomJukeboxWheatView-->
|
||||
<!-- android:id="@+id/wv_lb"-->
|
||||
<!-- android:layout_width="@dimen/dp_44"-->
|
||||
<!-- android:layout_height="@dimen/dp_44"-->
|
||||
<!-- android:layout_marginTop="-13dp"-->
|
||||
<!-- app:layout_constraintDimensionRatio="1:1"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_42"-->
|
||||
<!-- android:background="@color/red"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/im_performer"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@+id/im_performer"-->
|
||||
<!-- app:room_wheat_number="99" />-->
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/ci_net_ava"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginEnd="@dimen/dp_42"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_performer"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_performer"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_net_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
tools:text="请点歌"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:background="@drawable/bg_r53_0dffb9"
|
||||
android:backgroundTint="#62594B"
|
||||
android:visibility="gone"
|
||||
android:paddingHorizontal="@dimen/dp_6"
|
||||
android:textColor="#EFEAFF"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ci_net_ava"
|
||||
app:layout_constraintStart_toStartOf="@+id/ci_net_ava"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ci_net_ava"/>
|
||||
|
||||
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/ci_user_ava"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_61"
|
||||
android:src="@mipmap/microphone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_performer"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_performer"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_performer_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="请点歌"
|
||||
android:textColor="@color/colorWhite45"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_performer"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_performer"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ci_user_ava" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_host"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/jukebox_host_bj"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_performer" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_host"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_host"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_performer" />
|
||||
|
||||
<com.xscm.modulemain.view.RoomJukeboxWheatView
|
||||
android:id="@+id/wv_zc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="@dimen/dp_4"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_host"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_host"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_host"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_host"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:room_wheat_number="9" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/guest_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_performer">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_guest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/jukebox_gs_bj"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_gs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/icon_gs"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_guest"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_xyw"
|
||||
android:layout_width="@dimen/dp_33"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:text="下一位准备"
|
||||
android:textColor="#a6ffffff"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_guest"
|
||||
app:layout_constraintStart_toStartOf="@id/im_guest"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_guest" />
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/ci_gs_ava"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_guest"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_xyw"
|
||||
app:layout_constraintTop_toTopOf="@+id/im_guest"
|
||||
tools:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gs_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:text="请点歌"
|
||||
android:textColor="@color/colorWhite45"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_xyw"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ci_gs_ava" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_qg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/but_skip"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_performer"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_performer" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_dg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_9"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/but_song"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/im_performer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_performer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_song"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_36"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:background="@mipmap/song_bj"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="@dimen/dp_5"
|
||||
android:textColor="#FFE100"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="@+id/im_performer"
|
||||
app:layout_constraintStart_toStartOf="@+id/im_performer"
|
||||
app:layout_constraintTop_toBottomOf="@+id/im_performer"
|
||||
tools:text="演唱歌曲:我的好兄弟" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_jukebox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_200"
|
||||
android:layout_marginHorizontal="@dimen/dp_12"
|
||||
android:layout_marginVertical="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_song"
|
||||
tools:listitem="@layout/item_jukebox" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</layout>
|
||||
316
MainModule/src/main/res/layout/fragment_request_song.xml
Normal file
@@ -0,0 +1,316 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".activity.room.fragment.RequestSongFragment">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r14_1b1926">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
app:tabIndicatorHeight="2dp"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextColor="#BDBBC8"
|
||||
app:tabTextAppearance="@style/TabLayoutTextStyle" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tab_layout"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<!-- <TableLayout-->
|
||||
<!-- android:id="@+id/table_layout"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:stretchColumns="*"-->
|
||||
<!-- android:padding="10dp"-->
|
||||
<!-- android:layout_marginTop="10dp"-->
|
||||
<!-- android:layout_marginBottom="10dp"-->
|
||||
<!-- android:layout_marginStart="10dp"-->
|
||||
<!-- android:layout_marginEnd="10dp"-->
|
||||
<!-- android:background="@drawable/bg_r14_1b1926"-->
|
||||
<!-- android:orientation="vertical">-->
|
||||
|
||||
<!-- <TableRow-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content">-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/tab_request_song"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:padding="8dp"-->
|
||||
<!-- android:background="?android:attr/selectableItemBackground"-->
|
||||
<!-- android:clickable="true"-->
|
||||
<!-- android:focusable="true">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_request_song"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="点歌"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="16sp" />-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/tab_requested_songs"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:padding="8dp"-->
|
||||
<!-- android:background="?android:attr/selectableItemBackground"-->
|
||||
<!-- android:clickable="true"-->
|
||||
<!-- android:focusable="true">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_requested_songs"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="已点歌曲"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="16sp" />-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/tab_history"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:padding="8dp"-->
|
||||
<!-- android:background="?android:attr/selectableItemBackground"-->
|
||||
<!-- android:clickable="true"-->
|
||||
<!-- android:focusable="true">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_history"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="历史记录"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="16sp" />-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- </TableRow>-->
|
||||
<!-- </TableLayout>-->
|
||||
|
||||
<!-- <!– 内容区域,用于切换显示不同标签页的内容 –>-->
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/content_container"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="10dp"-->
|
||||
<!-- android:layout_marginEnd="10dp"-->
|
||||
<!-- android:layout_marginBottom="10dp"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/table_layout"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent">-->
|
||||
|
||||
<!-- <!– 点歌页面 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/layout_request_song"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:visibility="visible">-->
|
||||
|
||||
<!-- <!– 麦位选择区域 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:padding="8dp">-->
|
||||
|
||||
<!-- <HorizontalScrollView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:scrollbars="none">-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/ll_wheat_positions"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal" />-->
|
||||
<!-- </HorizontalScrollView>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!--<!– <androidx.recyclerview.widget.RecyclerView–>-->
|
||||
<!--<!– android:id="@+id/rv_request_songs"–>-->
|
||||
<!--<!– android:layout_width="match_parent"–>-->
|
||||
<!--<!– android:layout_height="wrap_content"–>-->
|
||||
<!--<!– android:padding="8dp"–>-->
|
||||
<!--<!– tools:listitem="@layout/item_song" />–>-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_no_songs"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:padding="16dp"-->
|
||||
<!-- android:text="暂无可点歌曲"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="14sp"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <!– 已点歌曲页面 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/layout_requested_songs"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:visibility="gone">-->
|
||||
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:id="@+id/rv_my_requested_songs"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:padding="8dp"-->
|
||||
<!-- tools:listitem="@layout/item_requested_song" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_no_requested_songs"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:padding="16dp"-->
|
||||
<!-- android:text="暂无已点歌曲"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="14sp"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <!– 历史记录页面 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/layout_history"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:visibility="gone">-->
|
||||
|
||||
<!-- <!– 时间筛选区域 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:padding="8dp">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="时间筛选:"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="14sp" />-->
|
||||
|
||||
<!-- <HorizontalScrollView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:scrollbars="none">-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/ll_time_filters"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal">-->
|
||||
|
||||
<!--<!– <TextView–>-->
|
||||
<!--<!– android:id="@+id/tv_filter_today"–>-->
|
||||
<!--<!– android:layout_width="wrap_content"–>-->
|
||||
<!--<!– android:layout_height="wrap_content"–>-->
|
||||
<!--<!– android:layout_marginEnd="8dp"–>-->
|
||||
<!--<!– android:background="@drawable/bg_r8_333333"–>-->
|
||||
<!--<!– android:paddingStart="12dp"–>-->
|
||||
<!--<!– android:paddingTop="6dp"–>-->
|
||||
<!--<!– android:paddingEnd="12dp"–>-->
|
||||
<!--<!– android:paddingBottom="6dp"–>-->
|
||||
<!--<!– android:text="今日"–>-->
|
||||
<!--<!– android:textColor="@color/white"–>-->
|
||||
<!--<!– android:textSize="12sp" />–>-->
|
||||
|
||||
<!--<!– <TextView–>-->
|
||||
<!--<!– android:id="@+id/tv_filter_yesterday"–>-->
|
||||
<!--<!– android:layout_width="wrap_content"–>-->
|
||||
<!--<!– android:layout_height="wrap_content"–>-->
|
||||
<!--<!– android:layout_marginEnd="8dp"–>-->
|
||||
<!--<!– android:background="@drawable/bg_r8_333333"–>-->
|
||||
<!--<!– android:paddingStart="12dp"–>-->
|
||||
<!--<!– android:paddingTop="6dp"–>-->
|
||||
<!--<!– android:paddingEnd="12dp"–>-->
|
||||
<!--<!– android:paddingBottom="6dp"–>-->
|
||||
<!--<!– android:text="昨日"–>-->
|
||||
<!--<!– android:textColor="@color/white"–>-->
|
||||
<!--<!– android:textSize="12sp" />–>-->
|
||||
|
||||
<!--<!– <TextView–>-->
|
||||
<!--<!– android:id="@+id/tv_filter_this_week"–>-->
|
||||
<!--<!– android:layout_width="wrap_content"–>-->
|
||||
<!--<!– android:layout_height="wrap_content"–>-->
|
||||
<!--<!– android:layout_marginEnd="8dp"–>-->
|
||||
<!--<!– android:background="@drawable/bg_r8_333333"–>-->
|
||||
<!--<!– android:paddingStart="12dp"–>-->
|
||||
<!--<!– android:paddingTop="6dp"–>-->
|
||||
<!--<!– android:paddingEnd="12dp"–>-->
|
||||
<!--<!– android:paddingBottom="6dp"–>-->
|
||||
<!--<!– android:text="本周"–>-->
|
||||
<!--<!– android:textColor="@color/white"–>-->
|
||||
<!--<!– android:textSize="12sp" />–>-->
|
||||
|
||||
<!--<!– <TextView–>-->
|
||||
<!--<!– android:id="@+id/tv_filter_last_week"–>-->
|
||||
<!--<!– android:layout_width="wrap_content"–>-->
|
||||
<!--<!– android:layout_height="wrap_content"–>-->
|
||||
<!--<!– android:layout_marginEnd="8dp"–>-->
|
||||
<!--<!– android:background="@drawable/bg_r8_333333"–>-->
|
||||
<!--<!– android:paddingStart="12dp"–>-->
|
||||
<!--<!– android:paddingTop="6dp"–>-->
|
||||
<!--<!– android:paddingEnd="12dp"–>-->
|
||||
<!--<!– android:paddingBottom="6dp"–>-->
|
||||
<!--<!– android:text="上周"–>-->
|
||||
<!--<!– android:textColor="@color/white"–>-->
|
||||
<!--<!– android:textSize="12sp" />–>-->
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- </HorizontalScrollView>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:id="@+id/rv_song_history"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:padding="8dp"-->
|
||||
<!-- tools:listitem="@layout/item_song_history" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_no_history"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:padding="16dp"-->
|
||||
<!-- android:text="暂无历史记录"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="14sp"-->
|
||||
<!-- android:visibility="gone" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- </FrameLayout>-->
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
54
MainModule/src/main/res/layout/fragment_requested_songs.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_r14_1b1926">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_my_requested_songs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
tools:listitem="@layout/item_requested_song" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_requested_songs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="暂无已点歌曲"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
138
MainModule/src/main/res/layout/fragment_song_history.xml
Normal file
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_r14_1b1926">
|
||||
|
||||
<!-- 时间筛选区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_time_filters"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_filter_today"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_r16_2b2935"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="今日"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_filter_yesterday"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_r16_2b2935"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="昨日"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_filter_this_week"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_r16_2b2935"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="本周"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_filter_last_week"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_r16_2b2935"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="上周"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_song_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
tools:listitem="@layout/item_history"
|
||||
/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="暂无历史记录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
71
MainModule/src/main/res/layout/fragment_song_request.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_r14_1b1926">
|
||||
|
||||
<!-- 麦位选择区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_wheat_positions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:scrollbars="none" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableRefresh="true">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_request_songs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/item_song" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_songs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="暂无可点歌曲"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -6,13 +6,13 @@
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/home_bj"
|
||||
android:overScrollMode="never"
|
||||
android:background="@mipmap/home_bj">
|
||||
android:paddingBottom="@dimen/dp_30">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/dp_60"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -26,29 +26,29 @@
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:visibility="gone">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginRight="@dimen/dp_11"
|
||||
android:src="@drawable/image_yq"/>
|
||||
android:src="@drawable/image_yq" />
|
||||
|
||||
<ImageView
|
||||
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginRight="@dimen/dp_11"
|
||||
android:src="@drawable/custom"/>
|
||||
android:src="@drawable/custom" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginRight="@dimen/dp_11"
|
||||
android:src="@mipmap/setting"/>
|
||||
android:src="@mipmap/setting" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -60,18 +60,18 @@
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/me_linearlayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_76"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_48"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|left"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
@@ -83,31 +83,19 @@
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true"/>
|
||||
app:riv_oval="true" />
|
||||
|
||||
<com.xscm.moduleutil.widget.ShineTextView
|
||||
<TextView
|
||||
android:id="@+id/tv_nick_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:textColor="@color/white"
|
||||
app:isShine="false"
|
||||
app:layout_constraintStart_toEndOf="@+id/riv_user_head"
|
||||
app:layout_constraintTop_toTopOf="@+id/riv_user_head"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
tools:text="用户22333333"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layout_constraintStart_toEndOf="@+id/riv_user_head"
|
||||
app:layout_constraintTop_toTopOf="@+id/riv_user_head"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
tools:text="用户22333333"/>
|
||||
tools:text="用户22333333" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/beautiful_view"
|
||||
@@ -117,7 +105,7 @@
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_nick_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_nick_name"
|
||||
tools:text="22222"/>
|
||||
tools:text="22222" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_copy"
|
||||
@@ -126,41 +114,99 @@
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@mipmap/copy"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/beautiful_view"
|
||||
app:layout_constraintTop_toTopOf="@+id/beautiful_view"
|
||||
android:textSize="12sp"/>
|
||||
app:layout_constraintTop_toTopOf="@+id/beautiful_view" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_beautiful"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_11"
|
||||
android:layout_marginLeft="5dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_copy"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_copy"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/beautiful"/>
|
||||
android:src="@mipmap/beautiful"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_copy"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_copy" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_image_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/beautiful_view"
|
||||
app:layout_constraintStart_toStartOf="@+id/beautiful_view"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/beautiful_view" />
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/lin"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:layout_marginStart="@dimen/dp_14"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/riv_user_head"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@+id/riv_user_head">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_nick_name"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:textColor="#fff"-->
|
||||
<!-- android:textSize="@dimen/sp_16"-->
|
||||
<!-- tools:text="用户22333333" />-->
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/beautiful_view_copy"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="7dp"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:orientation="horizontal">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/beautiful_view"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:textColor="@color/color_FFFFFFE0"-->
|
||||
<!-- android:textSize="@dimen/sp_12"-->
|
||||
<!-- tools:text="22222" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_copy"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="5dp"-->
|
||||
<!-- android:background="@mipmap/copy"-->
|
||||
<!-- android:textColor="@color/color_666666"-->
|
||||
<!-- android:textSize="12sp" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/im_beautiful"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/dp_11"-->
|
||||
<!-- android:layout_marginLeft="5dp"-->
|
||||
<!-- android:scaleType="fitCenter"-->
|
||||
<!-- tools:src="@mipmap/beautiful" />-->
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/ll_image_container"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="horizontal"-->
|
||||
<!-- android:layout_gravity="bottom"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_4"-->
|
||||
<!-- >-->
|
||||
<!-- </LinearLayout>-->
|
||||
<!-- </LinearLayout>-->
|
||||
<ImageView
|
||||
android:id="@+id/tv_home"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_33"
|
||||
android:src="@mipmap/me_edit"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@mipmap/me_edit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -179,20 +225,20 @@
|
||||
android:id="@+id/ll_follow"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|center_horizontal|center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center|center_horizontal|center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_follow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_22"/>
|
||||
android:textSize="@dimen/sp_22" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -200,7 +246,7 @@
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="关注"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -209,8 +255,7 @@
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="#444541"
|
||||
/>
|
||||
android:background="#444541" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_fans"
|
||||
@@ -224,11 +269,11 @@
|
||||
android:id="@+id/tv_fans"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_22"/>
|
||||
android:textSize="@dimen/sp_22" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -236,7 +281,7 @@
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="粉丝"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -245,8 +290,7 @@
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="#444541"
|
||||
/>
|
||||
android:background="#444541" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_friends"
|
||||
@@ -261,11 +305,11 @@
|
||||
android:id="@+id/tv_friends"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_22"/>
|
||||
android:textSize="@dimen/sp_22" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -273,7 +317,7 @@
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="访客"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -283,7 +327,7 @@
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_visit"
|
||||
@@ -301,7 +345,7 @@
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_20"/>
|
||||
android:textSize="@dimen/sp_20" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -309,44 +353,45 @@
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:text="访客"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_noble_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:visibility="invisible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_noblesse"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@mipmap/my_noblesse"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="更多"
|
||||
android:gravity="center"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:drawableRight="@mipmap/arrow_right"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center"
|
||||
android:text="更多"
|
||||
android:textColor="#EECE72"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/im_noblesse"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:textColor="#EECE72"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -365,8 +410,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
>
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_recharge"
|
||||
@@ -374,14 +418,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@mipmap/me_recharge"/>
|
||||
android:src="@mipmap/me_recharge" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -389,7 +433,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="充值"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -398,14 +442,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@mipmap/me_show_store"/>
|
||||
android:src="@mipmap/me_show_store" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -413,7 +457,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="商城"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -422,14 +466,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@mipmap/me_gh"/>
|
||||
android:src="@mipmap/me_gh" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -437,7 +481,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="公会"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -445,16 +489,15 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@mipmap/me_zy"/>
|
||||
android:src="@mipmap/me_zy" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -462,7 +505,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="挚友"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -471,14 +514,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@mipmap/me_home"/>
|
||||
android:src="@mipmap/me_home" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -486,7 +529,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="房间"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -499,22 +542,22 @@
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
app:AutoPlayTime="3000"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:AutoPlayTime="3000"
|
||||
app:isAutoPlay="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl"
|
||||
app:pointsVisibility="false"/>
|
||||
app:pointsVisibility="false" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:cardBackgroundColor="#231F2C"
|
||||
app:cardCornerRadius="@dimen/dp_8">
|
||||
|
||||
@@ -523,17 +566,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
>
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:text="我的钱包"
|
||||
android:textColor="#929196"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
@@ -546,11 +588,11 @@
|
||||
android:id="@+id/tv_my_wallet"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_me_wallet"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@@ -558,10 +600,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="0.00"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:text="0.00"
|
||||
android:textColor="#222222"
|
||||
android:textSize="@dimen/sp_20"/>
|
||||
android:textSize="@dimen/sp_20" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -569,28 +611,28 @@
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/wallet"
|
||||
android:textColor="#333"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gift_wall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_me_gift_wall"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="礼物墙"
|
||||
android:fontFamily="@font/semibold"
|
||||
android:text="礼物墙"
|
||||
android:textColor="#222222"
|
||||
android:textSize="@dimen/sp_20"/>
|
||||
android:textSize="@dimen/sp_20" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -603,8 +645,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:cardBackgroundColor="#231F2C"
|
||||
app:cardCornerRadius="@dimen/dp_8">
|
||||
|
||||
@@ -613,17 +655,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
>
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:text="常用服务"
|
||||
android:textColor="#929196"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -643,7 +684,7 @@
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/my_dan"/>
|
||||
android:src="@mipmap/my_dan" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -651,7 +692,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="@string/dan"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -668,7 +709,7 @@
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/personality"/>
|
||||
android:src="@mipmap/personality" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -676,7 +717,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="@string/dressup"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -691,7 +732,7 @@
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/me_my_bag"/>
|
||||
android:src="@mipmap/me_my_bag" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -699,7 +740,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="@string/backpack"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -726,7 +767,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="@string/setting_name"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -741,34 +782,37 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:cardBackgroundColor="#231F2C"
|
||||
app:cardCornerRadius="@dimen/dp_8">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16">
|
||||
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:text="更多"
|
||||
android:textColor="#929196"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:orientation="horizontal">
|
||||
app:alignContent="flex_start"
|
||||
app:alignItems="stretch"
|
||||
app:flexDirection="row"
|
||||
app:flexWrap="wrap"
|
||||
app:justifyContent="flex_start">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_me_help"
|
||||
@@ -777,12 +821,14 @@
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/me_help"/>
|
||||
android:src="@mipmap/me_help" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -790,7 +836,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="帮助中心"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -800,12 +846,14 @@
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/me_invitation"/>
|
||||
android:src="@mipmap/me_invitation" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -813,7 +861,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="邀请"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -824,14 +872,14 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
android:visibility="visible"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/me_test"
|
||||
|
||||
/>
|
||||
android:src="@mipmap/me_test" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -839,7 +887,7 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="@string/daily"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -851,11 +899,14 @@
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="invisible">
|
||||
android:visibility="visible"
|
||||
app:layout_flexGrow="1"
|
||||
app:layout_flexBasisPercent="25%">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/me_opinion"/>
|
||||
android:src="@mipmap/me_opinion" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -863,32 +914,32 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="意见反馈"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
</LinearLayout>
|
||||
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_me_income"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/me_income"/>
|
||||
android:src="@mipmap/me_income" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -896,59 +947,90 @@
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="个税客服"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12"/>
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:id="@+id/ll_singer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1">
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="@dimen/dp_20"-->
|
||||
<!-- android:layout_height="@dimen/dp_20"-->
|
||||
<!-- android:src="@mipmap/me_my_bag"/>-->
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/but_singer" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/dp_17"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_3"-->
|
||||
<!-- android:text="@string/backpack"-->
|
||||
<!-- android:textColor="@color/color_FF333333"-->
|
||||
<!-- android:textSize="@dimen/sp_12"/>-->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="歌手认证"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:id="@+id/ll_playlist"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:visibility="invisible"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/but_me_playlist" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:text="我的歌单"
|
||||
android:textColor="#CCCDC8"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<!-- 占位符,确保每行都有4个项目 -->
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:visibility="invisible"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1"></LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="invisible"
|
||||
app:layout_flexBasisPercent="25%"
|
||||
app:layout_flexGrow="1"></LinearLayout>
|
||||
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
97
MainModule/src/main/res/layout/item_history.xml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:paddingHorizontal="@dimen/dp_12"
|
||||
android:layout_marginVertical="@dimen/dp_8"
|
||||
android:background="@drawable/bg_r8_262431">
|
||||
|
||||
<!-- 左侧歌曲信息区域,占2/5宽度 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_song_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_song_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#3ABC6D"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="已点歌曲"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_song_singer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="演唱者:1111111"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_boss_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="老板:2222"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 中间礼物信息区域,占2/5宽度 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gift_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintStart_toEndOf="@id/ll_song_info"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.4">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift_image"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@mipmap/ic_launcher"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="礼物名称"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:textColor="#8A8A8A"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="价格"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
17
MainModule/src/main/res/layout/item_jukebox.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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:layout_width="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_23"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.xscm.modulemain.view.RoomJukeboxWheatView
|
||||
android:id="@+id/wheatView"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_85"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_wheat_number="10"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
67
MainModule/src/main/res/layout/item_requested_song.xml
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_margin="@dimen/dp_12"
|
||||
android:background="@drawable/bg_r8_262431">
|
||||
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/iv_song_cover"
|
||||
android:layout_width="@dimen/dp_56"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginHorizontal="@dimen/dp_12"
|
||||
android:layout_marginVertical="@dimen/dp_7"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_song_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#3ABC6D"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_song_cover"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_song_cover"
|
||||
tools:text="歌曲名称"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_singer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_song_name"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_song_name"
|
||||
tools:text="演唱者:明天的名"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_request_bos"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_singer"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_singer"
|
||||
tools:text="老板:时尚"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_request_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:paddingHorizontal="@dimen/dp_14"
|
||||
android:paddingVertical="@dimen/dp_6"
|
||||
android:background="@drawable/bg_r34_0dffb9"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:text="正在播放"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
105
MainModule/src/main/res/layout/item_song.xml
Normal file
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:paddingHorizontal="@dimen/dp_12"
|
||||
android:layout_marginVertical="@dimen/dp_8"
|
||||
android:background="@drawable/bg_r8_262431">
|
||||
|
||||
<!-- 左侧歌曲信息区域,占2/5宽度 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_song_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginVertical="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_song_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#3ABC6D"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="已点歌曲"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_song_singer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:textColor="#8A8A8A"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="演唱者:1111111"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 中间礼物信息区域,占2/5宽度 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gift_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintStart_toEndOf="@id/ll_song_info"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.4">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift_image"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@mipmap/ic_launcher"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="礼物名称"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:textColor="#8A8A8A"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="价格"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧状态区域,占1/5宽度 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_status"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_r34_0dffb9"
|
||||
android:backgroundTint="#3ABC6D"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="@dimen/dp_14"
|
||||
android:paddingVertical="@dimen/dp_6"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_percent="0.2"
|
||||
tools:text="点歌"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
81
MainModule/src/main/res/layout/item_user_playlist.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?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="match_parent"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_song_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:text="歌曲名称" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="数量"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="礼物名称"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_value"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:drawableLeft="@mipmap/jinb"
|
||||
android:gravity="end|center_vertical"
|
||||
android:textColor="@color/color_FF666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="价值" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="#F1F2F3" />
|
||||
|
||||
</LinearLayout>
|
||||
14
MainModule/src/main/res/layout/item_wheat_position.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_r16_2b2935"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="麦位1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
152
MainModule/src/main/res/layout/room_view_jukebox_wheat.xml
Normal file
@@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<!-- 基础容器:头像和头像框 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/avatar_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1.15"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.7"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<!-- 离线状态 - 与头像框同样大小 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_online"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/room_ic_owner_offline"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_frame"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_frame"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_frame"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_frame"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 用户头像 -->
|
||||
<com.xscm.moduleutil.widget.CircularImage
|
||||
android:id="@+id/riv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/room_ic_wheat_default"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- 头像框 - 包裹头像 -->
|
||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||
android:id="@+id/iv_frame"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
app:layout_constraintStart_toStartOf="@id/riv"
|
||||
app:layout_constraintTop_toTopOf="@id/riv"
|
||||
app:layout_constraintWidth_percent="1.15"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 麦圈 - 在头像框上面展示 -->
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_ripple"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:autoPlay="false"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_frame"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_frame"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_frame"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_frame"
|
||||
app:layout_constraintWidth_percent="1.3"
|
||||
app:loopCount="0"
|
||||
app:source="mic.svga" />
|
||||
|
||||
<!-- 麦克风状态 - 头像框右下角 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_shutup"
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:src="@mipmap/room_microphone_off"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_frame"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_frame"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!-- 角色标签 - 头像下方覆盖部分头像 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_tag_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/mu_yc"
|
||||
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
app:layout_constraintStart_toStartOf="@id/riv" />
|
||||
|
||||
|
||||
<!-- 用户名称 - 在头像之下 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dp_2"
|
||||
android:layout_marginTop="@dimen/dp_1"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:paddingRight="@dimen/dp_5"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/riv"
|
||||
tools:text="麦位1"
|
||||
tools:textColor="@color/color_FF333333" />
|
||||
|
||||
<!-- 心动值 - 在名称之下 -->
|
||||
<com.xscm.moduleutil.widget.WheatCharmView
|
||||
android:id="@+id/charm_view"
|
||||
android:layout_width="@dimen/dp_52"
|
||||
android:layout_height="@dimen/dp_12"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
MainModule/src/main/res/mipmap-hdpi/but_cl.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_corner.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_ly.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_me_playlist.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_singer.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_skip.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_song.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_st.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/but_tz.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/card_corner_background.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_corner_status.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_gs.webp
Normal file
|
After Width: | Height: | Size: 804 B |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_host.webp
Normal file
|
After Width: | Height: | Size: 784 B |
BIN
MainModule/src/main/res/mipmap-hdpi/jukebox_bj.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/jukebox_gs_bj.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/jukebox_host_bj.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/jukebox_room_mask.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/me_corner.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/me_corner_bj.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/microphone.webp
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
MainModule/src/main/res/mipmap-hdpi/performer_bj.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/singer_bj.png
Normal file
|
After Width: | Height: | Size: 317 KiB |