心动空间
102
BaseModule/src/main/java/com/xscm/moduleutil/bean/HeartCpBean.kt
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
package com.xscm.moduleutil.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
class HeartCpBean : Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
/* {
|
||||||
|
"code": 1,
|
||||||
|
"msg": "\u6210\u529f",
|
||||||
|
"data": {
|
||||||
|
"id": 1,
|
||||||
|
"user_id1": 20001,
|
||||||
|
"user_id2": 20003,
|
||||||
|
"status": 1,
|
||||||
|
"level": 1,
|
||||||
|
"exp": 9198,
|
||||||
|
"createtime": 1763720783,
|
||||||
|
"user_info1": {
|
||||||
|
"user_id": 20001,
|
||||||
|
"nickname": "\u9ad8\u5174\u7684\u5c0f\u6d77\u817e",
|
||||||
|
"avatar": "https:\/\/yusheng-1369267578.cos.ap-guangzhou.myqcloud.com\/images\/ios_images\/1761615690733.jpeg"
|
||||||
|
},
|
||||||
|
"user_info2": {
|
||||||
|
"user_id": 20003,
|
||||||
|
"nickname": "\u79c0\u4e3d\u7684\u978b\u57ab",
|
||||||
|
"avatar": "https:\/\/yusheng-1369267578.cos.ap-guangzhou.myqcloud.com\/images\/android_images\/33e31b18577856c4f10906b7cabaa698.jpg"
|
||||||
|
},
|
||||||
|
"next_level_exp": 802,
|
||||||
|
"pendant": "https:\/\/cos.xscmmidi.site\/admin\/520liuxingyu_17637096968287.mp4",
|
||||||
|
"gift_log": [
|
||||||
|
{
|
||||||
|
"id": 323,
|
||||||
|
"room_id": 6003,
|
||||||
|
"from_user_id": 20001,
|
||||||
|
"to_user_id": 20003,
|
||||||
|
"gift_id": 313,
|
||||||
|
"num": 1,
|
||||||
|
"cp_zone_id": 1,
|
||||||
|
"exp": "1314",
|
||||||
|
"exp_total": "9198",
|
||||||
|
"remark": "\u9001\u7ed9\u79c0\u4e3d\u7684\u978b\u57ab1\u4e2a\u9e4a\u7f18\u7ec7\u68a6,\u83b7\u5f971314\u7ecf\u9a8c\u503c\uff0c\u603b\u7ecf\u9a8c\u503c\u589e\u52a0\u81f39198",
|
||||||
|
"createtime": 1763796118,
|
||||||
|
"gift_name": "\u9e4a\u7f18\u7ec7\u68a6",
|
||||||
|
"from_user_info": {
|
||||||
|
"user_id": 20001,
|
||||||
|
"nickname": "\u9ad8\u5174\u7684\u5c0f\u6d77\u817e",
|
||||||
|
"avatar": "https:\/\/yusheng-1369267578.cos.ap-guangzhou.myqcloud.com\/images\/ios_images\/1761615690733.jpeg"
|
||||||
|
},
|
||||||
|
"to_user_info": {
|
||||||
|
"user_id": 20003,
|
||||||
|
"nickname": "\u79c0\u4e3d\u7684\u978b\u57ab",
|
||||||
|
"avatar": "https:\/\/yusheng-1369267578.cos.ap-guangzhou.myqcloud.com\/images\/android_images\/33e31b18577856c4f10906b7cabaa698.jpg"
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
"api_version": ""
|
||||||
|
}*/
|
||||||
|
|
||||||
|
var id: Int = 0
|
||||||
|
var user_id1: Int = 0
|
||||||
|
var user_id2: Int = 0
|
||||||
|
var status: Int = 0
|
||||||
|
var level: Int = 0
|
||||||
|
var exp: Long = 0
|
||||||
|
var createtime: Long = 0
|
||||||
|
var user_info1: UserInfo = UserInfo()
|
||||||
|
var user_info2: UserInfo = UserInfo()
|
||||||
|
var next_level_exp: Long = 0
|
||||||
|
var pendant: String = ""
|
||||||
|
var gift_log: List<GiftLog> = ArrayList()
|
||||||
|
var api_version: String = ""
|
||||||
|
|
||||||
|
class GiftLog : Serializable {
|
||||||
|
var id: Int = 0
|
||||||
|
var room_id: Int = 0
|
||||||
|
var from_user_id: Int = 0
|
||||||
|
var to_user_id: Int = 0
|
||||||
|
var gift_id: Int = 0
|
||||||
|
var num: Int = 0
|
||||||
|
var cp_zone_id: Int = 0
|
||||||
|
var exp: String = ""
|
||||||
|
var exp_total: String = ""
|
||||||
|
var remark: String = ""
|
||||||
|
var createtime: Long = 0
|
||||||
|
var gift_name: String = ""
|
||||||
|
var from_user_info: UserInfo = UserInfo()
|
||||||
|
var to_user_info: UserInfo = UserInfo()
|
||||||
|
|
||||||
|
class UserInfo : Serializable {
|
||||||
|
var user_id: Int = 0
|
||||||
|
var nickname: String = ""
|
||||||
|
var avatar: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserInfo : Serializable {
|
||||||
|
var user_id: Int = 0
|
||||||
|
var nickname: String = ""
|
||||||
|
var avatar: String = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -856,4 +856,7 @@ public interface ApiServer {
|
|||||||
@POST(Constants.ROOM_USER_RECONNECT)
|
@POST(Constants.ROOM_USER_RECONNECT)
|
||||||
Call<BaseModel<String>> roomUserReconnect(@Field("room_id") String room_id);
|
Call<BaseModel<String>> roomUserReconnect(@Field("room_id") String room_id);
|
||||||
|
|
||||||
|
@GET(Constants.GET_CP_ZONE)
|
||||||
|
Call<BaseModel<HeartCpBean>> getCpRoom(@Query("user_id") String userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,9 @@ public class RetrofitClient {
|
|||||||
mRetrofit = provideRetrofit(provideOkHttpClient());
|
mRetrofit = provideRetrofit(provideOkHttpClient());
|
||||||
sApiServer = mRetrofit.create(ApiServer.class);
|
sApiServer = mRetrofit.create(ApiServer.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CPListener cpListener;
|
private CPListener cpListener;
|
||||||
|
|
||||||
public void CpListener(CPListener cpListenter) {
|
public void CpListener(CPListener cpListenter) {
|
||||||
this.cpListener = cpListenter;
|
this.cpListener = cpListenter;
|
||||||
}
|
}
|
||||||
@@ -604,7 +606,7 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void singerSongCut(String id,BaseObserver<String> observer) {
|
public void singerSongCut(String id, BaseObserver<String> observer) {
|
||||||
sApiServer.singerSongCut(id).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.singerSongCut(id).enqueue(new Callback<BaseModel<String>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -632,7 +634,7 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void singerSongTop(String id,BaseObserver<String> observer){
|
public void singerSongTop(String id, BaseObserver<String> observer) {
|
||||||
sApiServer.singerSongTop(id).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.singerSongTop(id).enqueue(new Callback<BaseModel<String>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -662,8 +664,8 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void singerSongCount(String roomId,BaseObserver<SingerSongCount> observer){
|
public void singerSongCount(String roomId, BaseObserver<SingerSongCount> observer) {
|
||||||
sApiServer.singerSongCount(roomId).enqueue(new Callback<BaseModel<SingerSongCount>>(){
|
sApiServer.singerSongCount(roomId).enqueue(new Callback<BaseModel<SingerSongCount>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<SingerSongCount>> call, Response<BaseModel<SingerSongCount>> response) {
|
public void onResponse(Call<BaseModel<SingerSongCount>> call, Response<BaseModel<SingerSongCount>> response) {
|
||||||
@@ -678,7 +680,7 @@ public class RetrofitClient {
|
|||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.showShort(baseModel.getMsg());
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3094,19 +3096,19 @@ public class RetrofitClient {
|
|||||||
sApiServer.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number, heart_id).enqueue(new Callback<BaseModel<RoomGiftData>>() {
|
sApiServer.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number, heart_id).enqueue(new Callback<BaseModel<RoomGiftData>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<RoomGiftData>> call, Response<BaseModel<RoomGiftData>> response) {
|
public void onResponse(Call<BaseModel<RoomGiftData>> call, Response<BaseModel<RoomGiftData>> response) {
|
||||||
if (response.code()==200){
|
if (response.code() == 200) {
|
||||||
BaseModel<RoomGiftData> data = response.body();
|
BaseModel<RoomGiftData> data = response.body();
|
||||||
if (data.getCode()==1) {
|
if (data.getCode() == 1) {
|
||||||
if (data.getData().getCp_type()!=null){
|
if (data.getData().getCp_type() != null) {
|
||||||
if (cpListener !=null){
|
if (cpListener != null) {
|
||||||
cpListener.onSendCpMsg(data.getData());
|
cpListener.onSendCpMsg(data.getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
observer.onNext(data.getData());
|
observer.onNext(data.getData());
|
||||||
|
|
||||||
}else if (data.getCode()==0){
|
} else if (data.getCode() == 0) {
|
||||||
ToastUtils.showShort(data.getMsg());
|
ToastUtils.showShort(data.getMsg());
|
||||||
}else if (data.getCode()==301) {
|
} else if (data.getCode() == 301) {
|
||||||
try {
|
try {
|
||||||
ToastUtils.showShort(data.getMsg());
|
ToastUtils.showShort(data.getMsg());
|
||||||
CommonAppContext.getInstance().clearLoginInfo();
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
@@ -3124,24 +3126,24 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cpGiveGift(String user_id, String gift_id,String room_id,BaseObserver<RoomGiftData> observer) {
|
public void cpGiveGift(String user_id, String gift_id, String room_id, BaseObserver<RoomGiftData> observer) {
|
||||||
sApiServer.cpGiveGift(user_id, gift_id,room_id).enqueue(new Callback<BaseModel<RoomGiftData>>() {
|
sApiServer.cpGiveGift(user_id, gift_id, room_id).enqueue(new Callback<BaseModel<RoomGiftData>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<RoomGiftData>> call, Response<BaseModel<RoomGiftData>> response) {
|
public void onResponse(Call<BaseModel<RoomGiftData>> call, Response<BaseModel<RoomGiftData>> response) {
|
||||||
if (response.code()==200){
|
if (response.code() == 200) {
|
||||||
BaseModel<RoomGiftData> data = response.body();
|
BaseModel<RoomGiftData> data = response.body();
|
||||||
if (data.getCode()==1) {
|
if (data.getCode() == 1) {
|
||||||
if (data.getData().getCp_type()!=null){
|
if (data.getData().getCp_type() != null) {
|
||||||
if (cpListener !=null){
|
if (cpListener != null) {
|
||||||
cpListener.onSendCpMsg(data.getData());
|
cpListener.onSendCpMsg(data.getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
observer.onNext(data.getData());
|
observer.onNext(data.getData());
|
||||||
|
|
||||||
}else if (data.getCode()==0){
|
} else if (data.getCode() == 0) {
|
||||||
ToastUtils.showShort(data.getMsg());
|
ToastUtils.showShort(data.getMsg());
|
||||||
}else if (data.getCode()==301) {
|
} else if (data.getCode() == 301) {
|
||||||
try {
|
try {
|
||||||
ToastUtils.showShort(data.getMsg());
|
ToastUtils.showShort(data.getMsg());
|
||||||
CommonAppContext.getInstance().clearLoginInfo();
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
@@ -3154,7 +3156,7 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<RoomGiftData>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<RoomGiftData>> call, Throwable t) {
|
||||||
LogUtils.e("cpGiveGift",t.fillInStackTrace());
|
LogUtils.e("cpGiveGift", t.fillInStackTrace());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -3403,7 +3405,6 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void agreeSong(String room_id, String type, BaseObserver<String> observer) {
|
public void agreeSong(String room_id, String type, BaseObserver<String> observer) {
|
||||||
sApiServer.agreeSong(room_id, type).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.agreeSong(room_id, type).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -3623,23 +3624,23 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getFriendListMore(String user_id,String relation_id,BaseObserver<List<RelationshipBean>> observer){
|
public void getFriendListMore(String user_id, String relation_id, BaseObserver<List<RelationshipBean>> observer) {
|
||||||
sApiServer.getFriendListMore(user_id,relation_id).enqueue(new Callback<BaseModel<List<RelationshipBean>>>() {
|
sApiServer.getFriendListMore(user_id, relation_id).enqueue(new Callback<BaseModel<List<RelationshipBean>>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<RelationshipBean>>> call, Response<BaseModel<List<RelationshipBean>>> response) {
|
public void onResponse(Call<BaseModel<List<RelationshipBean>>> call, Response<BaseModel<List<RelationshipBean>>> response) {
|
||||||
if (response.code()==200){
|
if (response.code() == 200) {
|
||||||
BaseModel<List<RelationshipBean>> baseModel = response.body();
|
BaseModel<List<RelationshipBean>> baseModel = response.body();
|
||||||
if (baseModel.getCode()==1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData());
|
observer.onNext(baseModel.getData());
|
||||||
}else if (baseModel.getCode()==301){
|
} else if (baseModel.getCode() == 301) {
|
||||||
try {
|
try {
|
||||||
ToastUtils.showShort(baseModel.getMsg());
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
CommonAppContext.getInstance().clearLoginInfo();
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.showShort(baseModel.getMsg());
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3647,7 +3648,7 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<List<RelationshipBean>>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<List<RelationshipBean>>> call, Throwable t) {
|
||||||
LogUtils.e("getFriendListMore",t.toString());
|
LogUtils.e("getFriendListMore", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -3783,22 +3784,22 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getFriendList(String userId,String page,String page_limit,BaseObserver<RelationBean> observer) {
|
public void getFriendList(String userId, String page, String page_limit, BaseObserver<RelationBean> observer) {
|
||||||
sApiServer.getFriendList(userId, page, page_limit).enqueue(new Callback<BaseModel<RelationBean>>() {
|
sApiServer.getFriendList(userId, page, page_limit).enqueue(new Callback<BaseModel<RelationBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<RelationBean>> call, Response<BaseModel<RelationBean>> response) {
|
public void onResponse(Call<BaseModel<RelationBean>> call, Response<BaseModel<RelationBean>> response) {
|
||||||
if (response.code()==200){
|
if (response.code() == 200) {
|
||||||
BaseModel<RelationBean> body = response.body();
|
BaseModel<RelationBean> body = response.body();
|
||||||
if (body.getCode()==1){
|
if (body.getCode() == 1) {
|
||||||
observer.onNext(body.getData());
|
observer.onNext(body.getData());
|
||||||
}else if (body.getCode()==301){
|
} else if (body.getCode() == 301) {
|
||||||
try {
|
try {
|
||||||
ToastUtils.showShort(body.getMsg());
|
ToastUtils.showShort(body.getMsg());
|
||||||
CommonAppContext.getInstance().clearLoginInfo();
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
ToastUtils.showShort(body.getMsg());
|
ToastUtils.showShort(body.getMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3806,7 +3807,7 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<RelationBean>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<RelationBean>> call, Throwable t) {
|
||||||
LogUtils.e("getFriendList",t.fillInStackTrace());
|
LogUtils.e("getFriendList", t.fillInStackTrace());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -4555,4 +4556,27 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getCpRoom(String userId,BaseObserver<HeartCpBean> observer) {
|
||||||
|
sApiServer.getCpRoom(userId).enqueue(new Callback<BaseModel<HeartCpBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<HeartCpBean>> call, Response<BaseModel<HeartCpBean>> response) {
|
||||||
|
if (response.code() == 200) {
|
||||||
|
BaseModel<HeartCpBean> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1) {
|
||||||
|
observer.onNext(baseModel.getData());
|
||||||
|
} else if (baseModel.getCode() == 0) {
|
||||||
|
observer.onNext(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<HeartCpBean>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ public abstract class BasePresenter<V extends IView> implements IPresenter {
|
|||||||
mContext = context;
|
mContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BasePresenter() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void attachView(V view) {
|
private void attachView(V view) {
|
||||||
MvpRef = new WeakReference<V>(view);
|
MvpRef = new WeakReference<V>(view);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ public class TimeUtils {
|
|||||||
}
|
}
|
||||||
public static String getDateToStringNoZ(long time) {
|
public static String getDateToStringNoZ(long time) {
|
||||||
Date d = new Date(time);
|
Date d = new Date(time);
|
||||||
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
return sf.format(d);
|
return sf.format(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ public class TimeUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 如果天数不足1天,根据需求可以返回空字符串,也可以返回 "0天" 或其他
|
// 如果天数不足1天,根据需求可以返回空字符串,也可以返回 "0天" 或其他
|
||||||
return ""; // 或者 return "0天";
|
return "1天"; // 或者 return "0天";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ public class Constants {
|
|||||||
|
|
||||||
public static final String GET_ROOM_GIFT = "/api/Room/room_give_gift";//直播间送礼
|
public static final String GET_ROOM_GIFT = "/api/Room/room_give_gift";//直播间送礼
|
||||||
public static final String POST_CP_GIVE_GIFT = "/api/UserCp/cpGiveGift";//用户CP礼物回赠
|
public static final String POST_CP_GIVE_GIFT = "/api/UserCp/cpGiveGift";//用户CP礼物回赠
|
||||||
|
public static final String GET_CP_ZONE = "/api/UserCp/cpZone";//心动空间
|
||||||
public static final String GET_ROOM_USER = "/api/Room/room_user_home";//房间内点击头像
|
public static final String GET_ROOM_USER = "/api/Room/room_user_home";//房间内点击头像
|
||||||
public static final String APPLY_PIT = "/api/RoomPit/apply_pit";//申请上麦
|
public static final String APPLY_PIT = "/api/RoomPit/apply_pit";//申请上麦
|
||||||
public static final String DOWN_PIT = "/api/RoomPit/down_pit";//下麦
|
public static final String DOWN_PIT = "/api/RoomPit/down_pit";//下麦
|
||||||
|
|||||||
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_cp_anim_bg.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_cp_anim_bg.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_cp_anim_bg.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
@@ -6,6 +6,9 @@
|
|||||||
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
||||||
|
|
||||||
<application android:theme="@style/AppTheme">
|
<application android:theme="@style/AppTheme">
|
||||||
|
<activity
|
||||||
|
android:name=".activity.user.activity.HeartCpActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.user.activity.RelationshipActivity"
|
android:name=".activity.user.activity.RelationshipActivity"
|
||||||
android:exported="true" />
|
android:exported="true" />
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
package com.xscm.modulemain.activity.user.activity
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter
|
||||||
|
import com.xscm.modulemain.BaseMvpActivity
|
||||||
|
import com.xscm.modulemain.R
|
||||||
|
import com.xscm.modulemain.activity.user.conacts.HeartCpContact
|
||||||
|
import com.xscm.modulemain.activity.user.presenter.HeartCpPresenter
|
||||||
|
import com.xscm.modulemain.adapter.ItemCpHeartAdapter
|
||||||
|
import com.xscm.modulemain.databinding.ActivityHeartCpBinding
|
||||||
|
import com.xscm.moduleutil.bean.HeartCpBean
|
||||||
|
import com.xscm.moduleutil.utils.ARouteConstants
|
||||||
|
import com.xscm.moduleutil.utils.ImageUtils
|
||||||
|
import com.xscm.moduleutil.utils.TimeUtils
|
||||||
|
|
||||||
|
class HeartCpActivity : BaseMvpActivity<HeartCpPresenter, ActivityHeartCpBinding>(),
|
||||||
|
HeartCpContact.View {
|
||||||
|
|
||||||
|
|
||||||
|
private var adapter: ItemCpHeartAdapter? = null
|
||||||
|
|
||||||
|
private var dataList: MutableList<HeartCpBean.GiftLog>? = arrayListOf()
|
||||||
|
|
||||||
|
private var mHeartData: HeartCpBean? = null
|
||||||
|
override fun getLayoutId(): Int {
|
||||||
|
return R.layout.activity_heart_cp
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun bindPresenter(): HeartCpPresenter {
|
||||||
|
return HeartCpPresenter(this, this)
|
||||||
|
}
|
||||||
|
|
||||||
|
private var userId: Int = 0
|
||||||
|
|
||||||
|
private var leftUserId: Int = 0
|
||||||
|
private var rightUserId: Int = 0
|
||||||
|
|
||||||
|
override fun doDone() {
|
||||||
|
super.doDone()
|
||||||
|
userId = intent.getIntExtra("userId", 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
MvpPre.getHeartCpData(userId)
|
||||||
|
|
||||||
|
mBinding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
mBinding.ivHelp.setOnClickListener {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.ivHeadLeft.setOnClickListener {
|
||||||
|
if (mHeartData == null || leftUserId == 0)
|
||||||
|
return@setOnClickListener
|
||||||
|
|
||||||
|
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE)
|
||||||
|
.withString("userId", leftUserId.toString()).navigation();
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.ivHeadRight.setOnClickListener {
|
||||||
|
if (mHeartData == null || rightUserId == 0)
|
||||||
|
return@setOnClickListener
|
||||||
|
|
||||||
|
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE)
|
||||||
|
.withString("userId", rightUserId.toString()).navigation()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
adapter?.setOnItemClickListener { adapter, view, position ->
|
||||||
|
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE)
|
||||||
|
.withString("userId", mHeartData?.gift_log!![position].from_user_id.toString())
|
||||||
|
.navigation();
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
super.initView()
|
||||||
|
adapter = ItemCpHeartAdapter(this, userId, R.layout.item_heart_cp_layout, dataList)
|
||||||
|
mBinding.recycleView.adapter = adapter
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun getHeartCpData(heartCpBean: HeartCpBean?) {
|
||||||
|
if (heartCpBean == null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
mHeartData = heartCpBean
|
||||||
|
|
||||||
|
if (userId == heartCpBean.user_id1) {
|
||||||
|
ImageUtils.loadHead(heartCpBean.user_info1.avatar, mBinding.ivHeadLeft)
|
||||||
|
ImageUtils.loadHead(heartCpBean.user_info2.avatar, mBinding.ivHeadRight)
|
||||||
|
leftUserId = heartCpBean.user_id1
|
||||||
|
rightUserId = heartCpBean.user_id2
|
||||||
|
} else {
|
||||||
|
ImageUtils.loadHead(heartCpBean.user_info2.avatar, mBinding.ivHeadLeft)
|
||||||
|
ImageUtils.loadHead(heartCpBean.user_info1.avatar, mBinding.ivHeadRight)
|
||||||
|
leftUserId = heartCpBean.user_id2
|
||||||
|
rightUserId = heartCpBean.user_id1
|
||||||
|
}
|
||||||
|
|
||||||
|
mBinding.cpAnim.setSource(heartCpBean.pendant, 1)
|
||||||
|
|
||||||
|
val xd = heartCpBean.next_level_exp
|
||||||
|
if (xd >= 10000) {
|
||||||
|
mBinding.tvExperience.text = String.format("%.0fw", xd / 10000.0f)
|
||||||
|
} else {
|
||||||
|
mBinding.tvExperience.text = xd.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
adapter?.setNewData(heartCpBean.gift_log)
|
||||||
|
|
||||||
|
val day = TimeUtils.formatDurationDaysOnly(
|
||||||
|
heartCpBean.createtime * 1000 - System.currentTimeMillis()
|
||||||
|
)
|
||||||
|
|
||||||
|
mBinding.tvHeartTime.text = "我们在一起${day}啦"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
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.HeartCpBean
|
||||||
|
|
||||||
|
class HeartCpContact {
|
||||||
|
|
||||||
|
interface View : IView<Activity>{
|
||||||
|
fun getHeartCpData(heartCpBean: HeartCpBean?)
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IPre : IPresenter {
|
||||||
|
|
||||||
|
fun getHeartCpData(userId: Int)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,22 +19,20 @@ import androidx.core.content.ContextCompat;
|
|||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.blankj.utilcode.util.ActivityUtils;
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
|
||||||
import com.google.android.flexbox.FlexboxLayout;
|
import com.google.android.flexbox.FlexboxLayout;
|
||||||
import com.xscm.modulemain.Application;
|
|
||||||
import com.xscm.modulemain.R;
|
|
||||||
import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
|
|
||||||
import com.xscm.modulemain.activity.user.activity.ui.main.BosomFriendFragment;
|
|
||||||
import com.xscm.modulemain.databinding.FragmentUserHompageBinding;
|
|
||||||
import com.tencent.imsdk.v2.V2TIMConversation;
|
import com.tencent.imsdk.v2.V2TIMConversation;
|
||||||
import com.tencent.qcloud.tuicore.TUIConstants;
|
import com.tencent.qcloud.tuicore.TUIConstants;
|
||||||
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIC2CChatActivity;
|
||||||
|
import com.xscm.modulemain.Application;
|
||||||
|
import com.xscm.modulemain.R;
|
||||||
|
import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
|
||||||
|
import com.xscm.modulemain.activity.user.activity.HeartCpActivity;
|
||||||
|
import com.xscm.modulemain.activity.user.activity.ui.main.BosomFriendFragment;
|
||||||
import com.xscm.modulemain.activity.user.conacts.UserHomepageConacts;
|
import com.xscm.modulemain.activity.user.conacts.UserHomepageConacts;
|
||||||
import com.xscm.modulemain.activity.user.presenter.UserHomepagePresenter;
|
import com.xscm.modulemain.activity.user.presenter.UserHomepagePresenter;
|
||||||
|
import com.xscm.modulemain.databinding.FragmentUserHompageBinding;
|
||||||
import com.xscm.modulemain.manager.RoomManager;
|
import com.xscm.modulemain.manager.RoomManager;
|
||||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||||
import com.xscm.moduleutil.bean.CircleListBean;
|
import com.xscm.moduleutil.bean.CircleListBean;
|
||||||
@@ -44,7 +42,6 @@ import com.xscm.moduleutil.bean.RelationshipBean;
|
|||||||
import com.xscm.moduleutil.bean.UserInfo;
|
import com.xscm.moduleutil.bean.UserInfo;
|
||||||
import com.xscm.moduleutil.bean.UserTagBean;
|
import com.xscm.moduleutil.bean.UserTagBean;
|
||||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
@@ -236,6 +233,16 @@ public class UserHomepageFragment extends BaseMvpFragment<UserHomepagePresenter,
|
|||||||
if (userInfo.getCp_info() != null) {
|
if (userInfo.getCp_info() != null) {
|
||||||
mBinding.headerInfo.llCp.setVisibility(VISIBLE);
|
mBinding.headerInfo.llCp.setVisibility(VISIBLE);
|
||||||
mBinding.headerInfo.rlCpAnim.setVisibility(VISIBLE);
|
mBinding.headerInfo.rlCpAnim.setVisibility(VISIBLE);
|
||||||
|
|
||||||
|
mBinding.headerInfo.llCp.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(ActivityUtils.getTopActivity(), HeartCpActivity.class);
|
||||||
|
intent.putExtra("userId",userInfo.getUser_id());
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.headerInfo.userNav1);
|
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.headerInfo.userNav1);
|
||||||
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.headerInfo.userNav2);
|
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.headerInfo.userNav2);
|
||||||
mBinding.headerInfo.tvNickname1.setText(userInfo.getCp_info().user_info1.nickname);
|
mBinding.headerInfo.tvNickname1.setText(userInfo.getCp_info().user_info1.nickname);
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.xscm.modulemain.activity.user.presenter
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.xscm.modulemain.activity.user.conacts.HeartCpContact
|
||||||
|
import com.xscm.moduleutil.bean.HeartCpBean
|
||||||
|
import com.xscm.moduleutil.http.BaseObserver
|
||||||
|
import com.xscm.moduleutil.presenter.BasePresenter
|
||||||
|
import io.reactivex.disposables.Disposable
|
||||||
|
import java.lang.ref.WeakReference
|
||||||
|
|
||||||
|
class HeartCpPresenter(view: HeartCpContact.View, context: Context) :
|
||||||
|
BasePresenter<HeartCpContact.View>(view, context), HeartCpContact.IPre {
|
||||||
|
override fun getHeartCpData(userId: Int) {
|
||||||
|
api.getCpRoom(userId.toString(), object : BaseObserver<HeartCpBean>() {
|
||||||
|
|
||||||
|
override fun onSubscribe(d: Disposable) {
|
||||||
|
addDisposable(d)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onNext(t: HeartCpBean) {
|
||||||
|
if (MvpRef == null) {
|
||||||
|
MvpRef = WeakReference(view);
|
||||||
|
}
|
||||||
|
MvpRef.get()?.getHeartCpData(t)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.xscm.modulemain.adapter
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.text.SpannableStringBuilder
|
||||||
|
import android.text.SpannedString
|
||||||
|
import android.text.style.ForegroundColorSpan
|
||||||
|
import android.widget.TextView
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder
|
||||||
|
import com.xscm.modulemain.R
|
||||||
|
import com.xscm.moduleutil.bean.HeartCpBean
|
||||||
|
import com.xscm.moduleutil.utils.ImageUtils
|
||||||
|
import com.xscm.moduleutil.utils.TimeUtils
|
||||||
|
|
||||||
|
|
||||||
|
class ItemCpHeartAdapter(
|
||||||
|
val context: Context,
|
||||||
|
val userId: Int,
|
||||||
|
layoutId: Int,
|
||||||
|
data: MutableList<HeartCpBean.GiftLog>?
|
||||||
|
) :
|
||||||
|
BaseQuickAdapter<HeartCpBean.GiftLog, BaseViewHolder>(layoutId, data) {
|
||||||
|
override fun convert(helper: BaseViewHolder, item: HeartCpBean.GiftLog) {
|
||||||
|
|
||||||
|
ImageUtils.loadHead(item.from_user_info.avatar, helper.getView(R.id.iv_head))
|
||||||
|
helper.setText(R.id.tv_name, item.from_user_info.nickname)
|
||||||
|
helper.setText(R.id.tv_time, TimeUtils.getDateToStringNoZ(item.createtime))
|
||||||
|
|
||||||
|
val tv = helper.getView(R.id.tv_name) as TextView
|
||||||
|
|
||||||
|
val cid = if (userId == item.from_user_id) {
|
||||||
|
tv.setTextColor(context.getColor(R.color.ffff53cc))
|
||||||
|
R.color.ffff53cc
|
||||||
|
} else {
|
||||||
|
tv.setTextColor(context.getColor(R.color.ff4a89ff))
|
||||||
|
R.color.ff4a89ff
|
||||||
|
}
|
||||||
|
if (item.remark.contains(userId.toString())) {
|
||||||
|
val builder = getContentColor(item.from_user_info.nickname, item.remark, cid)
|
||||||
|
helper.setText(R.id.tv_content, builder)
|
||||||
|
} else {
|
||||||
|
helper.setText(R.id.tv_content, item.remark)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getContentColor(
|
||||||
|
userName: String,
|
||||||
|
content: String,
|
||||||
|
cid: Int
|
||||||
|
): SpannableStringBuilder {
|
||||||
|
val builder = SpannableStringBuilder()
|
||||||
|
val start = content.indexOf(userName)
|
||||||
|
val end = start + userName.length
|
||||||
|
builder.append(content)
|
||||||
|
val colorSpan = ForegroundColorSpan(context.getColor(cid))
|
||||||
|
builder.setSpan(colorSpan, start, end, SpannedString.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||||
|
return builder
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -24,11 +24,13 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.blankj.utilcode.util.ActivityUtils;
|
||||||
import com.blankj.utilcode.util.LogUtils;
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.xscm.modulemain.Application;
|
import com.xscm.modulemain.Application;
|
||||||
import com.xscm.modulemain.R;
|
import com.xscm.modulemain.R;
|
||||||
import com.xscm.modulemain.activity.room.contacts.RoomUserContacts;
|
import com.xscm.modulemain.activity.room.contacts.RoomUserContacts;
|
||||||
import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
|
import com.xscm.modulemain.activity.user.activity.GiftWallActivity;
|
||||||
|
import com.xscm.modulemain.activity.user.activity.HeartCpActivity;
|
||||||
import com.xscm.modulemain.databinding.FragmentRoomUserInfoBinding;
|
import com.xscm.modulemain.databinding.FragmentRoomUserInfoBinding;
|
||||||
import com.xscm.modulemain.activity.room.fragment.RelationshipFragment;
|
import com.xscm.modulemain.activity.room.fragment.RelationshipFragment;
|
||||||
import com.xscm.modulemain.activity.room.presenter.RoomUserPresenter;
|
import com.xscm.modulemain.activity.room.presenter.RoomUserPresenter;
|
||||||
@@ -233,8 +235,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
MvpPre.addBlackList(user_id);
|
MvpPre.addBlackList(user_id);
|
||||||
} else if (id == R.id.room_rl_gift) {
|
} else if (id == R.id.room_rl_gift) {
|
||||||
// ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id() + "").withInt("type", 1).navigation();
|
// ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", userInfo.getUser_id() + "").withInt("type", 1).navigation();
|
||||||
Intent intent=new Intent(getContext(), GiftWallActivity.class);
|
Intent intent = new Intent(getContext(), GiftWallActivity.class);
|
||||||
intent.putExtra("userId",userInfo.getUser_id());
|
intent.putExtra("userId", userInfo.getUser_id());
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} else if (id == R.id.room_jb) {
|
} else if (id == R.id.room_jb) {
|
||||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||||
@@ -477,7 +479,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
if (userInfo.getGuild().isEmpty()) {
|
if (userInfo.getGuild().isEmpty()) {
|
||||||
mBinding.tvGh.setText("所属公会:无");
|
mBinding.tvGh.setText("所属公会:无");
|
||||||
} else {
|
} else {
|
||||||
if (userInfo.getUser_id() != SpUtil.getUserId() && !userInfo.getGuild().equals(SpUtil.getUserInfo().getGuild())){
|
if (userInfo.getUser_id() != SpUtil.getUserId() && !userInfo.getGuild().equals(SpUtil.getUserInfo().getGuild())) {
|
||||||
mBinding.tvJoinGuild.setVisibility(VISIBLE);
|
mBinding.tvJoinGuild.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,6 +507,16 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
private void showCp() {
|
private void showCp() {
|
||||||
if (userInfo.getCp_info() != null) {
|
if (userInfo.getCp_info() != null) {
|
||||||
mBinding.ll.setVisibility(VISIBLE);
|
mBinding.ll.setVisibility(VISIBLE);
|
||||||
|
|
||||||
|
mBinding.ll.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(ActivityUtils.getTopActivity(), HeartCpActivity.class);
|
||||||
|
intent.putExtra("userId",userInfo.getUser_id());
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.userNav1);
|
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.userNav1);
|
||||||
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.userNav2);
|
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.userNav2);
|
||||||
mBinding.tvNickname1.setText(userInfo.getCp_info().user_info1.nickname);
|
mBinding.tvNickname1.setText(userInfo.getCp_info().user_info1.nickname);
|
||||||
@@ -514,22 +526,22 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
long xd = Long.parseLong(userInfo.getCp_info().exp);
|
long xd = Long.parseLong(userInfo.getCp_info().exp);
|
||||||
|
|
||||||
if (xd >= 10000) {
|
if (xd >= 10000) {
|
||||||
mBinding.tvCpNum.setText(String.format("%.2fw", xd / 10000.0f));
|
mBinding.tvCpNum.setText(String.format("%.1fw", xd / 10000.0f));
|
||||||
} else {
|
} else {
|
||||||
mBinding.tvCpNum.setText(String.valueOf(xd));
|
mBinding.tvCpNum.setText(String.valueOf(xd));
|
||||||
}
|
}
|
||||||
|
|
||||||
mBinding.cpAnim.setSource(userInfo.getCp_info().pendant, 1);
|
mBinding.cpAnim.setSource(userInfo.getCp_info().pendant, 1);
|
||||||
|
|
||||||
if (userInfo.getProfile().isEmpty()){
|
if (userInfo.getProfile().isEmpty()) {
|
||||||
mBinding.jianj.setText("");
|
mBinding.jianj.setText("");
|
||||||
mBinding.jianj.setVisibility(GONE);
|
mBinding.jianj.setVisibility(GONE);
|
||||||
}else {
|
} else {
|
||||||
mBinding.jianj.setText(userInfo.getProfile());
|
mBinding.jianj.setText(userInfo.getProfile());
|
||||||
mBinding.jianj.setVisibility(VISIBLE);
|
mBinding.jianj.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!userInfo.getIcon().isEmpty()){
|
if (!userInfo.getIcon().isEmpty()) {
|
||||||
mBinding.flexEntry.setVisibility(VISIBLE);
|
mBinding.flexEntry.setVisibility(VISIBLE);
|
||||||
for (String url : userInfo.getIcon()) {
|
for (String url : userInfo.getIcon()) {
|
||||||
if (url.contains("http")) {
|
if (url.contains("http")) {
|
||||||
@@ -538,21 +550,20 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||||
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
|
||||||
);
|
);
|
||||||
params.setMargins(0, 0,Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||||
imageView1.setLayoutParams(params);
|
imageView1.setLayoutParams(params);
|
||||||
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
|
||||||
|
|
||||||
// 使用 Glide 加载图片
|
// 使用 Glide 加载图片
|
||||||
ImageUtils.loadHeadCC(url, imageView1,params);
|
ImageUtils.loadHeadCC(url, imageView1, params);
|
||||||
mBinding.flexEntry.addView(imageView1);
|
mBinding.flexEntry.addView(imageView1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
mBinding.flexEntry.setVisibility(GONE);
|
mBinding.flexEntry.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.ivCp1);
|
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.ivCp1);
|
||||||
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.ivCp2);
|
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.ivCp2);
|
||||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT,
|
||||||
|
|||||||
238
MainModule/src/main/res/layout/activity_heart_cp.xml
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFBF8BFA">
|
||||||
|
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_44"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/icon_heart_top_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/icon_heart_head_bg"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/guideline_midd"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/guideline_midd" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
|
android:src="@mipmap/icon_heart_back"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/top" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_help"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
|
android:src="@mipmap/icon_heart_help"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/top" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.28" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_midd"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintGuide_percent="0.22" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_top_bg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/icon_heart_cp_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/top" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.5" />
|
||||||
|
|
||||||
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
|
android:id="@+id/iv_head_left"
|
||||||
|
android:layout_width="@dimen/dp_72"
|
||||||
|
android:layout_height="@dimen/dp_72"
|
||||||
|
android:layout_marginTop="@dimen/dp_28"
|
||||||
|
android:background="@drawable/shape_circle"
|
||||||
|
android:padding="@dimen/dp_2"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/guideline_top"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/guideline_top"
|
||||||
|
app:riv_oval="true" />
|
||||||
|
|
||||||
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
|
android:id="@+id/iv_head_right"
|
||||||
|
android:layout_width="@dimen/dp_72"
|
||||||
|
android:layout_height="@dimen/dp_72"
|
||||||
|
android:layout_marginTop="@dimen/dp_28"
|
||||||
|
android:background="@drawable/shape_circle"
|
||||||
|
android:padding="@dimen/dp_2"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/guideline_top"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/guideline"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/guideline_top"
|
||||||
|
app:riv_oval="true" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_head_midd"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/icon_user_midd_heart"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_head_left"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/iv_head_right"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/iv_head_left"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_head_left" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||||
|
android:id="@+id/cp_anim"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@mipmap/icon_cp_anim_bg"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/ctl_content"
|
||||||
|
app:layout_constraintDimensionRatio="0.94:2"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_head_right"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/top" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_heart_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:background="@drawable/shape_15"
|
||||||
|
android:backgroundTint="#590300C8"
|
||||||
|
android:paddingHorizontal="@dimen/dp_8"
|
||||||
|
android:paddingVertical="@dimen/dp_2"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_head_left"
|
||||||
|
tools:text="我们在一起5天啦" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/ctl_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_36"
|
||||||
|
android:layout_marginBottom="@dimen/dp_16"
|
||||||
|
android:background="@drawable/shape_15"
|
||||||
|
android:padding="@dimen/dp_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_heart_time">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_experience_bg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/icon_heart_ex_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Guideline
|
||||||
|
android:id="@+id/guideline_experience"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintGuide_percent="0.33" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_experience_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/guideline_experience"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_experience_bg">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_e"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="还需"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_experience"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="@dimen/dp_4"
|
||||||
|
android:textColor="#FFFFF022"
|
||||||
|
android:textSize="@dimen/sp_32"
|
||||||
|
tools:text="408" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="经验升级"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycle_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingHorizontal="@dimen/dp_16"
|
||||||
|
android:paddingBottom="@dimen/dp_100"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_experience_bg"
|
||||||
|
app:spanCount="1"
|
||||||
|
tools:listitem="@layout/item_heart_cp_layout" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
||||||
@@ -34,26 +34,32 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#FFF3F3F3">
|
||||||
|
|
||||||
<com.example.moduletablayout.CustomSlidingTabLayout
|
<com.example.moduletablayout.CustomSlidingTabLayout
|
||||||
android:id="@+id/sliding_tab_layout"
|
android:id="@+id/sliding_tab_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_30"
|
android:layout_height="@dimen/dp_30"
|
||||||
android:background="#f6f6f6"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
android:layout_marginLeft="@dimen/dp_15"
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:layout_marginRight="@dimen/dp_15"
|
||||||
app:tl_indicator_corner_radius="@dimen/dp_3"
|
app:tl_indicator_corner_radius="@dimen/dp_3"
|
||||||
app:tl_indicator_drawable="@drawable/index_bg_indicator"
|
app:tl_indicator_drawable="@drawable/index_bg_indicator"
|
||||||
app:tl_indicator_height="@dimen/dp_6"
|
app:tl_indicator_height="@dimen/dp_6"
|
||||||
app:tl_indicator_margin_bottom="@dimen/dp_3"
|
app:tl_indicator_margin_bottom="@dimen/dp_3"
|
||||||
app:tl_showCateIndicator="false"
|
|
||||||
app:tl_indicator_width="@dimen/dp_30"
|
app:tl_indicator_width="@dimen/dp_30"
|
||||||
|
app:tl_showCateIndicator="false"
|
||||||
app:tl_tab_width="@dimen/dp_64"
|
app:tl_tab_width="@dimen/dp_64"
|
||||||
app:tl_textBold="SELECT"
|
app:tl_textBold="SELECT"
|
||||||
app:tl_textSelectColor="@color/color_2B2823"
|
app:tl_textSelectColor="@color/color_2B2823"
|
||||||
app:tl_textSelectedSize="@dimen/sp_16"
|
app:tl_textSelectedSize="@dimen/sp_16"
|
||||||
app:tl_textUnselectColor="@color/color_FF999999"
|
app:tl_textUnselectColor="@color/color_FF999999"
|
||||||
app:tl_textsize="@dimen/sp_12" />
|
app:tl_textsize="@dimen/sp_12" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
@@ -61,6 +67,7 @@
|
|||||||
android:id="@+id/view_pager"
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFF3F3F3"
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</layout>
|
</layout>
|
||||||
67
MainModule/src/main/res/layout/item_heart_cp_layout.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"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginVertical="@dimen/dp_16">
|
||||||
|
|
||||||
|
|
||||||
|
<com.xscm.moduleutil.widget.CircularImage
|
||||||
|
android:id="@+id/iv_head"
|
||||||
|
android:layout_width="@dimen/dp_48"
|
||||||
|
android:layout_height="@dimen/dp_48"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:textColor="#FFFF53CC"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/iv_head"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/iv_head"
|
||||||
|
tools:text="时尚的金针菇" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
|
android:textColor="#FF999999"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||||
|
tools:text="2021-05-05 09" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:gravity="start"
|
||||||
|
android:singleLine="false"
|
||||||
|
android:textColor="#ff333333"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_time"
|
||||||
|
tools:text="送给 嘀嗒哥 一个xxx礼物,获得80经验值,总经验增加至367总经验增加至367" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:src="@mipmap/icon_heart_item_line"
|
||||||
|
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_content" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -7,17 +7,18 @@
|
|||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/ctl_top"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_60"
|
android:layout_marginTop="@dimen/dp_60"
|
||||||
android:background="@drawable/bg_r16_fff"
|
android:background="@drawable/bg_r16_fff"
|
||||||
|
android:elevation="@dimen/dp_1"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingHorizontal="@dimen/dp_15"
|
android:paddingHorizontal="@dimen/dp_15"
|
||||||
@@ -145,65 +146,66 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/ctl_guild"
|
android:id="@+id/ctl_guild"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/gl_start"
|
android:id="@+id/gl_start"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintGuide_percent="0.06"
|
app:layout_constraintGuide_percent="0.06" />
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/gl_end"
|
android:id="@+id/gl_end"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintGuide_percent="0.72"
|
app:layout_constraintGuide_percent="0.72" />
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
<ImageView
|
<ImageView
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:src="@mipmap/icon_guild_bg"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/icon_guild_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_g_h"
|
android:id="@+id/tv_g_h"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
android:maxLength="6"
|
|
||||||
android:lines="1"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:lines="1"
|
||||||
app:layout_constraintStart_toStartOf="@+id/gl_start"
|
android:maxLength="6"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/gl_end"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_10"
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/gl_end"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/gl_start"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="所属公会所属公会所属" />
|
tools:text="所属公会所属公会所属" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/view"
|
android:id="@+id/view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
android:src="@mipmap/icon_guild_bg"
|
|
||||||
android:paddingStart="@dimen/dp_11"
|
android:paddingStart="@dimen/dp_11"
|
||||||
android:paddingTop="@dimen/dp_4"
|
android:paddingTop="@dimen/dp_4"
|
||||||
android:paddingEnd="@dimen/dp_10"
|
android:paddingEnd="@dimen/dp_10"
|
||||||
android:visibility="invisible"
|
android:src="@mipmap/icon_guild_bg"
|
||||||
tools:visibility="gone"
|
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_10"
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:visibility="invisible"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:visibility="gone" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_jj"
|
android:id="@+id/tv_jj"
|
||||||
@@ -298,15 +300,26 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/ctl_top"
|
||||||
|
android:layout_marginTop="-20dp"
|
||||||
|
android:background="#FFF3F3F3"
|
||||||
|
android:orientation="vertical">
|
||||||
|
<View
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_20"/>
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/ll_cp"
|
android:id="@+id/ll_cp"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="@dimen/dp_16"
|
android:layout_marginHorizontal="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
android:background="@mipmap/icon_dialog_u_cp_bg"
|
android:background="@mipmap/icon_dialog_u_cp_bg"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/view"
|
app:layout_constraintBottom_toTopOf="@+id/view"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_name"
|
app:layout_constraintStart_toStartOf="@+id/tv_name"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout"
|
app:layout_constraintTop_toBottomOf="@+id/custom_tab_layout"
|
||||||
@@ -460,10 +473,12 @@
|
|||||||
android:id="@+id/im_gift_w"
|
android:id="@+id/im_gift_w"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/image_gift_w"
|
|
||||||
android:scaleType="fitXY"
|
|
||||||
android:layout_marginHorizontal="@dimen/dp_16"
|
android:layout_marginHorizontal="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_8" />
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/image_gift_w" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</layout>
|
</layout>
|
||||||
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heart_back.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heart_cp_bg.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heart_ex_bg.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heart_head_bg.png
Normal file
|
After Width: | Height: | Size: 272 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heart_help.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heart_item_line.png
Normal file
|
After Width: | Height: | Size: 709 B |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_heart_top_bg.png
Normal file
|
After Width: | Height: | Size: 408 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_user_midd_heart.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_heart_back.png
Normal file
|
After Width: | Height: | Size: 960 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_heart_cp_bg.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_heart_ex_bg.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_heart_head_bg.png
Normal file
|
After Width: | Height: | Size: 455 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_heart_help.png
Normal file
|
After Width: | Height: | Size: 975 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_heart_item_line.png
Normal file
|
After Width: | Height: | Size: 289 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_heart_top_bg.png
Normal file
|
After Width: | Height: | Size: 712 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_user_midd_heart.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_heart_back.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_heart_cp_bg.png
Normal file
|
After Width: | Height: | Size: 383 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_heart_ex_bg.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_heart_head_bg.png
Normal file
|
After Width: | Height: | Size: 971 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_heart_help.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_heart_item_line.png
Normal file
|
After Width: | Height: | Size: 450 B |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_heart_top_bg.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_user_midd_heart.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
@@ -7,4 +7,9 @@
|
|||||||
<color name="teal_700">#FF018786</color>
|
<color name="teal_700">#FF018786</color>
|
||||||
<color name="black">#FF000000</color>
|
<color name="black">#FF000000</color>
|
||||||
<color name="white">#FFFFFFFF</color>
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<color name="ffff53cc">#FFFF53CC</color>
|
||||||
|
<color name="ff4a89ff">#FF4A89FF</color>
|
||||||
</resources>
|
</resources>
|
||||||