1:完成才艺展示功能
This commit is contained in:
@@ -870,4 +870,6 @@ public interface ApiServer {
|
|||||||
@POST(Constants.POST_FAMILY_EARNINGS)
|
@POST(Constants.POST_FAMILY_EARNINGS)
|
||||||
Call<BaseModel<List<FamilyEarnings>>> familyEarnings( @Field("user_id") String user_id,@Field("page") int page,@Field("start_time") String start_time,@Field("end_time") String end_time);
|
Call<BaseModel<List<FamilyEarnings>>> familyEarnings( @Field("user_id") String user_id,@Field("page") int page,@Field("start_time") String start_time,@Field("end_time") String end_time);
|
||||||
|
|
||||||
|
@GET(Constants.GET_SKILL_LIST)
|
||||||
|
Call<BaseModel<List<String>>> skillList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -520,8 +520,8 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postInvite(String apply_id,String type,BaseObserver<String> observer) {
|
public void postInvite(String apply_id, String type, BaseObserver<String> observer) {
|
||||||
sApiServer.postInvite(apply_id,type).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.postInvite(apply_id, type).enqueue(new Callback<BaseModel<String>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
@@ -543,7 +543,7 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
LogUtils.e("修改公会公告失败",t.fillInStackTrace());
|
LogUtils.e("修改公会公告失败", t.fillInStackTrace());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -3099,7 +3099,7 @@ public class RetrofitClient {
|
|||||||
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()!=null) {
|
if (data.getData() != null) {
|
||||||
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());
|
||||||
@@ -3107,7 +3107,7 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
observer.onNext(data.getData());//2025年11月25日09:10:54,服务端修改,应该是都不能等于null
|
observer.onNext(data.getData());//2025年11月25日09:10:54,服务端修改,应该是都不能等于null
|
||||||
}else {
|
} else {
|
||||||
observer.onNext(new RoomGiftData());//这里添加这个,是预防报错
|
observer.onNext(new RoomGiftData());//这里添加这个,是预防报错
|
||||||
}
|
}
|
||||||
} else if (data.getCode() == 0) {
|
} else if (data.getCode() == 0) {
|
||||||
@@ -4559,7 +4559,7 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void getCpRoom(String userId,BaseObserver<HeartCpBean> observer) {
|
public void getCpRoom(String userId, BaseObserver<HeartCpBean> observer) {
|
||||||
sApiServer.getCpRoom(userId).enqueue(new Callback<BaseModel<HeartCpBean>>() {
|
sApiServer.getCpRoom(userId).enqueue(new Callback<BaseModel<HeartCpBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<HeartCpBean>> call, Response<BaseModel<HeartCpBean>> response) {
|
public void onResponse(Call<BaseModel<HeartCpBean>> call, Response<BaseModel<HeartCpBean>> response) {
|
||||||
@@ -4581,8 +4581,8 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void myFamily(int type,BaseObserver<MyFamilyBean> observer) {
|
public void myFamily(int type, BaseObserver<MyFamilyBean> observer) {
|
||||||
if (type==1) {
|
if (type == 1) {
|
||||||
sApiServer.myFamily().enqueue(new Callback<BaseModel<MyFamilyBean>>() {
|
sApiServer.myFamily().enqueue(new Callback<BaseModel<MyFamilyBean>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -4590,7 +4590,7 @@ public class RetrofitClient {
|
|||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<MyFamilyBean> baseModel = response.body();
|
BaseModel<MyFamilyBean> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData()!=null ? baseModel.getData() : new MyFamilyBean());
|
observer.onNext(baseModel.getData() != null ? baseModel.getData() : new MyFamilyBean());
|
||||||
} else if (baseModel.getCode() == 301) {
|
} else if (baseModel.getCode() == 301) {
|
||||||
try {
|
try {
|
||||||
ToastUtils.showShort(baseModel.getMsg());
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
@@ -4608,7 +4608,7 @@ public class RetrofitClient {
|
|||||||
LogUtils.e("myFamily", t.fillInStackTrace());
|
LogUtils.e("myFamily", t.fillInStackTrace());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else {
|
} else {
|
||||||
sApiServer.myJoinFamily().enqueue(new Callback<BaseModel<MyFamilyBean>>() {
|
sApiServer.myJoinFamily().enqueue(new Callback<BaseModel<MyFamilyBean>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -4616,7 +4616,7 @@ public class RetrofitClient {
|
|||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<MyFamilyBean> baseModel = response.body();
|
BaseModel<MyFamilyBean> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData()!=null ? baseModel.getData() : new MyFamilyBean());
|
observer.onNext(baseModel.getData() != null ? baseModel.getData() : new MyFamilyBean());
|
||||||
} else if (baseModel.getCode() == 301) {
|
} else if (baseModel.getCode() == 301) {
|
||||||
try {
|
try {
|
||||||
ToastUtils.showShort(baseModel.getMsg());
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
@@ -4638,14 +4638,14 @@ public class RetrofitClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void familyEarnings(String user_id,int page,String start_time,String end_time,BaseObserver<List<FamilyEarnings>> observer) {
|
public void familyEarnings(String user_id, int page, String start_time, String end_time, BaseObserver<List<FamilyEarnings>> observer) {
|
||||||
sApiServer.familyEarnings(user_id,page,start_time,end_time).enqueue(new Callback<BaseModel<List<FamilyEarnings>>>() {
|
sApiServer.familyEarnings(user_id, page, start_time, end_time).enqueue(new Callback<BaseModel<List<FamilyEarnings>>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<List<FamilyEarnings>>> call, Response<BaseModel<List<FamilyEarnings>>> response) {
|
public void onResponse(Call<BaseModel<List<FamilyEarnings>>> call, Response<BaseModel<List<FamilyEarnings>>> response) {
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
BaseModel<List<FamilyEarnings>> baseModel = response.body();
|
BaseModel<List<FamilyEarnings>> baseModel = response.body();
|
||||||
if (baseModel.getCode() == 1) {
|
if (baseModel.getCode() == 1) {
|
||||||
observer.onNext(baseModel.getData()!=null?baseModel.getData():new ArrayList<FamilyEarnings>());
|
observer.onNext(baseModel.getData() != null ? baseModel.getData() : new ArrayList<FamilyEarnings>());
|
||||||
} else if (baseModel.getCode() == 301) {
|
} else if (baseModel.getCode() == 301) {
|
||||||
try {
|
try {
|
||||||
ToastUtils.showShort(baseModel.getMsg());
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
@@ -4666,5 +4666,32 @@ public class RetrofitClient {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void skillList(BaseObserver<List<String>> observer) {
|
||||||
|
sApiServer.skillList().enqueue(new Callback<BaseModel<List<String>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<List<String>>> call, Response<BaseModel<List<String>>> response) {
|
||||||
|
if (response.code() == 200) {
|
||||||
|
BaseModel<List<String>> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1)
|
||||||
|
observer.onNext(baseModel.getData() != null ? baseModel.getData() : new ArrayList<String>());
|
||||||
|
else if (baseModel.getCode() == 301) {
|
||||||
|
try {
|
||||||
|
ToastUtils.showShort(baseModel.getMsg());
|
||||||
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ToastUtils.showLong(baseModel.getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<List<String>>> call, Throwable t) {
|
||||||
|
LogUtils.e("skillList", t.fillInStackTrace());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,6 +430,7 @@ public class Constants {
|
|||||||
public static final String POST_FRIEND_LIST = "/api/User/get_friend_list";//挚友列表
|
public static final String POST_FRIEND_LIST = "/api/User/get_friend_list";//挚友列表
|
||||||
public static final String POST_FRIEND_LIST_MORE = "/api/User/get_friend_list_more";//挚友列表查看更多
|
public static final String POST_FRIEND_LIST_MORE = "/api/User/get_friend_list_more";//挚友列表查看更多
|
||||||
public static final String POST_SEND_LOG = "api/Report/android_log_report";//上传log信息
|
public static final String POST_SEND_LOG = "api/Report/android_log_report";//上传log信息
|
||||||
|
public static final String GET_SKILL_LIST = "/api/Sign/skill_list";//才艺列表
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3116,6 +3116,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun dialogMessage(event: RoomInputEvent){
|
||||||
|
if (publicScreenFragment != null) {
|
||||||
|
publicScreenFragment!!.fasong(event)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun countDownTimer() {
|
private fun countDownTimer() {
|
||||||
releaseCountDownTimer()
|
releaseCountDownTimer()
|
||||||
mCountDownTimer = object : CountDownTimer(3 * 1000L, 1000L) {
|
mCountDownTimer = object : CountDownTimer(3 * 1000L, 1000L) {
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.xscm.modulemain.adapter
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.TextView
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.xscm.modulemain.R
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称:羽声语音
|
||||||
|
* 时间:2025/11/28 10:39
|
||||||
|
* 用途:房间人才列表适配器,支持单选功能
|
||||||
|
*/
|
||||||
|
class RoomTalentAdapter(
|
||||||
|
private val dataList: List<String>,
|
||||||
|
private val onItemSelectedListener: (String, Int) -> Unit
|
||||||
|
) : RecyclerView.Adapter<RoomTalentAdapter.ViewHolder>() {
|
||||||
|
|
||||||
|
private var selectedPosition = -1 // 默认没有选中项
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
|
val view = LayoutInflater.from(parent.context)
|
||||||
|
.inflate(R.layout.item_room_talent, parent, false)
|
||||||
|
return ViewHolder(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
|
val item = dataList[position]
|
||||||
|
holder.bind(item, position)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int = dataList.size
|
||||||
|
|
||||||
|
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
|
private val textView: TextView = itemView.findViewById(R.id.tv_talent)
|
||||||
|
|
||||||
|
fun bind(item: String, position: Int) {
|
||||||
|
textView.text = item
|
||||||
|
|
||||||
|
// 设置选中状态
|
||||||
|
if (position == selectedPosition) {
|
||||||
|
textView.setBackgroundResource(R.drawable.bg_item_selected) // 选中背景
|
||||||
|
textView.setTextColor(android.graphics.Color.parseColor("#3ABC6D"))
|
||||||
|
} else {
|
||||||
|
textView.setBackgroundResource(R.drawable.bg_item_normal) // 默认背景
|
||||||
|
textView.setTextColor(android.graphics.Color.parseColor("#333333"))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置点击事件
|
||||||
|
itemView.setOnClickListener {
|
||||||
|
// 如果点击的是已选中的项,不做处理
|
||||||
|
if (position == selectedPosition) return@setOnClickListener
|
||||||
|
|
||||||
|
// 更新选中位置
|
||||||
|
val previousPosition = selectedPosition
|
||||||
|
selectedPosition = position
|
||||||
|
|
||||||
|
// 通知之前选中的项更新背景
|
||||||
|
if (previousPosition != -1) {
|
||||||
|
notifyItemChanged(previousPosition)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通知当前选中的项更新背景
|
||||||
|
notifyItemChanged(position)
|
||||||
|
|
||||||
|
// 回调选中的值和位置
|
||||||
|
onItemSelectedListener(item, position)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置选中的位置
|
||||||
|
*/
|
||||||
|
fun setSelectedPosition(position: Int) {
|
||||||
|
if (position in 0 until itemCount && position != selectedPosition) {
|
||||||
|
val previousPosition = selectedPosition
|
||||||
|
selectedPosition = position
|
||||||
|
|
||||||
|
if (previousPosition != -1) {
|
||||||
|
notifyItemChanged(previousPosition)
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyItemChanged(position)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前选中的位置
|
||||||
|
*/
|
||||||
|
fun getSelectedPosition(): Int = selectedPosition
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前选中的值
|
||||||
|
*/
|
||||||
|
fun getSelectedValue(): String? {
|
||||||
|
return if (selectedPosition in 0 until itemCount) {
|
||||||
|
dataList[selectedPosition]
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
package com.xscm.modulemain.dialog
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.blankj.utilcode.util.ActivityUtils
|
||||||
|
import com.blankj.utilcode.util.GsonUtils
|
||||||
|
import com.blankj.utilcode.util.LogUtils
|
||||||
|
import com.blankj.utilcode.util.ScreenUtils
|
||||||
|
import com.hjq.toast.ToastUtils
|
||||||
|
import com.xscm.modulemain.R
|
||||||
|
import com.xscm.modulemain.activity.room.activity.RoomActivity
|
||||||
|
import com.xscm.modulemain.adapter.RoomTalentAdapter
|
||||||
|
import com.xscm.modulemain.databinding.DialogRoomTalentBinding
|
||||||
|
import com.xscm.moduleutil.bean.RoomInputEvent
|
||||||
|
import com.xscm.moduleutil.bean.RoomMessageEvent
|
||||||
|
import com.xscm.moduleutil.bean.RoomMessageEvent.T
|
||||||
|
import com.xscm.moduleutil.http.BaseObserver
|
||||||
|
import com.xscm.moduleutil.http.RetrofitClient
|
||||||
|
import com.xscm.moduleutil.listener.MessageListenerSingleton
|
||||||
|
import com.xscm.moduleutil.utils.SpUtil
|
||||||
|
import com.xscm.moduleutil.widget.dialog.BaseDialog
|
||||||
|
import com.xscm.moduleutil.widget.floatingView.IFloatingView
|
||||||
|
import io.reactivex.disposables.Disposable
|
||||||
|
import java.nio.charset.StandardCharsets
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称:羽声语音
|
||||||
|
* 时间:2025/11/28 9:25
|
||||||
|
* 用途:签约房中的展示才艺
|
||||||
|
*/
|
||||||
|
class RoomTalentDialog(context: Context, val roomId: String) :
|
||||||
|
BaseDialog<DialogRoomTalentBinding>(context, com.xscm.moduleutil.R.style.BaseDialogStyleH) {
|
||||||
|
|
||||||
|
var adapter: RoomTalentAdapter? = null
|
||||||
|
|
||||||
|
override fun getLayoutId(): Int {
|
||||||
|
return R.layout.dialog_room_talent
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
setupWindow()
|
||||||
|
mBinding.tvQx.setOnClickListener {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
mBinding.tvQd.setOnClickListener {
|
||||||
|
if (adapter?.getSelectedValue()?.isEmpty() == true) {
|
||||||
|
ToastUtils.show("请选择才艺")
|
||||||
|
} else {
|
||||||
|
var messageEvent =
|
||||||
|
RoomInputEvent(SpUtil.getUserInfo().nickname + "选择了" + adapter?.getSelectedValue() + "才艺")
|
||||||
|
(ActivityUtils.getTopActivity() as? RoomActivity)?.let { roomActivity ->
|
||||||
|
roomActivity.dialogMessage(messageEvent)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
RetrofitClient.getInstance().skillList(object : BaseObserver<MutableList<String>>() {
|
||||||
|
override fun onSubscribe(d: Disposable) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onNext(t: MutableList<String>) {
|
||||||
|
if (t.isNotEmpty()) {
|
||||||
|
|
||||||
|
t.addAll(t)
|
||||||
|
t.addAll(t)
|
||||||
|
t.addAll(t)
|
||||||
|
adapter = RoomTalentAdapter(t) { selectedValue, position ->
|
||||||
|
// 处理选中事件
|
||||||
|
LogUtils.e("选中了: $selectedValue, 位置: $position")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置GridLayoutManager,每行显示4个item
|
||||||
|
val layoutManager =
|
||||||
|
androidx.recyclerview.widget.GridLayoutManager(context, 4)
|
||||||
|
mBinding.recycleView.layoutManager = layoutManager
|
||||||
|
mBinding.recycleView.adapter = adapter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupWindow() {
|
||||||
|
val window = window ?: return
|
||||||
|
window.setGravity(Gravity.BOTTOM)
|
||||||
|
window.setLayout(
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
(ScreenUtils.getAppScreenHeight() * 348f / 812).toInt()
|
||||||
|
)
|
||||||
|
window.setBackgroundDrawableResource(android.R.color.transparent)
|
||||||
|
|
||||||
|
val params = window.attributes
|
||||||
|
params.windowAnimations = com.xscm.moduleutil.R.style.BaseDialogStyleH
|
||||||
|
window.attributes = params
|
||||||
|
}
|
||||||
|
}
|
||||||
9
MainModule/src/main/res/drawable/bg_item_normal.xml
Normal file
9
MainModule/src/main/res/drawable/bg_item_normal.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@android:color/white" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="#E0E0E0" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
18
MainModule/src/main/res/drawable/bg_item_selected.xml
Normal file
18
MainModule/src/main/res/drawable/bg_item_selected.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<!-- <solid android:color="#E3F2FD" />-->
|
||||||
|
|
||||||
|
<gradient
|
||||||
|
android:angle="90"
|
||||||
|
android:endColor="#FBFBFF"
|
||||||
|
android:startColor="#EBFFED"
|
||||||
|
android:type="linear"
|
||||||
|
android:useLevel="true" />
|
||||||
|
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="#56E449" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
82
MainModule/src/main/res/layout/dialog_room_talent.xml
Normal file
82
MainModule/src/main/res/layout/dialog_room_talent.xml
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/bg_r14_1b1926"
|
||||||
|
android:backgroundTint="@color/white"
|
||||||
|
android:paddingHorizontal="@dimen/dp_16">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_13"
|
||||||
|
android:paddingVertical="@dimen/dp_5"
|
||||||
|
android:text="展示才艺"
|
||||||
|
android:textColor="@color/color_FF333333"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycle_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:spanCount="4"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/ll_but"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||||
|
tools:itemCount="8"
|
||||||
|
tools:listitem="@layout/item_room_talent"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_but"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_42"
|
||||||
|
android:layout_marginBottom="@dimen/dp_14"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="@dimen/dp_18"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_qx"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/bg_r53_0dffb9"
|
||||||
|
android:backgroundTint="@color/color_FF333333"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="取消"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_qd"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/sp_16"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:background="@drawable/bg_r53_0dffb9"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="确定"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
||||||
21
MainModule/src/main/res/layout/item_room_talent.xml
Normal file
21
MainModule/src/main/res/layout/item_room_talent.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?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"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_6"
|
||||||
|
android:layout_marginVertical="@dimen/dp_6">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_talent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="talent"
|
||||||
|
android:padding="@dimen/dp_10"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:background="@drawable/bg_item_normal"/>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user