1:添加炼仙传说功能
2:修改混淆,
@@ -44,7 +44,6 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
// exclude 'lib/arm64-v8a/libagora-fdkaac.so'
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.xscm.moduleutil.base
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.voice.lib_base.ext.inflateBindingWithGeneric
|
||||
import com.xscm.moduleutil.R
|
||||
|
||||
|
||||
open class BaseBottomFragmentDialog<B : ViewBinding?>(private val resourceID: Int) :
|
||||
DialogFragment() {
|
||||
var mDatabind: B? = null
|
||||
val mBinding: B get() = mDatabind!!
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val dialog = Dialog(requireActivity(), R.style.myChooseDialog)
|
||||
mDatabind = DataBindingUtil.inflate(LayoutInflater.from(requireContext()), resourceID, null, false) as B
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||
dialog.setContentView(mBinding!!.root)
|
||||
val window = dialog.window
|
||||
val params = window!!.attributes
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
params.gravity = Gravity.BOTTOM
|
||||
window.attributes = params
|
||||
dialog.setCanceledOnTouchOutside(true)
|
||||
return dialog
|
||||
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
mDatabind = inflateBindingWithGeneric(inflater, container, false)
|
||||
// return if (mBinding != null) mBinding!!.root else mDatabind?.root
|
||||
return mBinding?.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
WindowCompat.setDecorFitsSystemWindows(requireDialog().window!!, false)
|
||||
requireDialog().setOnShowListener { dialog: DialogInterface? ->
|
||||
(view.parent as ViewGroup).setBackgroundColor(
|
||||
Color.TRANSPARENT
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
mDatabind = null
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun setBundleArgs(bundleArgs: Bundle?): BaseBottomFragmentDialog<B> {
|
||||
arguments = bundleArgs
|
||||
return this
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.voice.lib_base.base.dialog
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.databinding.ViewDataBinding
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.voice.lib_base.ext.inflateBindingWithGeneric
|
||||
import com.xscm.moduleutil.R
|
||||
|
||||
open class BaseFragmentDialog<B : ViewBinding?>(private val resourceID: Int) : DialogFragment() {
|
||||
var mDatabind: B? = null
|
||||
val mBinding: B get() = mDatabind!!
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val dialog = Dialog(requireActivity(), R.style.myChooseDialog)
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||
mDatabind = DataBindingUtil.inflate<ViewDataBinding>(LayoutInflater.from(requireContext()), resourceID, null, false) as B
|
||||
dialog.setContentView(mDatabind!!.root)
|
||||
val window = dialog.window
|
||||
val params = window!!.attributes
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
window.attributes = params
|
||||
dialog.setCanceledOnTouchOutside(true)
|
||||
return dialog
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
mDatabind = inflateBindingWithGeneric(inflater, container, false)
|
||||
return if (mBinding != null) mBinding!!.root else null
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
WindowCompat.setDecorFitsSystemWindows(requireDialog().window!!, false)
|
||||
requireDialog().setOnShowListener { dialog: DialogInterface? ->
|
||||
(view.parent as ViewGroup).setBackgroundColor(
|
||||
Color.TRANSPARENT
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
mDatabind = null
|
||||
}
|
||||
|
||||
|
||||
fun setBundleArgs(bundleArgs: Bundle?): BaseFragmentDialog<B> {
|
||||
arguments = bundleArgs
|
||||
return this
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.xscm.moduleutil.base
|
||||
|
||||
import androidx.lifecycle.*
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import com.xscm.moduleutil.widget.room.PassRoomException
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.launch
|
||||
import okhttp3.MultipartBody
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
open class BaseViewModel : ViewModel(), LifecycleObserver {
|
||||
private var clickTime: Long = 0
|
||||
var baseRepository = RetrofitClient.getInstance()
|
||||
|
||||
private val passRoom by lazy { MutableLiveData<Exception>() }
|
||||
|
||||
private val error by lazy { MutableLiveData<Exception>() }
|
||||
|
||||
private val finally by lazy { MutableLiveData<Int>() }
|
||||
|
||||
|
||||
|
||||
|
||||
//进入房间
|
||||
|
||||
var imgListData: MutableLiveData<List<String>> = MutableLiveData()
|
||||
var addImgData = MutableLiveData<Any>()
|
||||
|
||||
|
||||
//运行在UI线程的协程
|
||||
fun launchUI(block: suspend CoroutineScope.() -> Unit) = viewModelScope.launch {
|
||||
try {
|
||||
block()
|
||||
} catch (e: Exception) {
|
||||
if (e is PassRoomException) {
|
||||
passRoom.value = e
|
||||
} else {
|
||||
error.value = e
|
||||
// throw e
|
||||
}
|
||||
|
||||
} finally {
|
||||
finally.value = 200
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求失败,出现异常
|
||||
*/
|
||||
fun getError(): LiveData<Exception> {
|
||||
return error
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求完成,在此处做一些关闭操作
|
||||
*/
|
||||
fun getFinally(): LiveData<Int> {
|
||||
return finally
|
||||
}
|
||||
|
||||
}
|
||||
@@ -137,13 +137,13 @@ public class CommonAppContext extends MultiDexApplication implements Application
|
||||
@Getter
|
||||
public UnreadCountEvent unreadCountEvent;
|
||||
|
||||
public static int selectRelease = 1;
|
||||
public static int selectRelease = -1;
|
||||
|
||||
public int is_open = 0;//主题的开关
|
||||
|
||||
public String appId = "com.qxcm.qxlive";
|
||||
public String appVersionCode = "87";
|
||||
public String appVersionName = "1.0.9.7";
|
||||
public String appVersionCode = "88";
|
||||
public String appVersionName = "1.0.9.8";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.xscm.moduleutil.base;
|
||||
|
||||
public class RealTimeMessages<T> {
|
||||
|
||||
public T data;
|
||||
|
||||
public int code;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.xscm.moduleutil.base
|
||||
|
||||
|
||||
data class SocketBean(
|
||||
val code: Int, val data: Any
|
||||
)
|
||||
@@ -66,6 +66,7 @@ public class RoomSettingBean implements MultiItemEntity {
|
||||
public static final int QXRoomSettingTypeRoomTimeRedSound = 35;//红包声音
|
||||
|
||||
public static final int QXRoomSettingTypeRoomBusinessTime = 37;//营业时间
|
||||
public static final int QXRoomSettingTypeRoomBusinessLegend = 38;//炼仙传说
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.xscm.moduleutil.bean.room.refining
|
||||
|
||||
|
||||
data class BoxJiangChiBean(
|
||||
var gid: String = "",
|
||||
var gift_name: String = "",
|
||||
var gift_price: String = "",
|
||||
var base_image: String = "",
|
||||
var play_image: String = ""
|
||||
)
|
||||
|
||||
|
||||
|
||||
data class MonsterLogBean(
|
||||
val add_time: Int,
|
||||
val id: Int,
|
||||
val is_evil_wind: Int,
|
||||
val is_join: Int,
|
||||
val win_type: Int,
|
||||
val win_type_data: List<WinTypeData>,
|
||||
val join_data: List<WinTypeData>,
|
||||
|
||||
val base_image: String,
|
||||
val gift_name: String,
|
||||
val gift_price: Int,
|
||||
val num: Int,
|
||||
val type_name: String,
|
||||
)
|
||||
|
||||
|
||||
data class WinTypeData(
|
||||
val type: Int, val type_name: String,
|
||||
val num: Int
|
||||
)
|
||||
|
||||
|
||||
data class MonsterUserLogBean(
|
||||
val add_time: Int,
|
||||
val base64_nick_name: String,
|
||||
val base_image: String,
|
||||
val gift_name: String,
|
||||
val gift_price: String,
|
||||
val head_pic: String,
|
||||
val id: Int,
|
||||
val mid: Int,
|
||||
val nick_name: String,
|
||||
val num: Int,
|
||||
val type_name: String,
|
||||
val uid: Int,
|
||||
val win_type: Int
|
||||
)
|
||||
|
||||
data class MonsterInfoBean(
|
||||
val integral: String,
|
||||
val is_finsh: Int,
|
||||
val multiple_list: List<Multiple>,
|
||||
val open_monster_price: String,
|
||||
val surplus_time: Int,
|
||||
val win_number: Int
|
||||
)
|
||||
|
||||
data class Multiple(
|
||||
val id: Int,
|
||||
val multiple: Double,
|
||||
val type_name: String,
|
||||
val num: Int,
|
||||
val type: Int
|
||||
)
|
||||
|
||||
data class MonsterResultBean(
|
||||
val head_pic: String,
|
||||
val id: String,
|
||||
val integral: String,
|
||||
val nick_name: String,
|
||||
val num: Int,
|
||||
val price: Int,
|
||||
val type: String,
|
||||
val type_name: String,
|
||||
val uid: Int
|
||||
)
|
||||
|
||||
data class MonsterEndBean(
|
||||
val game_name: String,
|
||||
val gift_name: String,
|
||||
val is_finsh: Int,
|
||||
val is_push_message: Int,
|
||||
val multiple_list: List<Multiple>,
|
||||
val num: Int,
|
||||
val surplus_time: Int,
|
||||
val total_gift_price: Int,
|
||||
val win_count: Int,
|
||||
val win_number: Int,
|
||||
val win_type_name: String
|
||||
)
|
||||
|
||||
data class OpenMonsterBean(
|
||||
val base_image: String, // 礼物图片
|
||||
val gid: Int, // 礼物id
|
||||
val gift_name: String, // 礼物名称
|
||||
val gift_price: String, // 礼物价格
|
||||
val is_win: Int,// 是否中奖 2未中奖 1中奖
|
||||
val num: Int, // 中奖数量
|
||||
val total_gift_price: Int, // 总价格
|
||||
val type_name: String, // 中奖类型
|
||||
val win_type: Int // 中奖类型
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,11 @@ import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
|
||||
import com.xscm.moduleutil.bean.room.*;
|
||||
import com.xscm.moduleutil.bean.room.refining.BoxJiangChiBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterInfoBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterLogBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterResultBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterUserLogBean;
|
||||
import com.xscm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
||||
import com.xscm.moduleutil.utils.cos.TempKeyBean;
|
||||
import com.xscm.moduleutil.widget.Constants;
|
||||
@@ -540,6 +545,25 @@ public interface ApiServer {
|
||||
@POST(Constants.SET_USER_DECORATE)
|
||||
Call<BaseModel<String>> setUserDecorate(@Field("udid") String udid);
|
||||
|
||||
@GET(Constants.GET_MONSTER_INFO_BOX)
|
||||
Call<BaseModel<MonsterInfoBean>> get_monster_info_box();
|
||||
|
||||
@GET(Constants.GET_OPEN_BEAT_MONSTER)
|
||||
Call<BaseModel<MonsterResultBean>> open_beat_monster(@Query("rid")String rid,@Query("type") String type,@Query("num") String num);
|
||||
|
||||
@GET(Constants.GET_MONSTER_BOX_LIST)
|
||||
Call<BaseModel<List<BoxJiangChiBean>>> get_monster_box_list();
|
||||
|
||||
@GET(Constants.GET_USER_MONSTER_LOG)
|
||||
Call<BaseModel<List<MonsterUserLogBean>>> get_user_monster_log(@Query("page")String page);
|
||||
|
||||
@GET(Constants.GET_MONSTER_LOG)
|
||||
Call<BaseModel<List<MonsterLogBean>>> get_monster_log(@Query("page")String page,@Query("page_limit")String page_limit);
|
||||
|
||||
@GET(Constants.GET_MONSTER_NOTE)
|
||||
Call<BaseModel<String>> get_monster_note();
|
||||
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_CANCEL_USER_DECORATE)
|
||||
Call<BaseModel<String>> cancelUserDecorate(@Field("type") String type);
|
||||
|
||||
@@ -22,6 +22,11 @@ import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean;
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean;
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
|
||||
import com.xscm.moduleutil.bean.room.*;
|
||||
import com.xscm.moduleutil.bean.room.refining.BoxJiangChiBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterInfoBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterLogBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterResultBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterUserLogBean;
|
||||
import com.xscm.moduleutil.bean.zhuangb.ZhuangBanShangChengBean;
|
||||
import com.xscm.moduleutil.listener.CPListener;
|
||||
import com.xscm.moduleutil.listener.JoinRoomErrorListener;
|
||||
@@ -2326,6 +2331,7 @@ public class RetrofitClient {
|
||||
|
||||
/**
|
||||
* 礼物标签表
|
||||
*
|
||||
* @param type 1:房间获取标签 2:打赏,不要热度卡 3:
|
||||
* @param observer
|
||||
*/
|
||||
@@ -2357,6 +2363,7 @@ public class RetrofitClient {
|
||||
|
||||
/**
|
||||
* 获取礼物列表
|
||||
*
|
||||
* @param type 0:只获取热门礼物和普通礼物 99:拍卖卡关系选择礼物 100:歌单礼物
|
||||
* @param roomId
|
||||
* @param observer
|
||||
@@ -4715,10 +4722,10 @@ public class RetrofitClient {
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
setCode301(baseModel.getMsg());
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
// ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("盲盒转盘失败,", response.code());
|
||||
ToastUtils.showShort("暂无活动,", response.code());
|
||||
LogUtils.e("盲盒转盘", response.message());
|
||||
}
|
||||
}
|
||||
@@ -5079,6 +5086,199 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void get_monster_info_box(BaseObserver<MonsterInfoBean> observer) {
|
||||
sApiServer.get_monster_info_box().enqueue(new Callback<BaseModel<MonsterInfoBean>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<MonsterInfoBean>> call, Response<BaseModel<MonsterInfoBean>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<MonsterInfoBean> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
setCode301(baseModel.getMsg());
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请求错误:" + response.code());
|
||||
LogUtils.e("get_monster_info_box", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<MonsterInfoBean>> call, Throwable t) {
|
||||
LogUtils.e("get_monster_info_box", t);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void open_beat_monster(String rid, String type, String num, BaseObserver<MonsterResultBean> observer) {
|
||||
sApiServer.open_beat_monster(rid, type, num).enqueue(new Callback<BaseModel<MonsterResultBean>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<MonsterResultBean>> call, Response<BaseModel<MonsterResultBean>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<MonsterResultBean> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
if (baseModel.getData() != null) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
setCode301(baseModel.getMsg());
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请求错误:" + response.code());
|
||||
LogUtils.e("open_beat_monster", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<MonsterResultBean>> call, Throwable t) {
|
||||
LogUtils.e("open_beat_monster", t);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void get_monster_box_list(BaseObserver<List<BoxJiangChiBean>> observer) {
|
||||
sApiServer.get_monster_box_list().enqueue(new Callback<BaseModel<List<BoxJiangChiBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<BoxJiangChiBean>>> call, Response<BaseModel<List<BoxJiangChiBean>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<BoxJiangChiBean>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
if (baseModel.getData() != null) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
observer.onNext(new ArrayList<>());
|
||||
}
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
setCode301(baseModel.getMsg());
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请求错误:" + response.code());
|
||||
LogUtils.e("get_monster_box_list", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<BoxJiangChiBean>>> call, Throwable t) {
|
||||
LogUtils.e("get_monster_box_list", t);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void get_user_monster_log(String page, BaseObserver<List<MonsterUserLogBean>> observer) {
|
||||
sApiServer.get_user_monster_log(page).enqueue(new Callback<BaseModel<List<MonsterUserLogBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<MonsterUserLogBean>>> call, Response<BaseModel<List<MonsterUserLogBean>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<MonsterUserLogBean>> baseModel = response.body();
|
||||
// if (baseModel != null) {
|
||||
// observer.onNext(baseModel);
|
||||
// } else {
|
||||
// observer.onNext(new ArrayList<>());
|
||||
// }
|
||||
if (baseModel.getCode() == 1) {
|
||||
if (baseModel.getData()!=null) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
observer.onNext(new ArrayList<>());
|
||||
}
|
||||
} else if (baseModel.getCode() == 301) {
|
||||
setCode301(baseModel.getMsg());
|
||||
} else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
} else
|
||||
ToastUtils.showShort("请求错误:" + response.code());
|
||||
LogUtils.e("get_user_monster_log", response.message());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<MonsterUserLogBean>>> call, Throwable t) {
|
||||
LogUtils.e("get_user_monster_log", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void get_monster_log(String page, BaseObserver<List<MonsterLogBean>> observer) {
|
||||
sApiServer.get_monster_log(page, "20").enqueue(new Callback<BaseModel<List<MonsterLogBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<MonsterLogBean>>> call, Response<BaseModel<List<MonsterLogBean>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<MonsterLogBean>> baseModel = response.body();
|
||||
// if (baseModel != null) {
|
||||
// observer.onNext(baseModel);
|
||||
// } else {
|
||||
// observer.onNext(new ArrayList<>());
|
||||
// }
|
||||
if (baseModel.getCode() == 1) {
|
||||
if (baseModel.getData()!=null) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
observer.onNext(new ArrayList<>());
|
||||
}
|
||||
} else if (baseModel.getCode() == 301)
|
||||
setCode301(baseModel.getMsg());
|
||||
else {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请求错误:" + response.code());
|
||||
LogUtils.e("get_monster_log", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<MonsterLogBean>>> call, Throwable t) {
|
||||
LogUtils.e("get_monster_log", t);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void get_monster_note(BaseObserver<String> observer) {
|
||||
sApiServer.get_monster_note().enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> baseModel = response.body();
|
||||
if (baseModel.getCode()==1){
|
||||
if (baseModel.getData()!=null){
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
observer.onNext("");
|
||||
}
|
||||
}else if (baseModel.getCode() == 301) {
|
||||
setCode301(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}
|
||||
|
||||
}else {
|
||||
ToastUtils.showShort("请求错误:" + response.code());
|
||||
LogUtils.e("get_monster_note", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("get_monster_note", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void cancelUserDecorate(String type, BaseObserver<String> observer) {
|
||||
sApiServer.cancelUserDecorate(type).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
|
||||
@@ -35,6 +35,7 @@ public class MqttConnect {
|
||||
public static String qx_hour_ranking = "";
|
||||
|
||||
public static String qx_redpacket_arrive = "";//红包飘屏的主题
|
||||
public static String qx_xianxuan = "";//炼仙传说推送
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
String[] topic;
|
||||
int[] qos = {1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // 消息质量
|
||||
@@ -50,12 +51,14 @@ public class MqttConnect {
|
||||
update_app = "qx_xunlehui"; // 巡乐会飘屏
|
||||
qx_hour_ranking = "qx_hour_ranking";//小时榜飘屏
|
||||
qx_redpacket_arrive = "qx_redpacket_arrive"; //红包飘屏的主题
|
||||
qx_xianxuan = "qx_xianxuan"; //红包飘屏的主题
|
||||
|
||||
ArrayList<String> topicList = new ArrayList<>();
|
||||
topicList.add(shutdown);
|
||||
topicList.add(update_app);
|
||||
topicList.add(qx_hour_ranking);
|
||||
topicList.add(qx_redpacket_arrive);
|
||||
topicList.add(qx_xianxuan);
|
||||
topic = topicList.toArray(new String[0]);
|
||||
}
|
||||
|
||||
@@ -93,6 +96,7 @@ public class MqttConnect {
|
||||
sub(update_app);
|
||||
sub(qx_hour_ranking);
|
||||
sub(qx_redpacket_arrive);
|
||||
sub(qx_xianxuan);
|
||||
|
||||
// UI操作回到主线程
|
||||
ActivityUtils.getTopActivity().runOnUiThread(() -> uiTip("MQTT连接成功"));
|
||||
|
||||
@@ -6,9 +6,16 @@ import android.os.Looper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.xscm.moduleutil.base.RealTimeMessages;
|
||||
import com.xscm.moduleutil.base.SocketBean;
|
||||
import com.xscm.moduleutil.bean.MqttXlhEnd;
|
||||
import com.xscm.moduleutil.bean.XLHBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterEndBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterInfoBean;
|
||||
import com.xscm.moduleutil.bean.room.refining.OpenMonsterBean;
|
||||
import com.xscm.moduleutil.event.HourlyBean;
|
||||
import com.xscm.moduleutil.event.RedBean;
|
||||
import com.xscm.moduleutil.event.RoomGiftRunable;
|
||||
@@ -59,6 +66,51 @@ public class MqttInitCallback implements MqttCallback {
|
||||
receiveQXHourRanking(topic, messageStr);
|
||||
} else if (topic.equals("qx_redpacket_arrive")) {
|
||||
receiveRed(topic, messageStr);
|
||||
} else if (topic.equals("qx_xianxuan")) {
|
||||
receiveXianxuanMessage(messageStr);
|
||||
}
|
||||
}
|
||||
|
||||
private void receiveXianxuanMessage(String messageStr) {
|
||||
try {
|
||||
JSONObject jsonObject = JSON.parseObject(messageStr);
|
||||
String message = jsonObject.getString("msg");
|
||||
// 将事件处理放到主线程执行
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
processXianxuanMessage(message);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("MQTT", "解析MQTT消息异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void processXianxuanMessage(String message) {
|
||||
SocketBean dataList = GsonUtils.fromJson(message, SocketBean.class);
|
||||
switch (dataList.getCode()) {
|
||||
case 3031:
|
||||
RealTimeMessages<MonsterInfoBean> monsterInfo = GsonUtils.fromJson(
|
||||
message,
|
||||
new TypeToken<RealTimeMessages<MonsterInfoBean>>() {}.getType()
|
||||
);
|
||||
EventBus.getDefault().post(monsterInfo.data);
|
||||
break;
|
||||
case 3032:
|
||||
RealTimeMessages<OpenMonsterBean> openMonster =
|
||||
GsonUtils.fromJson(
|
||||
message,
|
||||
new TypeToken<RealTimeMessages<OpenMonsterBean>>() {}.getType()
|
||||
);
|
||||
EventBus.getDefault().post(openMonster.data);
|
||||
break;
|
||||
case 3033:
|
||||
RealTimeMessages<MonsterEndBean> monsterEndBean =
|
||||
GsonUtils.fromJson(
|
||||
message,
|
||||
new TypeToken<RealTimeMessages<MonsterEndBean>>() {}.getType()
|
||||
);
|
||||
EventBus.getDefault().post(monsterEndBean.data);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.xscm.moduleutil.utils
|
||||
|
||||
import androidx.lifecycle.LifecycleCoroutineScope
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.*
|
||||
import kotlinx.coroutines.launch
|
||||
import java.text.DecimalFormat
|
||||
|
||||
object CountDownUtil {
|
||||
/**
|
||||
* 倒计时的实现
|
||||
*/
|
||||
fun countDown(lifecycleScope: LifecycleCoroutineScope,
|
||||
time: Int = 5,
|
||||
start: (scop: CoroutineScope) -> Unit,
|
||||
end: () -> Unit,
|
||||
next: (time: Int) -> Unit
|
||||
) {
|
||||
lifecycleScope.launch {
|
||||
// 在这个范围内启动的协程会在Lifecycle被销毁的时候自动取消
|
||||
flow {
|
||||
(time downTo 0).forEach {
|
||||
delay(1000)
|
||||
emit(it)
|
||||
}
|
||||
}.onStart {
|
||||
// 倒计时开始 ,在这里可以让Button 禁止点击状态
|
||||
start(this@launch)
|
||||
}.onCompletion {
|
||||
// 倒计时结束 ,在这里可以让Button 恢复点击状态
|
||||
end()
|
||||
}.catch {
|
||||
//错误
|
||||
// YYLogUtils.e(it.message ?: "Unkown Error")
|
||||
}.collect {
|
||||
// 在这里 更新值来显示到UI
|
||||
next(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun formatCountDownTime(milliseconds: Long): String {
|
||||
val sb = StringBuilder()
|
||||
val mss = milliseconds * 1000 / 1000
|
||||
val days = mss / (60 * 60 * 24)
|
||||
val hours = mss % (60 * 60 * 24) / (60 * 60)
|
||||
val minutes = mss % (60 * 60) / 60
|
||||
val seconds = mss % 60
|
||||
val format = DecimalFormat("00")
|
||||
if (days > 0 || hours > 0) {
|
||||
sb.append(format.format(hours)).append(":").append(format.format(minutes)).append(":")
|
||||
.append(format.format(seconds))
|
||||
} else {
|
||||
sb.append(format.format(minutes)).append(":").append(format.format(seconds))
|
||||
}
|
||||
return sb.toString()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
142
BaseModule/src/main/java/com/xscm/moduleutil/utils/TTSManager.kt
Normal file
@@ -0,0 +1,142 @@
|
||||
package com.xscm.moduleutil.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.speech.tts.TextToSpeech
|
||||
import android.speech.tts.UtteranceProgressListener
|
||||
import java.util.LinkedList
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* 项目名称:羽声语音
|
||||
* 时间:2025/12/6 11:00
|
||||
* 用途:
|
||||
*/
|
||||
class TTSManager private constructor(context: Context) :
|
||||
TextToSpeech.OnInitListener {
|
||||
|
||||
companion object {
|
||||
@Volatile
|
||||
private var instance: TTSManager? = null
|
||||
|
||||
fun getInstance(context: Context): TTSManager {
|
||||
return instance ?: synchronized(this) {
|
||||
instance ?: TTSManager(context.applicationContext).also {
|
||||
instance = it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var tts: TextToSpeech? = null
|
||||
private var isInitialized = false
|
||||
private val pendingQueue = LinkedList<String>()
|
||||
private var currentLanguage = Locale.CHINESE
|
||||
|
||||
init {
|
||||
initTTS(context)
|
||||
}
|
||||
|
||||
private fun initTTS(context: Context) {
|
||||
tts = TextToSpeech(context, this).apply {
|
||||
setOnUtteranceProgressListener(object : UtteranceProgressListener() {
|
||||
override fun onStart(utteranceId: String?) {
|
||||
// 开始朗读
|
||||
}
|
||||
|
||||
override fun onDone(utteranceId: String?) {
|
||||
// 朗读完成
|
||||
}
|
||||
|
||||
override fun onError(utteranceId: String?) {
|
||||
// 发生错误
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
override fun onInit(status: Int) {
|
||||
isInitialized = if (status == TextToSpeech.SUCCESS) {
|
||||
setLanguage(currentLanguage)
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
if (isInitialized) {
|
||||
processPendingQueue()
|
||||
}
|
||||
}
|
||||
|
||||
fun speak(text: String, flush: Boolean = true) {
|
||||
if (!isInitialized || tts == null) {
|
||||
pendingQueue.add(text)
|
||||
return
|
||||
}
|
||||
|
||||
val utteranceId = System.currentTimeMillis().toString()
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
val params = Bundle().apply {
|
||||
putString(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, utteranceId)
|
||||
}
|
||||
tts?.speak(text,
|
||||
if (flush) TextToSpeech.QUEUE_FLUSH else TextToSpeech.QUEUE_ADD,
|
||||
params,
|
||||
utteranceId)
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
val params = HashMap<String, String>()
|
||||
params[TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID] = utteranceId
|
||||
tts?.speak(text,
|
||||
if (flush) TextToSpeech.QUEUE_FLUSH else TextToSpeech.QUEUE_ADD,
|
||||
params)
|
||||
}
|
||||
}
|
||||
|
||||
fun setLanguage(locale: Locale): Boolean {
|
||||
currentLanguage = locale
|
||||
return if (isInitialized) {
|
||||
tts?.setLanguage(locale) == TextToSpeech.LANG_COUNTRY_AVAILABLE
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fun stop() {
|
||||
tts?.stop()
|
||||
}
|
||||
|
||||
fun pause() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
tts?.stop()
|
||||
}
|
||||
}
|
||||
|
||||
fun resume() {
|
||||
// 根据需要实现
|
||||
}
|
||||
|
||||
fun setSpeechRate(rate: Float) {
|
||||
tts?.setSpeechRate(rate)
|
||||
}
|
||||
|
||||
fun setPitch(pitch: Float) {
|
||||
tts?.setPitch(pitch)
|
||||
}
|
||||
|
||||
private fun processPendingQueue() {
|
||||
while (pendingQueue.isNotEmpty()) {
|
||||
speak(pendingQueue.poll())
|
||||
}
|
||||
}
|
||||
|
||||
fun release() {
|
||||
tts?.stop()
|
||||
tts?.shutdown()
|
||||
tts = null
|
||||
isInitialized = false
|
||||
instance = null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.voice.lib_base.ext
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.databinding.ViewDataBinding
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import java.lang.reflect.InvocationTargetException
|
||||
import java.lang.reflect.ParameterizedType
|
||||
|
||||
/**
|
||||
* 作者 : QIngNing
|
||||
* 时间 : 2021/12/21
|
||||
* 描述 :
|
||||
*/
|
||||
|
||||
@JvmName("inflateWithGeneric")
|
||||
fun <VB : ViewBinding> AppCompatActivity.inflateBindingWithGeneric(layoutInflater: LayoutInflater): VB =
|
||||
withGenericBindingClass<VB>(this) { clazz ->
|
||||
clazz.getMethod("inflate", LayoutInflater::class.java).invoke(null, layoutInflater) as VB
|
||||
}.also { binding ->
|
||||
if (binding is ViewDataBinding) {
|
||||
binding.lifecycleOwner = this
|
||||
}
|
||||
}
|
||||
|
||||
@JvmName("inflateWithGeneric")
|
||||
fun <VB : ViewBinding> Fragment.inflateBindingWithGeneric(layoutInflater: LayoutInflater, parent: ViewGroup?, attachToParent: Boolean): VB =
|
||||
withGenericBindingClass<VB>(this) { clazz ->
|
||||
clazz.getMethod("inflate", LayoutInflater::class.java, ViewGroup::class.java, Boolean::class.java)
|
||||
.invoke(null, layoutInflater, parent, attachToParent) as VB
|
||||
}.also { binding ->
|
||||
if (binding is ViewDataBinding) {
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
}
|
||||
}
|
||||
|
||||
private fun <VB : ViewBinding> withGenericBindingClass(any: Any, block: (Class<VB>) -> VB): VB {
|
||||
var genericSuperclass = any.javaClass.genericSuperclass
|
||||
var superclass = any.javaClass.superclass
|
||||
while (superclass != null) {
|
||||
if (genericSuperclass is ParameterizedType) {
|
||||
try {
|
||||
return block.invoke(genericSuperclass.actualTypeArguments[0] as Class<VB>)
|
||||
|
||||
} catch (e: NoSuchMethodException) {
|
||||
} catch (e: ClassCastException) {
|
||||
} catch (e: InvocationTargetException) {
|
||||
throw e.targetException
|
||||
}
|
||||
}
|
||||
genericSuperclass = superclass.genericSuperclass
|
||||
superclass = superclass.superclass
|
||||
}
|
||||
throw IllegalArgumentException("There is no generic of ViewBinding.")
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import java.io.IOException;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import okhttp3.Connection;
|
||||
@@ -54,7 +55,7 @@ public class DataLoggingInterceptor implements Interceptor {
|
||||
|
||||
logger.reset();
|
||||
logger.log(sLogStartFlag);
|
||||
logger.log(sFormatLine);
|
||||
// logger.log("2\n"+sFormatLine);
|
||||
|
||||
RequestBody requestBody = request.body();
|
||||
boolean hasRequestBody = requestBody != null;
|
||||
@@ -62,17 +63,17 @@ public class DataLoggingInterceptor implements Interceptor {
|
||||
Connection connection = chain.connection();
|
||||
Protocol protocol = connection != null ? connection.protocol() : Protocol.HTTP_1_1;
|
||||
// request.url().encodedPath() 这是只展示最后的url地址,没有带有前面的https对应的域名,只是展示路径
|
||||
String requestStartMessage = request.method() + " " + request.url().encodedPath() + " " + protocol;
|
||||
logger.log(requestStartMessage);
|
||||
String requestStartMessage = request.method() + " " + Arrays.toString(request.url().encodedPath().split("/api/")) + " " + protocol;
|
||||
// logger.log("3\n"+requestStartMessage);
|
||||
|
||||
if (hasRequestBody) {
|
||||
// Request body headers are only present when installed as a network interceptor. Force
|
||||
// them to be included (when available) so there values are known.
|
||||
if (requestBody.contentType() != null) {
|
||||
logger.log("Content-Type: " + requestBody.contentType());
|
||||
// logger.log("4\n"+ "Content-Type: " + requestBody.contentType());
|
||||
}
|
||||
if (requestBody.contentLength() != -1) {
|
||||
logger.log("Content-Length: " + requestBody.contentLength());
|
||||
// logger.log("5\n"+"Content-Length: " + requestBody.contentLength());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,14 +82,14 @@ public class DataLoggingInterceptor implements Interceptor {
|
||||
String name = rHeaders.name(i);
|
||||
// Skip headers from the request body as they are explicitly logged above.
|
||||
if (!"Content-Type".equalsIgnoreCase(name) && !"Content-Length".equalsIgnoreCase(name)) {
|
||||
logger.log(name + ": " + rHeaders.value(i));
|
||||
// logger.log("6\n"+name + ": " + rHeaders.value(i));
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasRequestBody) {
|
||||
logger.log("END " + request.method());
|
||||
// logger.log("7\n"+"END " + request.method());
|
||||
} else if (bodyEncoded(request.headers())) {
|
||||
logger.log("END " + request.method() + " (encoded body omitted)");
|
||||
// logger.log("8\n"+"END " + request.method() + " (encoded body omitted)");
|
||||
} else {
|
||||
Buffer buffer = new Buffer();
|
||||
requestBody.writeTo(buffer);
|
||||
@@ -100,35 +101,35 @@ public class DataLoggingInterceptor implements Interceptor {
|
||||
}
|
||||
|
||||
if (charset != null) {
|
||||
logger.log(sFormatLine);
|
||||
// logger.log("9\n"+sFormatLine);
|
||||
if (isPlaintext(buffer)) {
|
||||
try {
|
||||
String requestStr = URLDecoder.decode(buffer.readString(charset), "UTF-8");
|
||||
String[] strs = requestStr.split("&");
|
||||
for (String str : strs) {
|
||||
logger.log(str);
|
||||
// logger.log("10\n"+str);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.log(buffer.readString(charset));
|
||||
logger.log("11\n"+buffer.readString(charset));
|
||||
}
|
||||
logger.log("END " + request.method()
|
||||
+ " (" + requestBody.contentLength() + "-byte body)");
|
||||
// logger.log("12\n"+"END " + request.method()
|
||||
// + " (" + requestBody.contentLength() + "-byte body)");
|
||||
} else {
|
||||
logger.log("END " + request.method() + " (binary "
|
||||
+ requestBody.contentLength() + "-byte body omitted)");
|
||||
// logger.log("13\n"+"END " + request.method() + " (binary "
|
||||
// + requestBody.contentLength() + "-byte body omitted)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.log(sFormatLine);
|
||||
// logger.log("14\n"+sFormatLine);
|
||||
|
||||
long startNs = System.nanoTime();
|
||||
Response response;
|
||||
try {
|
||||
response = chain.proceed(request);
|
||||
} catch (Exception e) {
|
||||
logger.log("HTTP FAILED: " + e);
|
||||
logger.log(sLogEndFlag);
|
||||
logger.log("15\n"+"HTTP FAILED: " + e);
|
||||
// logger.log(sLogEndFlag);
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -137,21 +138,19 @@ public class DataLoggingInterceptor implements Interceptor {
|
||||
if (responseBody != null) {
|
||||
long contentLength = responseBody.contentLength();
|
||||
String bodySize = contentLength != -1 ? contentLength + "-byte" : "unknown-length";
|
||||
// logger.log(response.code() + " " + response.message() + " "
|
||||
// + response.request().url() + " (" + tookMs + "ms)");
|
||||
|
||||
logger.log(response.code() + " " + response.message() + " "
|
||||
+ response.request().url().encodedPath() + " → " + response.networkResponse().request().url().encodedPath() + " (" + tookMs + "ms)");
|
||||
logger.log("17\n"+response.code() + " " + response.message() + " "
|
||||
+ Arrays.toString(response.request().url().encodedPath().split("/api/")) + " → " + Arrays.toString(response.networkResponse().request().url().encodedPath().split("/api/")) + " (" + tookMs + "ms)");
|
||||
|
||||
Headers headers = response.headers();
|
||||
for (int i = 0, count = headers.size(); i < count; i++) {
|
||||
logger.log(headers.name(i) + ": " + headers.value(i));
|
||||
}
|
||||
// Headers headers = response.headers();
|
||||
// for (int i = 0, count = headers.size(); i < count; i++) {
|
||||
// logger.log("18\n"+headers.name(i) + ": " + headers.value(i));
|
||||
// }
|
||||
|
||||
if (!HttpHeaders.hasBody(response)) {
|
||||
logger.log("END HTTP");
|
||||
// logger.log("19\n"+"END HTTP");
|
||||
} else if (bodyEncoded(response.headers())) {
|
||||
logger.log("END HTTP (encoded body omitted)");
|
||||
// logger.log("20\n"+"END HTTP (encoded body omitted)");
|
||||
} else {
|
||||
BufferedSource source = responseBody.source();
|
||||
if (source.isOpen()) {
|
||||
@@ -165,26 +164,26 @@ public class DataLoggingInterceptor implements Interceptor {
|
||||
}
|
||||
|
||||
if (!isPlaintext(buffer)) {
|
||||
logger.log("END HTTP (binary " + buffer.size() + "-byte body omitted)");
|
||||
logger.log(sFormatLine);
|
||||
// logger.log("21\n"+"END HTTP (binary " + buffer.size() + "-byte body omitted)");
|
||||
// logger.log("22\n"+sFormatLine);
|
||||
logger.log(sLogEndFlag);
|
||||
return response;
|
||||
}
|
||||
|
||||
if (contentLength != 0 && charset != null) {
|
||||
logger.log(sFormatLine);
|
||||
// logger.log("24\n"+sFormatLine);
|
||||
//这是展示返回的数据日志
|
||||
// logger.log(buffer.clone().readString(charset));
|
||||
}
|
||||
|
||||
logger.log("END HTTP (" + buffer.size() + "-byte body)");
|
||||
// logger.log("25\n"+"END HTTP (" + buffer.size() + "-byte body)");
|
||||
} else {
|
||||
logger.log("END HTTP");
|
||||
// logger.log("26\n"+"END HTTP");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.log(sFormatLine);
|
||||
logger.log("27\n"+sFormatLine);
|
||||
logger.log(sLogEndFlag);
|
||||
|
||||
return response;
|
||||
|
||||
@@ -273,6 +273,15 @@ public class Constants {
|
||||
public static final String GET_PIT_TIME = "/api/BarRoom/get_pit_time_list";//酒吧房麦位时长列表
|
||||
public static final String POST_BLACK_ROOM_LIST = "/api/BarRoom/black_room_list";//小黑屋(酒吧房,交友小屋)列表
|
||||
|
||||
//炼仙传说
|
||||
public static final String GET_MONSTER_INFO_BOX = "/api/Monster/get_monster_info";//
|
||||
public static final String GET_OPEN_BEAT_MONSTER = "/api/monster/open_beat_monster";//
|
||||
public static final String GET_MONSTER_BOX_LIST = "/api/monster/get_monster_box_list";//
|
||||
public static final String GET_USER_MONSTER_LOG = "/api/monster/get_user_monster_log";//
|
||||
public static final String GET_MONSTER_LOG = "/api/monster/get_monster_log";//
|
||||
public static final String GET_MONSTER_NOTE = "/api/monster/get_monster_note";//
|
||||
|
||||
|
||||
public static final String UPDATEPASSWORD = "/api/room/setRoomPassword";//更新房间秘密啊
|
||||
public static final String GET_ROOM_ONLINE = "/api/Room/room_online_list";//房间在线列表
|
||||
public static final String GET_SJ_ROOM_NAME = "/api/Room/room_random_name";//随机房间名称
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.xscm.moduleutil.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
import android.graphics.drawable.StateListDrawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.xscm.moduleutil.R;
|
||||
|
||||
|
||||
/**
|
||||
* 小熊猫展示的金额,是在炼仙传说中使用的
|
||||
*/
|
||||
|
||||
public class ShapeRedTextView extends TextView {
|
||||
private final int SHAPE_RECTANGEL = 0;
|
||||
private final int SHAPE_OVAL = 1;
|
||||
|
||||
private int shape;
|
||||
private int solidNormalColor;
|
||||
private int solidPressedColor;
|
||||
private float cornersRadius;
|
||||
private float cornersTopLeft;
|
||||
private float cornersTopRight;
|
||||
private float cornersBottomLeft;
|
||||
private float cornersBottomRight;
|
||||
|
||||
// 渐变颜色属性
|
||||
private int gradientNormalStartColor;
|
||||
private int gradientNormalCenterColor;
|
||||
private int gradientNormalEndColor;
|
||||
|
||||
private int gradientPressedStartColor;
|
||||
private int gradientPressedCenterColor;
|
||||
private int gradientPressedEndColor;
|
||||
|
||||
private int gradientOrientation;
|
||||
|
||||
private float strokeWidth;
|
||||
private int strokeColor;
|
||||
|
||||
private int defaultColor = Color.parseColor("#00000000");
|
||||
private GradientDrawable.Orientation[] orientations;
|
||||
|
||||
public ShapeRedTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public ShapeRedTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.ShapeTextView);
|
||||
shape = array.getInteger(R.styleable.ShapeTextView_shape, SHAPE_RECTANGEL);
|
||||
|
||||
|
||||
solidNormalColor = array.getColor(R.styleable.ShapeTextView_solidNormal, defaultColor);
|
||||
solidPressedColor = array.getColor(R.styleable.ShapeTextView_solidPressed, defaultColor);
|
||||
|
||||
|
||||
cornersRadius = array.getDimension(R.styleable.ShapeTextView_cornersRadius, 0);
|
||||
|
||||
cornersTopLeft = array.getDimension(R.styleable.ShapeTextView_cornerTopLeft, 0);
|
||||
cornersTopRight = array.getDimension(R.styleable.ShapeTextView_cornerTopRight, 0);
|
||||
cornersBottomLeft = array.getDimension(R.styleable.ShapeTextView_cornerBottomLeft, 0);
|
||||
cornersBottomRight = array.getDimension(R.styleable.ShapeTextView_cornerBottomRight, 0);
|
||||
|
||||
strokeWidth = array.getDimension(R.styleable.ShapeTextView_strokeWidth, 0);
|
||||
|
||||
strokeColor = array.getColor(R.styleable.ShapeTextView_strokeColor, defaultColor);
|
||||
|
||||
gradientNormalStartColor = array.getColor(R.styleable.ShapeTextView_gradientNormalStartColor, defaultColor);
|
||||
|
||||
gradientNormalCenterColor = array.getColor(R.styleable.ShapeTextView_gradientNormalCenterColor, defaultColor);
|
||||
|
||||
gradientNormalEndColor = array.getColor(R.styleable.ShapeTextView_gradientNormalEndColor, defaultColor);
|
||||
|
||||
|
||||
gradientPressedStartColor = array.getColor(R.styleable.ShapeTextView_gradientPressedStartColor, defaultColor);
|
||||
gradientPressedCenterColor = array.getColor(R.styleable.ShapeTextView_gradientPressedCenterColor, defaultColor);
|
||||
gradientPressedEndColor = array.getColor(R.styleable.ShapeTextView_gradientPressedEndColor, defaultColor);
|
||||
|
||||
|
||||
TypedArray orientationArray = context.obtainStyledAttributes(attrs, R.styleable.ShapeTextView);
|
||||
|
||||
gradientOrientation = orientationArray.getInteger(R.styleable.ShapeTextView_gradientOrientation, 6);
|
||||
|
||||
array.recycle();
|
||||
|
||||
|
||||
orientations = new GradientDrawable.Orientation[]{
|
||||
GradientDrawable.Orientation.TOP_BOTTOM,
|
||||
GradientDrawable.Orientation.TR_BL,
|
||||
GradientDrawable.Orientation.RIGHT_LEFT,
|
||||
GradientDrawable.Orientation.BR_TL,
|
||||
GradientDrawable.Orientation.BOTTOM_TOP,
|
||||
GradientDrawable.Orientation.BL_TR,
|
||||
GradientDrawable.Orientation.LEFT_RIGHT,
|
||||
GradientDrawable.Orientation.TL_BR
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
setShape();
|
||||
}
|
||||
|
||||
private void setShape() {
|
||||
setGravity(Gravity.CENTER);
|
||||
setClickable(true);
|
||||
// normal state
|
||||
GradientDrawable drawableNormal = new GradientDrawable();
|
||||
// 设置Shape
|
||||
drawableNormal.setShape(shape);
|
||||
// 设置圆角半径
|
||||
drawableNormal.setCornerRadius(cornersRadius);
|
||||
// 圆角半径(每个圆角半径的值)
|
||||
if (cornersRadius == 0) {
|
||||
drawableNormal.setCornerRadii(new float[]{
|
||||
cornersTopLeft, cornersTopLeft,
|
||||
cornersTopRight, cornersTopRight,
|
||||
cornersBottomRight, cornersBottomRight,
|
||||
cornersBottomLeft, cornersBottomLeft});
|
||||
}
|
||||
//描边的宽度和颜色
|
||||
drawableNormal.setStroke((int) strokeWidth, strokeColor);
|
||||
//设置填充色
|
||||
if (solidNormalColor != defaultColor) {
|
||||
drawableNormal.setColor(solidNormalColor);
|
||||
} else {
|
||||
// 设置渐变色
|
||||
int[] gradientColors;
|
||||
if (gradientNormalStartColor != defaultColor && gradientNormalEndColor != defaultColor) {
|
||||
gradientColors = new int[]{gradientNormalStartColor, gradientNormalEndColor};
|
||||
if (gradientNormalCenterColor != defaultColor) {
|
||||
gradientColors = new int[]{gradientNormalStartColor, gradientNormalCenterColor, gradientNormalEndColor};
|
||||
}
|
||||
drawableNormal.setColors(gradientColors);
|
||||
|
||||
|
||||
drawableNormal.setOrientation(orientations[gradientOrientation]);
|
||||
} else {
|
||||
drawableNormal.setColor(solidNormalColor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// pressed state
|
||||
GradientDrawable drawablePressed = new GradientDrawable();
|
||||
drawablePressed.setShape(shape);
|
||||
drawablePressed.setCornerRadius(cornersRadius);
|
||||
if (cornersRadius == 0) {
|
||||
drawablePressed.setCornerRadii(new float[]{
|
||||
cornersTopLeft, cornersTopLeft,
|
||||
cornersTopRight, cornersTopRight,
|
||||
cornersBottomRight, cornersBottomRight,
|
||||
cornersBottomLeft, cornersBottomLeft});
|
||||
}
|
||||
|
||||
drawablePressed.setStroke((int) strokeWidth, strokeColor);
|
||||
|
||||
drawablePressed.setColor(solidPressedColor);
|
||||
|
||||
// 设置背景选择器
|
||||
StateListDrawable stateListDrawable = new StateListDrawable();
|
||||
|
||||
if (solidPressedColor != defaultColor) {
|
||||
stateListDrawable.addState(new int[]{android.R.attr.state_pressed}, drawablePressed);
|
||||
}
|
||||
int[] gradientPressdColors;
|
||||
if (gradientPressedStartColor != defaultColor && gradientPressedEndColor != defaultColor) {
|
||||
gradientPressdColors = new int[]{gradientPressedStartColor, gradientPressedEndColor};
|
||||
if (gradientPressedCenterColor != defaultColor) {
|
||||
gradientPressdColors = new int[]{gradientPressedStartColor, gradientPressedCenterColor, gradientPressedEndColor};
|
||||
}
|
||||
|
||||
drawablePressed.setColors(gradientPressdColors);
|
||||
drawablePressed.setOrientation(orientations[gradientOrientation]);
|
||||
stateListDrawable.addState(new int[]{android.R.attr.state_pressed}, drawablePressed);
|
||||
|
||||
}
|
||||
|
||||
if (isEnabled()) {
|
||||
setAlpha(1.0f);
|
||||
} else {
|
||||
setAlpha(0.7f);
|
||||
}
|
||||
stateListDrawable.addState(new int[]{}, drawableNormal);
|
||||
|
||||
setBackground(stateListDrawable);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_selected="true" android:drawable="@mipmap/box_num_bg1"/>
|
||||
<item android:state_selected="false" android:drawable="@mipmap/box_num_bg2"/>
|
||||
</selector>
|
||||
BIN
BaseModule/src/main/res/mipmap-xxhdpi/box_num_bg1.webp
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/box_num_bg2.webp
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/lxcs_iocn.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
@@ -531,4 +531,37 @@
|
||||
<attr name="btnTextSize" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="ShapeTextView">
|
||||
<attr name="shape" format="enum">
|
||||
<enum name="rectangle" value="0" />
|
||||
<enum name="oval" value="1" />
|
||||
</attr>
|
||||
<attr name="solidNormal" format="color" />
|
||||
<attr name="solidPressed" format="color" />
|
||||
<attr name="cornersRadius" format="dimension" />
|
||||
<attr name="cornerTopLeft" format="dimension" />
|
||||
<attr name="cornerTopRight" format="dimension" />
|
||||
<attr name="cornerBottomLeft" format="dimension" />
|
||||
<attr name="cornerBottomRight" format="dimension" />
|
||||
<attr name="strokeWidth"/>
|
||||
<attr name="strokeColor" />
|
||||
<attr name="gradientNormalStartColor" format="color" />
|
||||
<attr name="gradientNormalCenterColor" format="color" />
|
||||
<attr name="gradientNormalEndColor" format="color" />
|
||||
|
||||
<attr name="gradientPressedStartColor" format="color" />
|
||||
<attr name="gradientPressedCenterColor" format="color" />
|
||||
<attr name="gradientPressedEndColor" format="color" />
|
||||
|
||||
<attr name="gradientOrientation" format="enum">
|
||||
<enum name="TOP_BOTTOM" value="0" />
|
||||
<enum name="TR_BL" value="1" />
|
||||
<enum name="RIGHT_LEFT" value="2" />
|
||||
<enum name="BR_TL" value="3" />
|
||||
<enum name="BOTTOM_TOP" value="4" />
|
||||
<enum name="BL_TR" value="5" />
|
||||
<enum name="LEFT_RIGHT" value="6" />
|
||||
<enum name="TL_BR" value="7" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
@@ -331,5 +331,13 @@
|
||||
<item name="android:textAllCaps">false</item>
|
||||
</style>
|
||||
|
||||
<style name="myChooseDialog" parent="@android:style/Theme.Dialog">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:backgroundDimAmount">0.3</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.xscm.modulemain.activity.room.presenter
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.xscm.moduleutil.base.BaseViewModel
|
||||
import com.xscm.moduleutil.bean.WalletBean
|
||||
import com.xscm.moduleutil.bean.room.refining.BoxJiangChiBean
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterInfoBean
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterLogBean
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterResultBean
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterUserLogBean
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
class RoomViewModel : BaseViewModel() {
|
||||
var repository = RetrofitClient.getInstance()
|
||||
|
||||
var moneyBean = MutableLiveData<WalletBean>()
|
||||
|
||||
val monsterInfo = MutableLiveData<MonsterInfoBean>()
|
||||
|
||||
val openBeatMonster = MutableLiveData<MonsterResultBean>()
|
||||
|
||||
//奖池奖品列表
|
||||
var jiangChiBean: MutableLiveData<ArrayList<BoxJiangChiBean>> = MutableLiveData()
|
||||
|
||||
// TODO:获取个人用户金币数
|
||||
fun getMoneyData() {
|
||||
launchUI {
|
||||
repository.wallet(object : BaseObserver<WalletBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: WalletBean) {
|
||||
moneyBean.value = t
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun get_monster_info_box() {
|
||||
launchUI {
|
||||
repository.get_monster_info_box(object : BaseObserver<MonsterInfoBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: MonsterInfoBean) {
|
||||
monsterInfo.value = t
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun open_beat_monster(
|
||||
rid: String?,
|
||||
type: String,
|
||||
num: String
|
||||
) {
|
||||
launchUI {
|
||||
repository.open_beat_monster(
|
||||
rid,
|
||||
type,
|
||||
num,
|
||||
object : BaseObserver<MonsterResultBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: MonsterResultBean) {
|
||||
openBeatMonster.value = t
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun get_monster_box_list() {
|
||||
launchUI {
|
||||
repository.get_monster_box_list(object : BaseObserver<List<BoxJiangChiBean>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: List<BoxJiangChiBean>) {
|
||||
jiangChiBean.value = t as ArrayList<BoxJiangChiBean>
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
val monsterUserLogList = MutableLiveData<ArrayList<MonsterUserLogBean>>()
|
||||
fun get_user_monster_log(page: String) {
|
||||
launchUI {
|
||||
repository.get_user_monster_log(
|
||||
page,
|
||||
object : BaseObserver<List<MonsterUserLogBean>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: List<MonsterUserLogBean>) {
|
||||
monsterUserLogList.value = t as ArrayList<MonsterUserLogBean>
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var monsterLog = MutableLiveData<ArrayList<MonsterLogBean>>()
|
||||
fun get_monster_log(page: String) {
|
||||
launchUI {
|
||||
repository.get_monster_log(page, object : BaseObserver<List<MonsterLogBean>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: List<MonsterLogBean>) {
|
||||
monsterLog.value = t as ArrayList<MonsterLogBean>
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
val monsterNote = MutableLiveData<String>()
|
||||
fun get_monster_note_box() {
|
||||
launchUI {
|
||||
repository.get_monster_note(object : BaseObserver<String>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: String) {
|
||||
monsterNote.value = t
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,6 +161,8 @@ public class HorizontalListAdapter extends RecyclerView.Adapter<HorizontalListAd
|
||||
return com.xscm.moduleutil.R.mipmap.time_space;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomTimeRedSound:
|
||||
return b ? com.xscm.moduleutil.R.mipmap.red_effect_off : com.xscm.moduleutil.R.mipmap.red_effect_on;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomBusinessLegend:
|
||||
return com.xscm.moduleutil.R.mipmap.lxcs_iocn;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.xscm.modulemain.adapter.refining
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.moduleutil.bean.room.refining.BoxJiangChiBean
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
|
||||
class BoxJackpotListAdapter2 :
|
||||
BaseQuickAdapter<BoxJiangChiBean, BaseViewHolder>(R.layout.item_box_jackpot_list2) {
|
||||
override fun convert(helper: BaseViewHolder, item: BoxJiangChiBean) {
|
||||
|
||||
item.let {
|
||||
ImageUtils.loadHead(item.base_image,helper.getView(R.id.iv_cover))
|
||||
|
||||
helper.setText(R.id.tv_name, it.gift_name)
|
||||
.setText(R.id.tv_num, item.gift_price)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.xscm.modulemain.adapter.refining
|
||||
|
||||
import android.content.Context
|
||||
import android.view.ViewGroup
|
||||
import com.blankj.utilcode.util.TimeUtils
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterUserLogBean
|
||||
|
||||
class BoxRankListAdapter2 :
|
||||
BaseQuickAdapter<MonsterUserLogBean, BaseViewHolder>(R.layout.item_box_rank_list2) {
|
||||
override fun convert(helper: BaseViewHolder, item: MonsterUserLogBean) {
|
||||
|
||||
helper.setText(R.id.tv_time,TimeUtils.millis2String(item.add_time.toLong() * 1000))
|
||||
.setText(R.id.tv_type_name,"炼仙传说:" + item.type_name)
|
||||
.setText(R.id.tv_result,"第${item.mid}期 ${item.nick_name}中了${item.gift_name}(${item.gift_price})*${item.num}")
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.xscm.modulemain.adapter.refining
|
||||
|
||||
import com.blankj.utilcode.util.TimeUtils
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterLogBean
|
||||
|
||||
class BoxRecordListAdapter2 :
|
||||
BaseQuickAdapter<MonsterLogBean, BaseViewHolder>(R.layout.item_box_record_list2) {
|
||||
override fun convert(helper: BaseViewHolder, item: MonsterLogBean) {
|
||||
|
||||
|
||||
|
||||
item.let {
|
||||
helper.setText(R.id.tv_time, TimeUtils.millis2String(item.add_time.toLong() * 1000))
|
||||
|
||||
when(item.is_join){
|
||||
// 1已中奖,2未中奖,3未参与
|
||||
1->{
|
||||
helper.setText(R.id.tv_result,"第${it.id}期 炼仙传说 ${it.type_name} 获得 ${item.gift_name}(${item.gift_price})*${item.num}")
|
||||
.setText(R.id.tv_join,"已中奖")
|
||||
}
|
||||
2->{
|
||||
helper.setText(R.id.tv_result,"第${it.id}期 炼仙传说 ${it.type_name}")
|
||||
.setText(R.id.tv_join,"未中奖")
|
||||
}
|
||||
3->{
|
||||
helper.setText(R.id.tv_result,"第${it.id}期 炼仙传说 ${it.type_name}")
|
||||
.setText(R.id.tv_join,"未参与")
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.xscm.modulemain.dialog;
|
||||
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomBusinessLegend;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomBusinessTime;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomOrderMic;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomTimeRedSound;
|
||||
@@ -31,6 +32,7 @@ import com.xscm.modulemain.adapter.HorizontalListAdapter;
|
||||
import com.xscm.modulemain.adapter.RoomSettingAdapter;
|
||||
import com.xscm.modulemain.databinding.DialogRoomSettingFragmentBinding;
|
||||
import com.xscm.modulemain.activity.WebViewActivity;
|
||||
import com.xscm.modulemain.dialog.refining.BoxMainDialog2;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.base.WebUrlConstants;
|
||||
import com.xscm.moduleutil.bean.BlindBoxStatus;
|
||||
@@ -193,8 +195,6 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
moreChildren.add(new RoomSettingBean("关闭特效", "ic_close_effects", null, null, RoomSettingBean.QXRoomSettingTypeRoomCloseEffects, read, isSelected, false, effectOn));
|
||||
moreChildren.add(new RoomSettingBean("关闭飘屏", "ic_close_floating_screen", null, null, RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen, read, isSelected, false, floatingScreen));
|
||||
moreChildren.add(new RoomSettingBean("举报", "ic_report", null, null, RoomSettingBean.QXRoomSettingTypeRoomReport, read, isSelected, false, false));
|
||||
moreChildren.add(new RoomSettingBean("岁月之城", "the_city_years", null, null, RoomSettingBean.QXRoomSettingTypeRoomTheCityYears, read, isSelected, false, false));
|
||||
moreChildren.add(new RoomSettingBean("时空之巅", "time_space", null, null, QXRoomSettingTypeRoomTimeSpace, read, isSelected, false, false));
|
||||
moreChildren.add(new RoomSettingBean("关闭红包声音", "crossing", null, null, QXRoomSettingTypeRoomTimeRedSound, read, isSelected, false, redSound));
|
||||
moreParent.setChildren(moreChildren);
|
||||
parentList.add(moreParent);
|
||||
@@ -528,6 +528,8 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
dialog.setTvEndTime(roomInfoResp.getRoom_info().getEnd_time());
|
||||
dialog.setTvStartTime(roomInfoResp.getRoom_info().getStart_time());
|
||||
dialog.show(getChildFragmentManager(), "DoubleTimePicker");
|
||||
} else if (bean.getType() == QXRoomSettingTypeRoomBusinessLegend) {
|
||||
new BoxMainDialog2((RoomActivity) getSelfActivity()).show(getChildFragmentManager(), "炼仙传说");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -535,164 +537,6 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
MvpPre.blindBoxStatus();
|
||||
|
||||
/* adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
RoomSettingBean bean = (RoomSettingBean) adapter.getItem(position);
|
||||
|
||||
// 示例:切换选择状态
|
||||
if (bean.getType() == QXRoomSettingTypeRoomOrderMic) {
|
||||
MvpPre.changeRoom(roomId, SpUtil.getUserId() + "", position, bean);
|
||||
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomClearMessage) {
|
||||
RoomMessageEvent.T t = new RoomMessageEvent.T();
|
||||
t.setText("清空消息");
|
||||
RoomMessageEvent roomMessageEvent = new RoomMessageEvent(123, roomId, t);
|
||||
EventBus.getDefault().post(roomMessageEvent);
|
||||
String json = GsonUtils.toJson(roomMessageEvent);
|
||||
// 转换为 byte[]
|
||||
byte[] binaryData = json.getBytes(StandardCharsets.UTF_8);
|
||||
// 创建自定义消息
|
||||
MessageListenerSingleton.getInstance().sendCustomRoomMessage(
|
||||
roomId,
|
||||
binaryData
|
||||
);
|
||||
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).clearData();
|
||||
}
|
||||
|
||||
}
|
||||
// else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomMyDress) {
|
||||
// TunerDialogFragment.show(roomId, getChildFragmentManager());
|
||||
// }
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomCompere) {//主持设置
|
||||
RoomHostFragment.newInstance(roomId).show(getChildFragmentManager(), "RoomHostFragment");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomBgImage) {//背景图片
|
||||
RoomBackgroundDialogFragment.newInstance(roomId).show(getChildFragmentManager(), "RoomBackgroundDialogFragment");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomCloseEffects) {//关闭特效
|
||||
if (effectOn) {
|
||||
//关闭
|
||||
effectOn = false;
|
||||
//保存到本地
|
||||
SpUtil.setOpenEffect(0);
|
||||
EventBus.getDefault().post(new EffectEvent(false));
|
||||
bean.setSelect(false);
|
||||
} else {
|
||||
//打开
|
||||
effectOn = true;
|
||||
SpUtil.setOpenEffect(1);
|
||||
EventBus.getDefault().post(new EffectEvent(true));
|
||||
bean.setSelect(true);
|
||||
}
|
||||
upAdapter();
|
||||
// adapter.notifyItemChanged(position);
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) {
|
||||
EventBus.getDefault().post(new MusicEvent());
|
||||
|
||||
dismiss();
|
||||
}
|
||||
// else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomLeave) {
|
||||
// EventBus.getDefault().post(new RoomOutEvent());
|
||||
// }
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeSing) {
|
||||
// MvpPre.changeRoomType(roomId, "1");
|
||||
queren("1");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction) {
|
||||
// MvpPre.changeRoomType(roomId, "2");
|
||||
queren("2");
|
||||
}
|
||||
// else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy) {
|
||||
//// MvpPre.changeRoomType(roomId, "3");
|
||||
// queren("3");
|
||||
// }
|
||||
// else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl) {
|
||||
//// MvpPre.changeRoomType(roomId, "4");
|
||||
// queren("4");
|
||||
// }
|
||||
else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeJiaoy) {
|
||||
// MvpPre.changeRoomType(roomId, "7");
|
||||
queren("9");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeHUYU) {
|
||||
queren("7");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeLianG) {
|
||||
queren("-1");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTypeSIGNCONTRACT) {
|
||||
queren("10");
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSetting) {
|
||||
if (roomInfoResp != null) {
|
||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||
} else {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("数据错误,请关闭重试");
|
||||
}
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomReport) {
|
||||
if (roomId != null) {
|
||||
Intent intent = new Intent(getActivity(), WebViewActivity.class);
|
||||
intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_REPORT_URL(), SpUtil.getToken(), 2, roomId));
|
||||
startActivity(intent);
|
||||
} else {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("数据错误,请关闭重试");
|
||||
}
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomSubsidy) {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_ALLOWANCE).withString("from", "我的界面").withString("roomId", roomInfoResp.getRoom_info().getRoom_id() + "").navigation();
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen) {//2025年9月22日14:10:25,添加飘屏关闭打开按钮
|
||||
if (floatingScreen) {
|
||||
//关闭
|
||||
floatingScreen = false;
|
||||
//保存到本地
|
||||
SpUtil.setFloatingScreen(0);
|
||||
EventBus.getDefault().post(new FloatingScreenEvent(false));
|
||||
bean.setSelect(false);
|
||||
} else {
|
||||
//打开
|
||||
floatingScreen = true;
|
||||
SpUtil.setFloatingScreen(1);
|
||||
EventBus.getDefault().post(new FloatingScreenEvent(true));
|
||||
bean.setSelect(true);
|
||||
}
|
||||
upAdapter();
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomFloatingRed) {
|
||||
|
||||
if (getActivity() instanceof RoomActivity) {
|
||||
((RoomActivity) getActivity()).redDialogView();
|
||||
}
|
||||
dismiss();
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTheCityYears) {
|
||||
try {
|
||||
// // 直接显示对话框,移除有问题的 FragmentTransaction
|
||||
// this.dismissAllowingStateLoss(); // 使用 dismissAllowingStateLoss 更安全
|
||||
//
|
||||
FragmentManager fm = getParentFragmentManager();
|
||||
if (fm != null && !fm.isDestroyed()) {
|
||||
|
||||
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
||||
"11", roomId, "", "", "");
|
||||
newDialog.show(fm, "GiftLotteryDialog");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("RoomGiftDialogFragment", "Error in showGiftLotteryDialog", e);
|
||||
ToastUtils.show("操作失败,请重试");
|
||||
}
|
||||
} else if (bean.getType() == RoomSettingBean.QXRoomSettingTypeRoomTimeSpace) {
|
||||
try {
|
||||
// // 直接显示对话框,移除有问题的 FragmentTransaction
|
||||
// this.dismissAllowingStateLoss(); // 使用 dismissAllowingStateLoss 更安全
|
||||
//
|
||||
FragmentManager fm = getParentFragmentManager();
|
||||
if (fm != null && !fm.isDestroyed()) {
|
||||
|
||||
GiftLotteryDialog newDialog = GiftLotteryDialog.newInstance(
|
||||
"12", roomId, "", "", "");
|
||||
newDialog.show(fm, "GiftLotteryDialog");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.e("RoomGiftDialogFragment", "Error in showGiftLotteryDialog", e);
|
||||
ToastUtils.show("操作失败,请重试");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
// TODO: 2025/8/29 房间切换提示框
|
||||
@@ -792,7 +636,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
}
|
||||
if (type >= RoomSettingBean.QXRoomSettingTypeRoomLeave &&
|
||||
type <= RoomSettingBean.QXRoomSettingTypeRoomReport || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingRed || type == RoomSettingBean.QXRoomSettingTypeRoomTheCityYears ||
|
||||
type == QXRoomSettingTypeRoomTimeSpace || type == QXRoomSettingTypeRoomTimeRedSound) {
|
||||
type == QXRoomSettingTypeRoomTimeSpace || type == QXRoomSettingTypeRoomTimeRedSound || type == QXRoomSettingTypeRoomBusinessLegend) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -814,7 +658,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomReport ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomFloatingRed ||
|
||||
type == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen
|
||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomTheCityYears || type == QXRoomSettingTypeRoomTimeSpace || type == QXRoomSettingTypeRoomTimeRedSound;
|
||||
|| type == RoomSettingBean.QXRoomSettingTypeRoomTheCityYears || type == QXRoomSettingTypeRoomTimeSpace || type == QXRoomSettingTypeRoomTimeRedSound || type == QXRoomSettingTypeRoomBusinessLegend;
|
||||
}
|
||||
|
||||
|
||||
@@ -890,24 +734,33 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
@Override
|
||||
public void blindBoxStatus(List<BlindBoxStatus> blindBoxStatus) {
|
||||
if (blindBoxStatus != null && !blindBoxStatus.isEmpty()) {
|
||||
RoomSettingBean moreParent = new RoomSettingBean("活动", null, null, null, -1, read, isSelected, true, false);
|
||||
List<RoomSettingBean> moreChildren = new ArrayList<>();
|
||||
for (int i = 0; i < blindBoxStatus.size(); i++) {
|
||||
int giftBagId = blindBoxStatus.get(i).getGift_bag_id();
|
||||
int status = blindBoxStatus.get(i).getStatus();
|
||||
for (int j = 0; j < filteredList.size(); j++) {
|
||||
for (int k = 0; k < filteredList.get(j).getChildren().size(); k++) {
|
||||
|
||||
if ((giftBagId == 11 && filteredList.get(j).getChildren().get(k).getType() == RoomSettingBean.QXRoomSettingTypeRoomTheCityYears) ||
|
||||
(giftBagId == 12 && filteredList.get(j).getChildren().get(k).getType() == RoomSettingBean.QXRoomSettingTypeRoomTimeSpace)) {
|
||||
if (status != 1) {
|
||||
filteredList.get(j).getChildren().remove(k);
|
||||
}else {
|
||||
if (SpUtil.getShelf() == 1) {
|
||||
filteredList.get(j).getChildren().remove(k);
|
||||
}
|
||||
}
|
||||
if (giftBagId == 11) {
|
||||
if (status == 1) {
|
||||
moreChildren.add(new RoomSettingBean("岁月之城", "the_city_years", null, null, RoomSettingBean.QXRoomSettingTypeRoomTheCityYears, read, isSelected, true, false));
|
||||
}
|
||||
} else if (giftBagId == 12) {
|
||||
if (status == 1) {
|
||||
moreChildren.add(new RoomSettingBean("时空之巅", "time_space", null, null, QXRoomSettingTypeRoomTimeSpace, read, isSelected, true, false));
|
||||
}
|
||||
}else if (giftBagId == 60) {
|
||||
if (status == 1) {
|
||||
moreChildren.add(new RoomSettingBean("炼仙传说", "legend", null, null, QXRoomSettingTypeRoomBusinessLegend, read, isSelected, true, redSound));
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// if (status == 1) {
|
||||
// moreChildren.add(new RoomSettingBean("炼仙传说", "legend", null, null, QXRoomSettingTypeRoomBusinessLegend, read, isSelected, true, redSound));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
moreParent.setChildren(moreChildren);
|
||||
filteredList.add(moreParent);
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
mBinding.tvGh.setVisibility(GONE);
|
||||
mBinding.tvJoinGuild.setVisibility(GONE);
|
||||
}
|
||||
mBinding.tvTs.setText(String.format("90天内累计收到 %s 个礼物", userInfo.getGift_num()));
|
||||
mBinding.tvTs.setText(String.format("累计收到 %s 个礼物", userInfo.getGift_num()));
|
||||
|
||||
mBinding.tvJoinGuild.setOnClickListener(v -> {
|
||||
//跳转加入公会
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.yuyin.module_live.ui.baoxiang5
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.google.android.gms.common.api.ApiException
|
||||
import com.voice.lib_base.base.dialog.BaseFragmentDialog
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity
|
||||
import com.xscm.modulemain.activity.room.presenter.RoomViewModel
|
||||
import com.xscm.modulemain.databinding.DialogInputMultipleBinding
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterInfoBean
|
||||
|
||||
class BoxInputMultipleDialog() :
|
||||
BaseFragmentDialog<DialogInputMultipleBinding>(R.layout.dialog_input_multiple) {
|
||||
|
||||
lateinit var viewModel: RoomViewModel
|
||||
lateinit var liveActivity: RoomActivity
|
||||
var onSelectResultListener: OnSelectResultListener? = null
|
||||
var multiple = ""
|
||||
var numMultiple = 1
|
||||
var name = ""
|
||||
private var money = ""
|
||||
private lateinit var monsterInfoBean: MonsterInfoBean
|
||||
|
||||
constructor(multiple: String, name: String, onSelectResultListener: OnSelectResultListener, liveActivity: RoomActivity, monsterInfoBean:MonsterInfoBean) : this() {
|
||||
this.onSelectResultListener = onSelectResultListener
|
||||
this.multiple = multiple
|
||||
this.name = name
|
||||
this.liveActivity=liveActivity
|
||||
this.monsterInfoBean=monsterInfoBean
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
// viewModel = liveActivity.viewModel
|
||||
viewModel = ViewModelProviders.of(this)[RoomViewModel::class.java]
|
||||
viewModel.getMoneyData()
|
||||
viewModel.moneyBean.observe(liveActivity) {
|
||||
money = it.coin
|
||||
// if (ClickUtil.canClickRoom()) {
|
||||
// viewModel.get_monster_info_box()
|
||||
// }
|
||||
|
||||
monsterInfoBean.let {
|
||||
updateTextViews(it)
|
||||
}
|
||||
}
|
||||
// viewModel.monsterInfo.observe(liveActivity) {
|
||||
// updateTextViews(it)
|
||||
// }
|
||||
|
||||
viewModel.getError().observe(liveActivity) {
|
||||
if (it is ApiException) {
|
||||
}
|
||||
}
|
||||
setupMultipleImages()
|
||||
setupRecyclerView()
|
||||
setupClickListeners()
|
||||
}
|
||||
|
||||
private fun setupClickListeners() {
|
||||
mBinding.minus.setOnClickListener {
|
||||
updateNumber(-numMultiple)
|
||||
}
|
||||
|
||||
mBinding.add.setOnClickListener {
|
||||
updateNumber(numMultiple)
|
||||
}
|
||||
|
||||
mBinding.btnConfirm.setOnClickListener {
|
||||
onSelectResultListener?.result(mBinding.number.text.toString(), this)
|
||||
}
|
||||
|
||||
mBinding.btnCancel.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
mBinding.rvContainer.itemAnimator = null
|
||||
mBinding.rvContainer.layoutManager = GridLayoutManager(requireContext(), 3)
|
||||
val adapter = BoxInputMultipleAdapter()
|
||||
adapter.setNewData(arrayListOf("1","10", "20", "30", "50", "100"))
|
||||
adapter.setOnItemClickListener { _, _, position ->
|
||||
adapter.setSelectPosition(position)
|
||||
mBinding.number.setText(adapter.data[position])
|
||||
numMultiple = adapter.data[position].toInt()
|
||||
updateIntegralText()
|
||||
}
|
||||
mBinding.rvContainer.adapter = adapter
|
||||
mBinding.number.setText(adapter.data[0])
|
||||
}
|
||||
|
||||
private fun updateIntegralText() {
|
||||
val num = mBinding.number.text.toString().ifEmpty { "0" }.toIntOrNull() ?: 0
|
||||
viewModel.monsterInfo.value?.let {
|
||||
mBinding.tvIntegral.text = "金币${(num * it.open_monster_price.toInt())}/$money"
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateTextViews(info: MonsterInfoBean) {
|
||||
mBinding.tvTextNum.text = "${info.open_monster_price}金币/次"
|
||||
mBinding.tvIntegral.text = "金币${(10 * info.open_monster_price.toInt())}/$money"
|
||||
}
|
||||
|
||||
private fun setupMultipleImages() {
|
||||
when (multiple) {
|
||||
"1" -> setMultipleImage("玉狮子", R.mipmap.anim_wealth1)
|
||||
"2" -> setMultipleImage("乌骓马", R.mipmap.anim_wealth2)
|
||||
"3" -> setMultipleImage("追风驹", R.mipmap.anim_wealth3)
|
||||
"4" -> setMultipleImage("乌云驹", R.mipmap.anim_wealth4)
|
||||
"5" -> setMultipleImage("黄彪马", R.mipmap.anim_wealth5)
|
||||
"6" -> setMultipleImage("青鬃马", R.mipmap.anim_wealth6)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setMultipleImage(title: String, resourceId: Int) {
|
||||
mBinding.tvTitle.text = title
|
||||
mBinding.ivCover.setImageResource(resourceId)
|
||||
}
|
||||
|
||||
private fun updateNumber(delta: Int) {
|
||||
val num = mBinding.number.text.toString().ifEmpty { "0" }.toIntOrNull() ?: 0
|
||||
val newNum = maxOf(num + delta, 0)
|
||||
mBinding.number.setText(newNum.toString())
|
||||
updateIntegralText()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class BoxInputMultipleAdapter() :
|
||||
BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_box_select_multiple) {
|
||||
|
||||
private var selectPosition = 0
|
||||
|
||||
fun setSelectPosition(index: Int) {
|
||||
notifyItemChanged(selectPosition)
|
||||
notifyItemChanged(index)
|
||||
selectPosition = index
|
||||
}
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: String?) {
|
||||
val isSelect = helper.layoutPosition == selectPosition
|
||||
helper.getView<TextView>(R.id.item_main).isSelected = isSelect
|
||||
helper.setText(R.id.item_main, item)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface OnSelectResultListener {
|
||||
fun result(num: String, dialog: BoxInputMultipleDialog)
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.xscm.modulemain.dialog.refining
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.xscm.moduleutil.base.BaseBottomFragmentDialog
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.presenter.RoomViewModel
|
||||
import com.xscm.modulemain.adapter.refining.BoxJackpotListAdapter2
|
||||
import com.xscm.modulemain.databinding.DialogBoxJackpot2Binding
|
||||
/**
|
||||
* @Author qx
|
||||
* @Time 2026/1/28 10:11
|
||||
* @Description 炼仙传说奖池
|
||||
*/
|
||||
class BoxJackpotDialog2 :
|
||||
BaseBottomFragmentDialog<DialogBoxJackpot2Binding>(R.layout.dialog_box_jackpot2) {
|
||||
|
||||
val boxJackpotListAdapter2 = BoxJackpotListAdapter2()
|
||||
lateinit var viewModel: RoomViewModel
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
viewModel = ViewModelProviders.of(this)[RoomViewModel::class.java]
|
||||
|
||||
mBinding.rvContainer.layoutManager= GridLayoutManager(context, 3)
|
||||
mBinding.rvContainer.adapter=boxJackpotListAdapter2
|
||||
viewModel.get_monster_box_list()
|
||||
viewModel.jiangChiBean.observe(this) {
|
||||
boxJackpotListAdapter2.setNewData(it)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
package com.xscm.modulemain.dialog.refining
|
||||
|
||||
import android.content.DialogInterface
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.blankj.utilcode.util.LogUtils
|
||||
import com.xscm.moduleutil.base.BaseBottomFragmentDialog
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity
|
||||
import com.xscm.modulemain.activity.room.presenter.RoomViewModel
|
||||
import com.xscm.modulemain.databinding.DialogBoxMain2Binding
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterEndBean
|
||||
import com.xscm.moduleutil.bean.room.refining.MonsterInfoBean
|
||||
import com.xscm.moduleutil.bean.room.refining.OpenMonsterBean
|
||||
import com.xscm.moduleutil.utils.CountDownUtil
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.yuyin.module_live.ui.baoxiang5.BoxInputMultipleDialog
|
||||
import com.yuyin.module_live.ui.baoxiang5.BoxRankDialog2
|
||||
import com.yuyin.module_live.ui.baoxiang5.OnSelectResultListener
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.cancel
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
/**
|
||||
* @Author qx
|
||||
* @Time 2026/1/28 10:08
|
||||
* @Description 炼仙传说游戏主页面
|
||||
*/
|
||||
class BoxMainDialog2() : BaseBottomFragmentDialog<DialogBoxMain2Binding>(R.layout.dialog_box_main2) {
|
||||
|
||||
private lateinit var liveActivity: RoomActivity
|
||||
|
||||
constructor(liveActivity: RoomActivity) : this() {
|
||||
this.liveActivity = liveActivity
|
||||
}
|
||||
|
||||
|
||||
private lateinit var viewModel: RoomViewModel
|
||||
|
||||
private var timeDownScope: CoroutineScope? = null
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
viewModel = ViewModelProviders.of(this)[RoomViewModel::class.java]
|
||||
EventBus.getDefault().register(this)
|
||||
viewModel.getMoneyData()
|
||||
viewModel.moneyBean.observe(this) {
|
||||
mBinding.tvYue.text = it.coin
|
||||
}
|
||||
viewModel.get_monster_info_box()
|
||||
viewModel.monsterInfo.observe(this) {
|
||||
LogUtils.e("倒计时时间22:${it.surplus_time}")
|
||||
refreshData(it)
|
||||
}
|
||||
|
||||
|
||||
mBinding.GuiZe.setOnClickListener {
|
||||
if (this::liveActivity.isInitialized){
|
||||
BoxRuleDialog2().show(liveActivity.supportFragmentManager, "规则2")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.ZJiLu.setOnClickListener {
|
||||
if (this::liveActivity.isInitialized){
|
||||
BoxRankDialog2().show(liveActivity.supportFragmentManager, "榜单")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
mBinding.record.setOnClickListener {
|
||||
if (this::liveActivity.isInitialized){
|
||||
BoxRecordDialog2(liveActivity).show(liveActivity.supportFragmentManager, "记录2")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.JiangChi.setOnClickListener {
|
||||
if (this::liveActivity.isInitialized){
|
||||
BoxJackpotDialog2().show(liveActivity.supportFragmentManager, "奖池2")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mBinding.btnConfirm.setOnClickListener {
|
||||
mBinding.llResult.visibility = View.GONE
|
||||
}
|
||||
|
||||
mBinding.btnConfirmFaile.setOnClickListener {
|
||||
mBinding.llFial.visibility = View.GONE
|
||||
}
|
||||
|
||||
mBinding.dialogMain.setOnClickListener {
|
||||
if (mBinding.llFial.isVisible) {
|
||||
mBinding.llFial.visibility = View.GONE
|
||||
} else if (mBinding.llResult.isVisible) {
|
||||
mBinding.llResult.visibility = View.GONE
|
||||
} else {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.constraint.setOnClickListener { }
|
||||
|
||||
|
||||
mBinding.llFial.setOnClickListener {
|
||||
mBinding.llFial.visibility = View.GONE
|
||||
}
|
||||
|
||||
mBinding.tvYue.setOnClickListener {
|
||||
// ARouter.getInstance().build(AroutUtil.MAIN_MY_MONEY).navigation()
|
||||
}
|
||||
|
||||
viewModel.openBeatMonster.observe(this) {
|
||||
mBinding.tvYue.text = it.integral
|
||||
when (it.type) {
|
||||
"1" -> {
|
||||
mBinding.tvMultiple1.text = "已投入:${it.num}"
|
||||
}
|
||||
|
||||
"2" -> {
|
||||
mBinding.tvMultiple2.text = "已投入:${it.num}"
|
||||
}
|
||||
|
||||
"3" -> {
|
||||
mBinding.tvMultiple3.text = "已投入:${it.num}"
|
||||
}
|
||||
|
||||
"4" -> {
|
||||
mBinding.tvMultiple4.text = "已投入:${it.num}"
|
||||
}
|
||||
|
||||
"5" -> {
|
||||
mBinding.tvMultiple5.text = "已投入:${it.num}"
|
||||
}
|
||||
"6" -> {
|
||||
mBinding.tvMultiple6.text = "已投入:${it.num}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun showBoxInputMultipleDialog(tag: String, multiple: String) {
|
||||
viewModel.monsterInfo.value?.let {
|
||||
BoxInputMultipleDialog(multiple, tag, object : OnSelectResultListener {
|
||||
override fun result(num: String, dialog: BoxInputMultipleDialog) {
|
||||
viewModel.open_beat_monster(liveActivity.roomId, multiple, num)
|
||||
dialog.dismiss()
|
||||
}
|
||||
}, liveActivity, it).show(liveActivity.supportFragmentManager, tag)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Subscribe // 开始抽奖
|
||||
fun monsterInfo(monsterInfoBean: MonsterInfoBean) {
|
||||
refreshData(monsterInfoBean)
|
||||
}
|
||||
|
||||
@Subscribe // 个人抽奖播报
|
||||
fun openMonster(openMonster: OpenMonsterBean) {
|
||||
if (openMonster.is_win == 1) {
|
||||
mBinding.llResult.visibility = View.VISIBLE
|
||||
mBinding.tvTypeName.text = "中奖:${openMonster.type_name}"
|
||||
ImageUtils.loadHead(openMonster.base_image,mBinding.ivGift)
|
||||
// GlideUtil.loadImglogo(requireContext(), openMonster.base_image, mBinding.ivGift)
|
||||
mBinding.tvGiftName.text = openMonster.gift_name+"*"+openMonster.num
|
||||
mBinding.tvGiftPrice.text = openMonster.gift_price
|
||||
} else {
|
||||
mBinding.tvTypeName2.text = "中奖:${openMonster.type_name}"
|
||||
mBinding.llFial.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Subscribe // 抽奖结束播报
|
||||
fun monsterEnd(monsterEnd: MonsterEndBean) {
|
||||
if (monsterEnd.is_finsh == 1) {
|
||||
// mBinding.tvTypeName2.text = "中奖财神:${monsterEnd.win_type_name}"
|
||||
// mBinding.llFial.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun refreshData(monsterInfo: MonsterInfoBean) {
|
||||
mBinding.llFial.visibility = View.GONE
|
||||
mBinding.llResult.visibility = View.GONE
|
||||
val investedText = "已投入:"
|
||||
val multipleList = monsterInfo.multiple_list.orEmpty()
|
||||
|
||||
multipleList.take(6).forEachIndexed { index, item ->
|
||||
val num = item.num
|
||||
when (index) {
|
||||
0 -> {
|
||||
mBinding.tvMultiple1.text = "$investedText$num"
|
||||
mBinding.tvMul1.text = "x${item.multiple}倍"
|
||||
mBinding.textView1.text = item.type_name
|
||||
mBinding.tvMultiple1.setOnClickListener { showBoxInputMultipleDialog(item.type_name, "1") }
|
||||
}
|
||||
1 -> {
|
||||
mBinding.tvMultiple2.text = "$investedText$num"
|
||||
mBinding.tvMul2.text = "x${item.multiple}倍"
|
||||
mBinding.textView2.text = item.type_name
|
||||
mBinding.tvMultiple2.setOnClickListener { showBoxInputMultipleDialog(item.type_name, "2") }
|
||||
}
|
||||
2 ->{
|
||||
mBinding.tvMultiple3.text = "$investedText$num"
|
||||
mBinding.tvMul3.text = "x${item.multiple}倍"
|
||||
mBinding.textView3.text = item.type_name
|
||||
mBinding.tvMultiple3.setOnClickListener { showBoxInputMultipleDialog(item.type_name, "3") }
|
||||
}
|
||||
3 ->{
|
||||
mBinding.tvMultiple4.text = "$investedText$num"
|
||||
mBinding.tvMul4.text = "x${item.multiple}倍"
|
||||
mBinding.textView4.text = item.type_name
|
||||
mBinding.tvMultiple4.setOnClickListener { showBoxInputMultipleDialog(item.type_name, "4") }
|
||||
}
|
||||
4 ->{
|
||||
mBinding.tvMultiple5.text = "$investedText$num"
|
||||
mBinding.tvMul5.text = "x${item.multiple}倍"
|
||||
mBinding.textView5.text = item.type_name
|
||||
mBinding.tvMultiple5.setOnClickListener { showBoxInputMultipleDialog(item.type_name, "5") }
|
||||
}
|
||||
5 ->{
|
||||
mBinding.tvMultiple6.text = "$investedText$num"
|
||||
mBinding.tvMul6.text = "x${item.multiple}倍"
|
||||
mBinding.textView6.text = item.type_name
|
||||
mBinding.tvMultiple6.setOnClickListener { showBoxInputMultipleDialog(item.type_name, "6") }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
timeDownScope?.cancel()
|
||||
LogUtils.e("倒计时时间:${monsterInfo.surplus_time}")
|
||||
CountDownUtil.countDown(lifecycleScope, monsterInfo.surplus_time, { scope ->
|
||||
timeDownScope = scope
|
||||
}, {
|
||||
|
||||
}, {
|
||||
mBinding.tvCountDownTime.text =
|
||||
"倒计时:${CountDownUtil.formatCountDownTime(it.toLong())}"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
override fun onDismiss(dialog: DialogInterface) {
|
||||
if (mBinding.llFial.isVisible) {
|
||||
mBinding.llFial.visibility = View.GONE
|
||||
} else if (mBinding.llResult.isVisible) {
|
||||
mBinding.llResult.visibility = View.GONE
|
||||
} else {
|
||||
super.onDismiss(dialog)
|
||||
EventBus.getDefault().unregister(this)
|
||||
timeDownScope?.cancel()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.yuyin.module_live.ui.baoxiang5
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
|
||||
import com.xscm.moduleutil.base.BaseBottomFragmentDialog
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.presenter.RoomViewModel
|
||||
import com.xscm.modulemain.adapter.refining.BoxRankListAdapter2
|
||||
import com.xscm.modulemain.databinding.DialogBoxRank2Binding
|
||||
/**
|
||||
* @Author qx
|
||||
* @Time 2026/1/28 10:09
|
||||
* @Description 炼仙传说榜单
|
||||
*/
|
||||
class BoxRankDialog2 : BaseBottomFragmentDialog<DialogBoxRank2Binding>(R.layout.dialog_box_rank2) {
|
||||
lateinit var viewModel: RoomViewModel
|
||||
|
||||
var boxRankListAdapter2 = BoxRankListAdapter2()
|
||||
|
||||
var page = 1
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
viewModel = ViewModelProviders.of(this)[RoomViewModel::class.java]
|
||||
mBinding.rvContainer.layoutManager = LinearLayoutManager(context)
|
||||
mBinding.rvContainer.adapter = boxRankListAdapter2
|
||||
|
||||
mBinding.smartRefresh.setOnRefreshLoadMoreListener(object : OnRefreshLoadMoreListener {
|
||||
override fun onRefresh(refreshLayout: RefreshLayout) {
|
||||
page = 1
|
||||
viewModel.get_user_monster_log(page.toString())
|
||||
|
||||
}
|
||||
|
||||
override fun onLoadMore(refreshLayout: RefreshLayout) {
|
||||
page++
|
||||
viewModel.get_user_monster_log(page.toString())
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
viewModel.get_user_monster_log(page.toString())
|
||||
viewModel.monsterUserLogList.observe(this) {
|
||||
mBinding.smartRefresh.finishRefresh()
|
||||
mBinding.smartRefresh.finishLoadMore()
|
||||
if (page == 1) {
|
||||
boxRankListAdapter2.setNewData(it)
|
||||
} else {
|
||||
boxRankListAdapter2.addData(it)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.xscm.modulemain.dialog.refining
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
|
||||
import com.xscm.moduleutil.base.BaseBottomFragmentDialog
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.activity.RoomActivity
|
||||
import com.xscm.modulemain.activity.room.presenter.RoomViewModel
|
||||
import com.xscm.modulemain.adapter.refining.BoxRecordListAdapter2
|
||||
import com.xscm.modulemain.databinding.DialogBoxRecord2Binding
|
||||
/**
|
||||
* @Author qx
|
||||
* @Time 2026/1/28 10:10
|
||||
* @Description 炼仙传说记录
|
||||
*/
|
||||
class BoxRecordDialog2() :
|
||||
BaseBottomFragmentDialog<DialogBoxRecord2Binding>(R.layout.dialog_box_record2) {
|
||||
|
||||
lateinit var liveActivity: RoomActivity
|
||||
lateinit var viewModel: RoomViewModel
|
||||
|
||||
var page = 1
|
||||
var boxRecordListAdapter2 = BoxRecordListAdapter2()
|
||||
|
||||
|
||||
constructor(liveActivity: RoomActivity) : this() {
|
||||
this.liveActivity = liveActivity
|
||||
}
|
||||
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
viewModel = ViewModelProviders.of(this)[RoomViewModel::class.java]
|
||||
mBinding.rvContainer.layoutManager = LinearLayoutManager(context)
|
||||
mBinding.rvContainer.adapter= boxRecordListAdapter2
|
||||
|
||||
mBinding.smartRefresh.setOnRefreshLoadMoreListener(object : OnRefreshLoadMoreListener {
|
||||
override fun onRefresh(refreshLayout: RefreshLayout) {
|
||||
page = 1
|
||||
viewModel.get_monster_log(page.toString())
|
||||
|
||||
}
|
||||
|
||||
override fun onLoadMore(refreshLayout: RefreshLayout) {
|
||||
page++
|
||||
viewModel.get_monster_log(page.toString())
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
viewModel.get_monster_log(page.toString())
|
||||
|
||||
viewModel.monsterLog.observe(this) {
|
||||
mBinding.smartRefresh.finishRefresh()
|
||||
mBinding.smartRefresh.finishLoadMore()
|
||||
if (page == 1) {
|
||||
boxRecordListAdapter2.setNewData(it)
|
||||
} else {
|
||||
boxRecordListAdapter2.addData(it)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.xscm.modulemain.dialog.refining
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import com.xscm.moduleutil.base.BaseBottomFragmentDialog
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.activity.room.presenter.RoomViewModel
|
||||
import com.xscm.modulemain.databinding.DialogBoxRule2Binding
|
||||
/**
|
||||
* @Author qx
|
||||
* @Time 2026/1/28 10:08
|
||||
* @Description 炼仙传说规则页面
|
||||
*/
|
||||
class BoxRuleDialog2 : BaseBottomFragmentDialog<DialogBoxRule2Binding>(R.layout.dialog_box_rule2) {
|
||||
lateinit var viewModel: RoomViewModel
|
||||
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
viewModel = ViewModelProviders.of(this)[RoomViewModel::class.java]
|
||||
viewModel.get_monster_note_box()
|
||||
viewModel.monsterNote.observe(this) {
|
||||
mBinding.tvContent.text = it
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
26
MainModule/src/main/res/layout/dialog_box_jackpot2.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="580dp"
|
||||
android:background="@mipmap/box_bg5">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="110dp"
|
||||
android:layout_marginBottom="40dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
529
MainModule/src/main/res/layout/dialog_box_main2.xml
Normal file
@@ -0,0 +1,529 @@
|
||||
<?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:id="@+id/dialog_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="608dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@mipmap/box_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/GuiZe"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@mipmap/baoxiang_item_zuize"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/JiangChi" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/JiangChi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:src="@mipmap/baoxiang_item_jiangchi"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ZJiLu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@mipmap/baoxiang_item_jilu"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/record"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@mipmap/baoxiang_item_record"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ZJiLu" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_multiple5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/cishu_bg1"
|
||||
android:gravity="center"
|
||||
android:text="未投入"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth5"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth5"
|
||||
app:layout_constraintTop_toBottomOf="@id/anim_wealth5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_multiple2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/cishu_bg1"
|
||||
android:gravity="center"
|
||||
android:text="未投入"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anim_wealth2"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth2"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_multiple4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/cishu_bg1"
|
||||
android:gravity="center"
|
||||
android:text="未投入"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth4"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth4"
|
||||
app:layout_constraintTop_toBottomOf="@id/anim_wealth4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_multiple1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/cishu_bg1"
|
||||
android:gravity="center"
|
||||
android:text="未投入"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth1"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth1"
|
||||
app:layout_constraintTop_toBottomOf="@id/anim_wealth1" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_multiple3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/cishu_bg1"
|
||||
android:gravity="center"
|
||||
android:text="未投入"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth3"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anim_wealth3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_multiple6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/cishu_bg1"
|
||||
android:gravity="center"
|
||||
android:text="未投入"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@+id/anim_wealth6"
|
||||
app:layout_constraintStart_toStartOf="@+id/anim_wealth6"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anim_wealth6" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anim_wealth6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/anim_wealth6"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_mul4" />
|
||||
<ImageView
|
||||
android:id="@+id/anim_wealth4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/anim_wealth4"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/GuiZe" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anim_wealth1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:src="@mipmap/anim_wealth1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/anim_wealth5"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_multiple5" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anim_wealth2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/anim_wealth2"
|
||||
android:layout_marginTop="20dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_multiple6" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anim_wealth3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@mipmap/anim_wealth3"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/anim_wealth4"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_multiple4" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anim_wealth5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/anim_wealth5"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/record" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count_down_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/daojishi_bg"
|
||||
android:gravity="center"
|
||||
tools:text="倒计时: 00:00"
|
||||
android:textColor="#F6F6F6"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/GuiZe"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/bg_box2_balance"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_multiple2">
|
||||
|
||||
<com.xscm.moduleutil.widget.ShapeRedTextView
|
||||
android:id="@+id/tv_yue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:drawablePadding="5dp"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="666666" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="玉狮子"
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_multiple1"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_multiple1"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_multiple1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_multiple2"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_multiple2"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_multiple2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_multiple5"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_multiple5"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_multiple5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/anim_wealth3"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth3"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth4"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth4"
|
||||
app:layout_constraintBottom_toBottomOf="@id/anim_wealth4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_multiple6"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_multiple6"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_multiple6" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mul1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="玉狮子"
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_multiple1"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_multiple1"
|
||||
app:layout_constraintTop_toTopOf="@+id/anim_wealth1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mul2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="乌骓马"
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_multiple2"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_multiple2"
|
||||
app:layout_constraintTop_toTopOf="@+id/anim_wealth2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mul5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="乌云驹"
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_multiple5"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_multiple5"
|
||||
app:layout_constraintTop_toTopOf="@+id/anim_wealth5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mul3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="追风驹"
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth3"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth3"
|
||||
app:layout_constraintTop_toTopOf="@+id/anim_wealth3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mul4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="青鬃马"
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="@id/anim_wealth4"
|
||||
app:layout_constraintRight_toRightOf="@id/anim_wealth4"
|
||||
app:layout_constraintTop_toTopOf="@+id/anim_wealth4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mul6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="黄彪马"
|
||||
android:textColor="#FFBB49"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_multiple6"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_multiple6"
|
||||
app:layout_constraintTop_toTopOf="@+id/anim_wealth6" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_result"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:background="@mipmap/box_success"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/constraint"
|
||||
app:layout_constraintTop_toTopOf="@id/constraint"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="148dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="9999"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@mipmap/bg_box2_confirm"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_fial"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:background="@mipmap/box_fail"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/constraint"
|
||||
app:layout_constraintTop_toTopOf="@id/constraint"
|
||||
tools:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="100dp"
|
||||
android:src="@mipmap/box_fail1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="很遗憾,下次再来吧~" />
|
||||
|
||||
<com.xscm.moduleutil.widget.ShapeRedTextView
|
||||
android:id="@+id/tv_type_name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="30dp"
|
||||
android:paddingHorizontal="18dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
tools:text="探险神兽:远古神龙" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm_faile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@mipmap/bg_box2_confirm" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
31
MainModule/src/main/res/layout/dialog_box_rank2.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="580dp"
|
||||
android:background="@mipmap/box_bg2">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="110dp"
|
||||
android:layout_marginBottom="40dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
31
MainModule/src/main/res/layout/dialog_box_record2.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="580dp"
|
||||
android:background="@mipmap/box_bg4">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="110dp"
|
||||
android:layout_marginBottom="40dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
33
MainModule/src/main/res/layout/dialog_box_rule2.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="580dp"
|
||||
android:background="@mipmap/box_bg3">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="110dp"
|
||||
android:layout_marginBottom="40dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
163
MainModule/src/main/res/layout/dialog_input_multiple.xml
Normal file
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:background="@mipmap/box_bg1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="150dp"
|
||||
android:text="东路财神"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@mipmap/ic_launcher_app" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="选择次数"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="3"
|
||||
tools:itemCount="5"
|
||||
tools:listitem="@layout/item_box_select_multiple" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_weight="1"
|
||||
android:text="本次次数"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/minus"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/ic_box_multiple_minus" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/number"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="#00000000"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:text="0"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="63dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/ic_box_multiple_add" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_integral"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="17dp"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text=""
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:gravity="center">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@mipmap/bg_box2_cancel"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@mipmap/bg_box2_confirm"
|
||||
android:gravity="center" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -367,7 +367,7 @@
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:drawableEnd="@mipmap/room_rig_jt"
|
||||
android:text="90天内累计收到200个礼物"
|
||||
android:text="累计收到200个礼物"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
|
||||
61
MainModule/src/main/res/layout/item_box_jackpot_list2.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?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">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="12dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gift"
|
||||
android:layout_width="95dp"
|
||||
android:layout_height="95dp"
|
||||
android:background="@mipmap/box_gift"
|
||||
android:gravity="center"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/gift" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginTop="3dp"
|
||||
android:textColor="#333333"
|
||||
android:drawablePadding="3dp"
|
||||
android:gravity="center"
|
||||
android:drawableLeft="@mipmap/jinb"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
60
MainModule/src/main/res/layout/item_box_rank_list2.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
tools:background="#80000000">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_result"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="第1206期 中了果汁(50)*20"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="2024-11-25 11:25"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_result"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_result" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_type_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="中奖神兽:白虎"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_time"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_time" />
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#80FFFFFF"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
57
MainModule/src/main/res/layout/item_box_record_list2.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
tools:background="#80000000">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_result"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="第1206期 中奖神兽 白虎 未参与"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="2024-11-25 11:25"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_result"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_result" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_join"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="2024-11-25 11:25"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_result" />
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="#80FFFFFF"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
19
MainModule/src/main/res/layout/item_box_select_multiple.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/item_main"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:gravity="center"
|
||||
android:text="100"
|
||||
android:background="@drawable/selector_box_multiple"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white">
|
||||
|
||||
</TextView>
|
||||
</layout>
|
||||
BIN
MainModule/src/main/res/mipmap-xxhdpi/anim_wealth1.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/anim_wealth2.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/anim_wealth3.webp
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/anim_wealth4.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/anim_wealth5.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/anim_wealth6.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/baoxiang_item_jilu.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/baoxiang_item_record.webp
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/baoxiang_item_zuize.webp
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/bg_box2_balance.webp
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/bg_box2_cancel.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/bg_box2_confirm.webp
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_bg.webp
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_bg1.webp
Normal file
|
After Width: | Height: | Size: 802 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_bg2.webp
Normal file
|
After Width: | Height: | Size: 648 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_bg3.webp
Normal file
|
After Width: | Height: | Size: 650 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_bg4.webp
Normal file
|
After Width: | Height: | Size: 650 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_bg5.webp
Normal file
|
After Width: | Height: | Size: 644 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_fail.webp
Normal file
|
After Width: | Height: | Size: 647 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_fail1.webp
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_gift.webp
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/box_success.webp
Normal file
|
After Width: | Height: | Size: 645 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/cishu_bg1.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/daojishi_bg.webp
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/ic_box_multiple_add.webp
Normal file
|
After Width: | Height: | Size: 666 B |
BIN
MainModule/src/main/res/mipmap-xxhdpi/ic_box_multiple_minus.webp
Normal file
|
After Width: | Height: | Size: 774 B |
11
app/proguard-rules.pro
vendored
@@ -984,7 +984,18 @@ public static java.lang.String TABLENAME;
|
||||
-keep class com.xscm.moduleutil.utils.cos.Credentials {
|
||||
*;
|
||||
}
|
||||
# 保留 ViewBinding 相关类
|
||||
-keep class * implements androidx.viewbinding.ViewBinding { *; }
|
||||
-keep class * extends androidx.viewbinding.ViewBinding { *; }
|
||||
|
||||
|
||||
# 保留 DataBinding
|
||||
-keep class androidx.databinding.** { *; }
|
||||
-keep class * extends androidx.databinding.ViewDataBinding { *; }
|
||||
|
||||
# 保留你的基类和子类
|
||||
-keep class com.xscm.moduleutil.base.** { *; }
|
||||
-keep class * extends com.xscm.moduleutil.base.BaseBottomFragmentDialog { *; }
|
||||
# 保留核心属性,确保mapping.txt记录完整
|
||||
-keepattributes SourceFile,LineNumberTable,InnerClasses,LocalVariableTable,LocalVariableTypeTable
|
||||
# 隐藏真实源文件名(可选,不影响还原,仅保护源码信息)
|
||||
|
||||
@@ -28,8 +28,8 @@ isBuildModule=false
|
||||
#org.gradle.deamon=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.0.9.7
|
||||
APP_VERSION_CODE=87
|
||||
APP_VERSION_NAME=1.0.9.8
|
||||
APP_VERSION_CODE=88
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
|
||||