feat : 优化首页 banner 加载
This commit is contained in:
@@ -7,7 +7,6 @@ import android.view.WindowManager
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chwl.app.BuildConfig
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.bean.LuckyBagGiftBody
|
||||
import com.chwl.app.avroom.bean.LuckyBagGiftItemBody
|
||||
@@ -22,8 +21,10 @@ import com.chwl.app.databinding.ItemRoomLuckyBagTimeBinding
|
||||
import com.chwl.app.ui.pay.ChargeActivity
|
||||
import com.chwl.app.ui.utils.loadAvatar
|
||||
import com.chwl.app.ui.utils.loadImage
|
||||
import com.chwl.app.ui.webview.DialogWebViewActivity
|
||||
import com.chwl.app.utils.KeyBoardUtils
|
||||
import com.chwl.app.utils.RoomHelperManager
|
||||
import com.chwl.core.UriProvider
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.bean.response.ServiceResult
|
||||
import com.chwl.core.gift.GiftModel
|
||||
@@ -119,10 +120,10 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
|
||||
R.id.down -> {
|
||||
if (position.isVerify(mGiftData)) {
|
||||
val data = mGiftData[position]
|
||||
data.count = data.count.minus(1)
|
||||
data.count = data.count.minus(1).coerceAtLeast(0)
|
||||
mGiftAdapter.notifyItemChanged(position,1)
|
||||
|
||||
if (data.count == 0) {
|
||||
if (data.count <= 0) {
|
||||
mGiftDataSelectPos.remove(position)
|
||||
}
|
||||
}
|
||||
@@ -296,6 +297,7 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
|
||||
binding.notifyView.desc.text = if (mIsGift) R.string._ver_24_lucky_bag_room_notify_gift.getString() else R.string._ver_24_lucky_bag_room_notify_coin.getString()
|
||||
|
||||
binding.btnConfirm.click {
|
||||
if (isSenting) return@click
|
||||
if (checkSendData()) {
|
||||
if (mIsGift) {
|
||||
if (!mIsGiftReview) {
|
||||
@@ -316,18 +318,21 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
|
||||
}
|
||||
|
||||
binding.btnBill.click {
|
||||
binding.root.setVis(false)
|
||||
val root = binding.root
|
||||
root.setVis(false)
|
||||
val biliDialog = RoomLuckyBagBiliDialog()
|
||||
biliDialog.mActionCallBack = object : Action {
|
||||
override fun onAction(type: Int, data: Any?) {
|
||||
binding.root.setVis(true)
|
||||
if (isViewLoaded && isAdded) {
|
||||
root.setVis(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
biliDialog.show(context)
|
||||
}
|
||||
|
||||
binding.btnMore.click {
|
||||
|
||||
DialogWebViewActivity.start(binding.btnMore.context,UriProvider.getLuckyBagRule())
|
||||
}
|
||||
|
||||
binding.inputLayout.setOnTouchListener { _: View?, _: MotionEvent? ->
|
||||
@@ -566,7 +571,9 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
|
||||
}
|
||||
|
||||
|
||||
var isSenting = false
|
||||
private fun doSendGiftBag() {
|
||||
isSenting = true
|
||||
val items = mutableListOf<LuckyBagGiftItemBody>()
|
||||
mGiftDataSelectPos.keys.forEach{ key->
|
||||
items.add(LuckyBagGiftItemBody().apply {
|
||||
@@ -574,9 +581,6 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
|
||||
giftNum = mGiftDataSelectPos[key]?.count ?: -1
|
||||
})
|
||||
}
|
||||
if (BuildConfig.DEBUG) {
|
||||
mGiftTimeSelect = 20
|
||||
}
|
||||
sentGiftBag(LuckyBagGiftBody().apply {
|
||||
roomUid = AvRoomDataManager.get().roomUid
|
||||
uid = AuthModel.get().currentUid
|
||||
@@ -584,17 +588,17 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
|
||||
giftItems = items
|
||||
}).compose(bindToLifecycle())
|
||||
.doOnSuccess {
|
||||
isSenting = false
|
||||
dismiss()
|
||||
}
|
||||
.doOnError {
|
||||
isSenting = false
|
||||
it?.message?.doToast()
|
||||
}.subscribe()
|
||||
}
|
||||
|
||||
private fun doSendGoldBag() {
|
||||
if (BuildConfig.DEBUG) {
|
||||
mGoldTimeSelect = 20
|
||||
}
|
||||
isSenting = true
|
||||
sentGoldBag(LuckyBagGoldBody().apply {
|
||||
roomUid = AvRoomDataManager.get().roomUid
|
||||
uid = AuthModel.get().currentUid
|
||||
@@ -603,9 +607,11 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
|
||||
countDownSecond = mGoldTimeSelect
|
||||
}).compose(bindToLifecycle())
|
||||
.doOnSuccess {
|
||||
isSenting = false
|
||||
dismiss()
|
||||
}
|
||||
.doOnError {
|
||||
isSenting = false
|
||||
it?.message?.doToast()
|
||||
}.subscribe()
|
||||
}
|
||||
|
@@ -144,6 +144,7 @@ import com.chwl.core.utils.LogUtils
|
||||
import com.chwl.core.utils.net.VipLevelNotEnoughException
|
||||
import com.chwl.library.common.util.ClickUtils.click
|
||||
import com.chwl.library.common.util.LimitClickUtils
|
||||
import com.chwl.library.common.util.doLog
|
||||
import com.chwl.library.common.util.doToast
|
||||
import com.chwl.library.common.util.isVerify
|
||||
import com.chwl.library.common.util.postSafe
|
||||
@@ -1919,6 +1920,9 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
private fun checkBoomInfo() {
|
||||
checkLuckyBagInfo()
|
||||
"checkBoomInfo".doLog()
|
||||
RoomBoomManager.clearQueue()
|
||||
AvRoomModel.get().getRoomBoomInfo(AvRoomDataManager.get().roomUid)
|
||||
.compose(bindToLifecycle())
|
||||
.doOnSuccess { boomInfo: RoomBoomInfo ->
|
||||
@@ -1931,7 +1935,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
level = roomBoomInfoSign.level
|
||||
})
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return@doOnSuccess
|
||||
}
|
||||
|
||||
@@ -1949,24 +1953,33 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
.subscribe()
|
||||
|
||||
checkLuckyBagInfo()
|
||||
|
||||
}
|
||||
|
||||
//幸运礼包推送
|
||||
private fun onLuckyBagAdd(roomEvent: RoomEvent) {
|
||||
RoomHelperManager.onLuckyBagAdd(roomEvent,luckyBagBtn)
|
||||
luckyBagBtn?.postSafe(200) {
|
||||
RoomHelperManager.onLuckyBagAdd(roomEvent,luckyBagBtn)
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkLuckyBagInfo() {
|
||||
RoomHelperManager.getLuckyBagInfo {
|
||||
if (isAdded) {
|
||||
// "红包信息 = $it".doLog()
|
||||
if (it.redEnvelopeListVoList.isVerify()) {
|
||||
luckyBagBtn.setNewData(it.redEnvelopeListVoList)
|
||||
luckyBagBtn?.postSafe(200){
|
||||
"红包信息 = checkLuckyBagInfo = $isAdded".doLog()
|
||||
RoomHelperManager.getLuckyBagInfo {
|
||||
luckyBagBtn?.postSafe {
|
||||
"红包信息 = isAdded = $isAdded".doLog()
|
||||
if (isAdded) {
|
||||
"红包信息 = $it".doLog()
|
||||
if (it.redEnvelopeListVoList.isVerify()) {
|
||||
luckyBagBtn.setNewData(it.redEnvelopeListVoList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public fun initFloatBtnLayout() {
|
||||
|
||||
|
@@ -1,14 +1,44 @@
|
||||
package com.chwl.app.home.adapter
|
||||
|
||||
import com.bumptech.glide.load.DataSource
|
||||
import com.bumptech.glide.load.engine.GlideException
|
||||
import com.bumptech.glide.request.RequestListener
|
||||
import com.bumptech.glide.request.target.Target
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.view.EffectView
|
||||
import com.chwl.app.ui.utils.loadImage
|
||||
import com.chwl.app.utils.AnimLoadUtil
|
||||
import com.chwl.core.home.bean.BannerInfo
|
||||
import com.chwl.core.home.bean.BannerInfo.SKIP_TYP_H5_CP
|
||||
import com.chwl.core.home.bean.BannerInfo.SKIP_TYP_H5_CUSTOM
|
||||
import com.chwl.core.home.bean.BannerInfo.SKIP_TYP_H5_WEE_STAR
|
||||
import com.chwl.library.common.glide.GlideUtils
|
||||
import com.chwl.library.common.util.isVerify
|
||||
import com.chwl.library.common.util.postSafe
|
||||
import com.chwl.library.widget.SVGAView
|
||||
import com.makeramen.roundedimageview.RoundedImageView
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity
|
||||
import com.zhpan.bannerview.BaseBannerAdapter
|
||||
import com.zhpan.bannerview.BaseViewHolder
|
||||
import java.io.File
|
||||
|
||||
class HomeBannerAdapter : BaseBannerAdapter<BannerInfo?>() {
|
||||
|
||||
val entityMap = hashMapOf<String,SVGAVideoEntity>()
|
||||
|
||||
private fun isSVGA(type:Int): Boolean{
|
||||
return type == SKIP_TYP_H5_CUSTOM || type == SKIP_TYP_H5_WEE_STAR ||type == SKIP_TYP_H5_CP
|
||||
}
|
||||
|
||||
override fun getLayoutId(viewType: Int): Int {
|
||||
return R.layout.activity_home_banner
|
||||
if (isSVGA(viewType)) {
|
||||
return R.layout.activity_home_banner_svga
|
||||
} else {
|
||||
return R.layout.activity_home_banner
|
||||
}
|
||||
}
|
||||
|
||||
override fun getViewType(position: Int): Int {
|
||||
return mList?.getOrNull(position)?.getSkipType() ?: 0
|
||||
}
|
||||
|
||||
override fun bindData(
|
||||
@@ -17,10 +47,63 @@ class HomeBannerAdapter : BaseBannerAdapter<BannerInfo?>() {
|
||||
position: Int,
|
||||
pageSize: Int
|
||||
) {
|
||||
val effectView = helper.findViewById<EffectView>(R.id.effectView)
|
||||
effectView.load(item?.bannerPic?:"",item?.fillVo?.imgMap,item?.fillVo?.textMap)
|
||||
try {
|
||||
item?.let {
|
||||
if (isSVGA(it.getSkipType())) {
|
||||
val effectView = helper.findViewById<SVGAView>(R.id.iv_cover)
|
||||
val bannerPic = it.bannerPic
|
||||
if (!bannerPic.isVerify()) return
|
||||
if (entityMap.containsKey(bannerPic)) {
|
||||
try {
|
||||
entityMap[bannerPic]?.let { entity ->
|
||||
AnimLoadUtil.loadSvgaForEntity(effectView, entity, item?.fillVo?.imgMap, item?.fillVo?.textMap){
|
||||
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
} else {
|
||||
GlideUtils.instance().downloadFromUrl2(effectView.context,it?.bannerPic?:"",object : RequestListener<File?> {
|
||||
override fun onLoadFailed(
|
||||
p0: GlideException?,
|
||||
p1: Any?,
|
||||
p2: Target<File?>?,
|
||||
p3: Boolean
|
||||
): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onResourceReady(
|
||||
p0: File?,
|
||||
p1: Any?,
|
||||
p2: Target<File?>?,
|
||||
p3: DataSource?,
|
||||
p4: Boolean
|
||||
): Boolean {
|
||||
p0?.let {
|
||||
effectView.postSafe{
|
||||
try {
|
||||
AnimLoadUtil.loadSvgaGetCache(effectView,it.path ?: "", item?.fillVo?.imgMap, item?.fillVo?.textMap){ entity->
|
||||
if (entity != null) {
|
||||
entityMap[bannerPic] = entity
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
val effectView = helper.findViewById<RoundedImageView>(R.id.iv_cover)
|
||||
effectView.loadImage(item?.bannerPic ?: "")
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@@ -8,6 +8,7 @@ import com.chwl.app.R
|
||||
import com.chwl.app.application.IReportConstants
|
||||
import com.chwl.app.application.ReportManager
|
||||
import com.chwl.app.avroom.adapter.CommonVPAdapter
|
||||
import com.chwl.app.avroom.dialog.RoomLuckyBagDialog
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.databinding.FragmentHomeBinding
|
||||
import com.chwl.app.home.adapter.HomeIndicatorAdapter
|
||||
@@ -16,8 +17,6 @@ import com.chwl.app.ui.widget.magicindicator.ViewPagerHelper
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||
import com.chwl.app.utils.HomeUIManager
|
||||
import com.chwl.core.DemoCache
|
||||
import com.chwl.library.common.util.doToastDeBug
|
||||
import com.example.lib_utils.ktx.getString
|
||||
|
||||
/**
|
||||
首页
|
||||
@@ -44,8 +43,8 @@ class HomeFragment : BaseViewBindingFragment<FragmentHomeBinding>(), View.OnClic
|
||||
|
||||
|
||||
// DemoActivity.start(it)
|
||||
// RoomLuckyBagDialog().show(it)
|
||||
R.string._ver_24_cpInRoomTips.getString("string-1", "string-2", "string-3").doToastDeBug()
|
||||
RoomLuckyBagDialog().show(it)
|
||||
// R.string._ver_24_cpInRoomTips.getString("string-1", "string-2", "string-3").doToastDeBug()
|
||||
// R.string._ver_24_cpUpMicTips.getString("string-1", "string-2", "string-3").doToastDeBug()
|
||||
// GiftDialog(it,3224,false,false,false).show()
|
||||
|
||||
|
@@ -7,9 +7,10 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
import com.chwl.app.R;
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil;
|
||||
|
||||
//todo do 半屏 Web
|
||||
public class DialogWebViewActivity extends CommonWebViewActivity {
|
||||
|
||||
private boolean showTitleBar;
|
||||
|
@@ -232,6 +232,7 @@ object AnimLoadUtil {
|
||||
val inputStream = BufferedInputStream(FileInputStream(path))
|
||||
shareParser().decodeFromInputStream(inputStream, path, object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(svgaVideoEntity: SVGAVideoEntity) {
|
||||
if(!svgaView.isAttachedToWindow) return
|
||||
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
|
||||
@@ -280,6 +281,119 @@ object AnimLoadUtil {
|
||||
}, true, null, null)
|
||||
}
|
||||
|
||||
fun loadSvgaForEntity(
|
||||
svgaView: SVGAImageView,
|
||||
svgaVideoEntity: SVGAVideoEntity,
|
||||
imgUrlMap: HashMap<String, String>? = null,
|
||||
textMap: HashMap<String, String>? = null,
|
||||
callBack: (isSuccess: Boolean) -> Unit
|
||||
) {
|
||||
|
||||
if(!svgaView.isAttachedToWindow) return
|
||||
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
|
||||
if (!imgUrlMap.isNullOrEmpty()) {
|
||||
imgUrlMap.keys.forEach { key ->
|
||||
addDynamicImage(
|
||||
svgaView,
|
||||
dynamicEntity,
|
||||
imgUrlMap[key],
|
||||
key
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (!textMap.isNullOrEmpty()) {
|
||||
textMap.keys.forEach { key ->
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 24f //字体大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
textMap[key],
|
||||
0,
|
||||
textMap[key]!!.length,
|
||||
textPaint,
|
||||
0,
|
||||
Layout.Alignment.ALIGN_CENTER,
|
||||
1.0f,
|
||||
0.0f,
|
||||
false
|
||||
), key
|
||||
)
|
||||
}
|
||||
}
|
||||
val drawable = SVGADrawable(svgaVideoEntity, dynamicEntity)
|
||||
svgaView.setImageDrawable(drawable)
|
||||
svgaView.stepToFrame(0, true)
|
||||
|
||||
callBack(true)
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun loadSvgaGetCache(
|
||||
svgaView: SVGAImageView,
|
||||
path: String,
|
||||
imgUrlMap: HashMap<String, String>? = null,
|
||||
textMap: HashMap<String, String>? = null,
|
||||
callBack: (entity: SVGAVideoEntity?) -> Unit
|
||||
) {
|
||||
|
||||
val inputStream = BufferedInputStream(FileInputStream(path))
|
||||
shareParser().decodeFromInputStream(inputStream, path, object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(svgaVideoEntity: SVGAVideoEntity) {
|
||||
if(!svgaView.isAttachedToWindow) return
|
||||
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
|
||||
if (!imgUrlMap.isNullOrEmpty()) {
|
||||
imgUrlMap.keys.forEach { key ->
|
||||
addDynamicImage(
|
||||
svgaView,
|
||||
dynamicEntity,
|
||||
imgUrlMap[key],
|
||||
key
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (!textMap.isNullOrEmpty()) {
|
||||
textMap.keys.forEach { key ->
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 24f //字体大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
textMap[key],
|
||||
0,
|
||||
textMap[key]!!.length,
|
||||
textPaint,
|
||||
0,
|
||||
Layout.Alignment.ALIGN_CENTER,
|
||||
1.0f,
|
||||
0.0f,
|
||||
false
|
||||
), key
|
||||
)
|
||||
}
|
||||
}
|
||||
val drawable = SVGADrawable(svgaVideoEntity, dynamicEntity)
|
||||
svgaView.setImageDrawable(drawable)
|
||||
svgaView.stepToFrame(0, true)
|
||||
|
||||
callBack(svgaVideoEntity)
|
||||
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
callBack(null)
|
||||
}
|
||||
}, true, null, null)
|
||||
}
|
||||
|
||||
|
||||
private fun addDynamicImage(
|
||||
view: View,
|
||||
dynamicEntity: SVGADynamicEntity,
|
||||
|
@@ -298,4 +298,11 @@ object RoomBoomManager {
|
||||
boomInfo = null
|
||||
}
|
||||
|
||||
fun clearQueue() {
|
||||
mAnimLayout = null
|
||||
AnimQueue.clear()
|
||||
awardQueue.clear()
|
||||
boomInfo = null
|
||||
}
|
||||
|
||||
}
|
@@ -118,7 +118,7 @@ object RoomHelperManager {
|
||||
countDownSecond = attachment.redPackageLuckyBag.countDownSecond
|
||||
countDownTime = System.currentTimeMillis()
|
||||
type = attachment.redPackageLuckyBag.redEnvelopeType
|
||||
nick = attachment.redPackageLuckyBag.sendUserAvatar
|
||||
nick = attachment.redPackageLuckyBag.sendUserNick
|
||||
avatar = attachment.redPackageLuckyBag.sendUserAvatar
|
||||
userId = attachment.redPackageLuckyBag.roomUid
|
||||
roomUid = attachment.redPackageLuckyBag.roomUid
|
||||
|
@@ -1,17 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/ll_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="0dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.chwl.app.view.EffectView
|
||||
android:id="@+id/effectView"
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius_bottom_left="8dp"
|
||||
app:riv_corner_radius_bottom_right="8dp"
|
||||
app:riv_corner_radius_top_left="8dp"
|
||||
app:riv_corner_radius_top_right="8dp" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
23
app/src/main/res/layout/activity_home_banner_svga.xml
Normal file
23
app/src/main/res/layout/activity_home_banner_svga.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/ll_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.chwl.library.widget.SVGAView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius_bottom_left="8dp"
|
||||
app:riv_corner_radius_bottom_right="8dp"
|
||||
app:riv_corner_radius_top_left="8dp"
|
||||
app:riv_corner_radius_top_right="8dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -217,7 +217,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/flListGiftTypeLayout"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.chwl.library.widget.text.DrawableTextView
|
||||
<TextView
|
||||
android:id="@+id/btnModify"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -225,13 +225,13 @@
|
||||
android:drawablePadding="3.5dp"
|
||||
android:text="@string/text_modify"
|
||||
android:textColor="@color/color_FFEA5C"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:visibility="gone"
|
||||
app:dt_drawableRightHeight="11dp"
|
||||
app:dt_drawableRightSrc="@drawable/ic_login_next"
|
||||
app:dt_drawableRightWidth="11dp"
|
||||
app:drawableTint="@color/color_FFEA5C"
|
||||
android:drawableRight="@drawable/ic_next_right_black"
|
||||
app:layout_constraintEnd_toEndOf="@+id/reviewTime"
|
||||
app:layout_constraintStart_toStartOf="@+id/reviewTime"
|
||||
tools:visibility="visible" />
|
||||
@@ -408,7 +408,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnConfirm"
|
||||
android:layout_width="190dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="47dp"
|
||||
android:layout_marginTop="9.5dp"
|
||||
android:background="@drawable/ic_lucky_bag_confirm"
|
||||
@@ -453,7 +453,7 @@
|
||||
android:id="@+id/input_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:visibility="visible"
|
||||
tools:visibility="gone"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
|
@@ -147,7 +147,7 @@
|
||||
android:text="@string/_ver_24_View_Others"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#292601"
|
||||
android:drawableEnd="@drawable/ic_next_right_black"
|
||||
android:drawableRight="@drawable/ic_next_right_black"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@@ -425,11 +425,13 @@
|
||||
android:textColorHint="#c8c8c8"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/input_sendImg"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
app:tint="@color/color_606060"
|
||||
android:background="@drawable/click_white_gray_selector"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_btn_room_sent_img" />
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context="com.yizhuan.erban.avroom.fragment.HomePartyRoomFragment">
|
||||
|
||||
<data>
|
||||
@@ -329,14 +330,16 @@
|
||||
android:textColorHint="#c8c8c8"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/input_sendImg"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
app:tint="@color/color_606060"
|
||||
android:background="@drawable/click_white_gray_selector"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_btn_room_sent_img" />
|
||||
android:src="@drawable/ic_btn_room_sent_img" />/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/input_send"
|
||||
|
@@ -334,7 +334,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:visibility="gone">
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -358,11 +358,13 @@
|
||||
android:textColorHint="#c8c8c8"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/input_sendImg"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
app:tint="@color/color_606060"
|
||||
android:background="@drawable/click_white_gray_selector"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_btn_room_sent_img" />
|
||||
|
@@ -10,8 +10,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift"
|
||||
android:layout_width="75dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
app:layout_constraintDimensionRatio="75:75"
|
||||
android:background="@drawable/bg_lucky_bag_gift_item"
|
||||
android:padding="6.5dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
|
@@ -349,6 +349,7 @@
|
||||
<color name="color_FF6645">#FF6645</color>
|
||||
<color name="color_FFA957">#FFA957</color>
|
||||
<color name="color_FFEA5C">#ffea5c</color>
|
||||
<color name="color_606060">#606060</color>
|
||||
<color name="color_8461FE">#8461FE</color>
|
||||
<color name="color_CC81EF">#CC81EF</color>
|
||||
<color name="color_589DE7">#589DE7</color>
|
||||
|
@@ -331,6 +331,13 @@ public class UriProvider {
|
||||
return JAVA_WEB_URL.concat("/molistar/modules/roomLevel/index.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运红包 规则
|
||||
*/
|
||||
public static String getLuckyBagRule() {
|
||||
return JAVA_WEB_URL.concat("/molistar/modules/luckyBagRules/index.html");
|
||||
}
|
||||
|
||||
|
||||
public static String toFullUrl(String shortUrl) {
|
||||
if (shortUrl == null) {
|
||||
|
157
mode.json
157
mode.json
@@ -1,28 +1,131 @@
|
||||
{
|
||||
"data": {
|
||||
"avatar": "https://image.pekolive.com/bfed3b08-1ebe-42dc-b9a4-619cb2da0e43.gif",
|
||||
"carName": "boom1122",
|
||||
"charmUrl": "https://image.pekolive.com/Charm_43.png",
|
||||
"cpList": [
|
||||
{
|
||||
"cpAvatar": "https://image.pekolive.com/image/b92b1deee5a24ee754618d230aed3946.jpeg",
|
||||
"cpErbanNo": 992,
|
||||
"cpLevel": 5,
|
||||
"cpNick": "曜燦殿下45",
|
||||
"cpUid": 3203
|
||||
}
|
||||
],
|
||||
"defUser": 1,
|
||||
"enterHide": false,
|
||||
"erbanNo": 6228657,
|
||||
"experUrl": "https://image.pekolive.com/Wealth_59.png",
|
||||
"inRoomNameplatePic": "http://beta.img.pekolive.com/FgqigBQvHY_2Gzo7OBlENtMusDEH?imageslim",
|
||||
"inRoomNameplateWord": " ",
|
||||
"nick": "Molistar",
|
||||
"screenType": 2,
|
||||
"uid": 3224,
|
||||
"vipIcon": "https://image.pekolive.com/v9.png"
|
||||
[
|
||||
{
|
||||
"bannerId": 55,
|
||||
"bannerName": "每日消费",
|
||||
"bannerPic": "https://image.pekolive.com/banner .png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/dailyConsumption/index.html"
|
||||
},
|
||||
"first": 115,
|
||||
"second": 1152
|
||||
}
|
||||
{
|
||||
"bannerId": 51,
|
||||
"bannerName": "ss公会",
|
||||
"bannerPic": "https://image.pekolive.com/ssgongh.png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/ssGuild/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 48,
|
||||
"bannerName": "月充值",
|
||||
"bannerPic": "https://image.pekolive.com/banner.png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/rechargeNew/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 50,
|
||||
"bannerName": "周星榜",
|
||||
"bannerPic": "https://image.pekolive.com/zhouxing-banner-ar.svga",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 5,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/weekStar/newWeekStar.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 52,
|
||||
"bannerName": "靓号活动",
|
||||
"bannerPic": "https://image.pekolive.com/sid.png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/superId/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 59,
|
||||
"bannerName": "定制活动",
|
||||
"bannerPic": "https://image.pekolive.com/dingzhi-banner-ar.svga",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 6,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/customizedGift/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 62,
|
||||
"bannerName": "元旦",
|
||||
"bannerPic": "https://image.pekolive.com/yuand-yingyu.png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/2024-newYear/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 64,
|
||||
"bannerName": "CP活动",
|
||||
"bannerPic": "https://image.pekolive.com/cp-banner-ar.svga",
|
||||
"fillVo": {
|
||||
"avatar": "https://image.pekolive.com/0baefcc9-07ee-4ee1-a600-160914f0853c.jpeg",
|
||||
"erbanNo": 2222,
|
||||
"giftId": 0,
|
||||
"imgMap": {
|
||||
"avatar": "https://image.pekolive.com/0baefcc9-07ee-4ee1-a600-160914f0853c.jpeg",
|
||||
"avatar_2": "https://image.pekolive.com/935ef3a7-b668-4bc5-a215-7ad55fae20da.jpeg",
|
||||
"avatar_1": "https://image.pekolive.com/0baefcc9-07ee-4ee1-a600-160914f0853c.jpeg"
|
||||
},
|
||||
"loverAvatar": "https://image.pekolive.com/935ef3a7-b668-4bc5-a215-7ad55fae20da.jpeg",
|
||||
"loverErbanNo": 2211,
|
||||
"loverNick": "mo",
|
||||
"nick": "mo",
|
||||
"textMap": {
|
||||
"id": "ID:2222",
|
||||
"id_1": "ID:2222",
|
||||
"id_2": "ID:2211"
|
||||
}
|
||||
},
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 4,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/2024-cpActive/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 65,
|
||||
"bannerName": "年度",
|
||||
"bannerPic": "https://image.pekolive.com/niandu-ar.png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/annualReport/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 66,
|
||||
"bannerName": "lucky1122",
|
||||
"bannerPic": "https://image.pekolive.com/lucky-ar.png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/superLucky/index.html"
|
||||
},
|
||||
{
|
||||
"bannerId": 67,
|
||||
"bannerName": "Weekly Star",
|
||||
"bannerPic": "https://image.pekolive.com/weeklystar7.png",
|
||||
"firstCharge": false,
|
||||
"radish": false,
|
||||
"showType": 1,
|
||||
"skipType": 3,
|
||||
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/weekStarPlus/index.html"
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user