diff --git a/app/src/main/java/com/chwl/app/application/App.java b/app/src/main/java/com/chwl/app/application/App.java index 4220c075c..eda6fd4ed 100644 --- a/app/src/main/java/com/chwl/app/application/App.java +++ b/app/src/main/java/com/chwl/app/application/App.java @@ -250,7 +250,7 @@ public class App extends BaseApp { ServiceResult serviceResult = (ServiceResult) result; if (serviceResult.getCode() == ServiceResult.CODE_NEED_COMPLETE_USER_INFO) { SingleToastUtil.showToast(serviceResult.getMessage()); - EventBus.getDefault().post(new NeedCompleteInfoEvent()); //todo do 生日修改异常问题 + EventBus.getDefault().post(new NeedCompleteInfoEvent()); throw new ServerException(serviceResult.getMessage(), serviceResult.getCode()); } else if (serviceResult.getCode() == 401) { if ((ServiceTime.INSTANCE.getTime() - logoutEventTime) > 800) { diff --git a/app/src/main/java/com/chwl/app/avroom/dialog/RoomOperationDialog.java b/app/src/main/java/com/chwl/app/avroom/dialog/RoomOperationDialog.java index 71014ead1..99ff617cb 100644 --- a/app/src/main/java/com/chwl/app/avroom/dialog/RoomOperationDialog.java +++ b/app/src/main/java/com/chwl/app/avroom/dialog/RoomOperationDialog.java @@ -132,7 +132,7 @@ public class RoomOperationDialog extends BottomSheetDialog { addSingleRoomPKAction(optAdapter); //个播PK // addSendBroadcastAction(optAdapter); //发布广播 // addInviteFansOptAdapter(); //邀请粉丝 - addRoomMusicPlay(optAdapter); //房间类型切换 + addRoomMusicPlay(optAdapter); //音乐设置 addVipSendBroadcastAction(optAdapter); //小喇叭 // addRedPacketAction(optAdapter); //红包 addRoomSettingAction(optAdapter); //房间设置 @@ -661,8 +661,7 @@ public class RoomOperationDialog extends BottomSheetDialog { boolean isOnMic = AvRoomDataManager.get().isOnMic(AuthModel.get().getCurrentUid()); if (!isOnMic) return; - //todo do 音乐图标待更换 - optAdapter.addData(new OptAction(R.drawable.icon_room_vip_send_broadcast, + optAdapter.addData(new OptAction(R.drawable.icon_room_operation_music, ResUtil.getString(R.string.layout_dialog_voice_seek_02), () -> { if (onActionListener != null) { diff --git a/app/src/main/java/com/chwl/app/decoration/adapter/DressUpAdapter.kt b/app/src/main/java/com/chwl/app/decoration/adapter/DressUpAdapter.kt index d0981d2af..e2c85bce5 100644 --- a/app/src/main/java/com/chwl/app/decoration/adapter/DressUpAdapter.kt +++ b/app/src/main/java/com/chwl/app/decoration/adapter/DressUpAdapter.kt @@ -14,6 +14,7 @@ import com.chwl.library.common.util.isVerify import com.chwl.library.common.util.setViewWH import com.chwl.library.common.util.setVis import com.chwl.library.common.util.toColor +import com.example.lib_utils.ktx.dp import com.example.lib_utils.ktx.getString class DressUpAdapter : BaseBindingAdapter() { @@ -28,13 +29,14 @@ class DressUpAdapter : BaseBindingAdapter setViewDef(binding) - if (item.isSelect) { binding.bg.setBackgroundResource(R.drawable.ic_dress_item_s) } else { binding.bg.setBackgroundResource(R.drawable.ic_dress_item_n) } + binding.bg.setViewWH(height = if (item.isMy) 190 else 244) + if (item.isNull) { binding.empty.setVis(true) binding.name.text = R.string.Not_used.getString() @@ -62,10 +64,12 @@ class DressUpAdapter : BaseBindingAdapter //1-普通 2-活动 binding.discount.setViewWH(height = ViewGroup.LayoutParams.WRAP_CONTENT, isDP = false) if (item.obtainWay == AnyType.ObtainWay.ACT) { - binding.discount.setViewWH(height = 51) + binding.discount.setViewWH(height = 48) + binding.name.setPadding(0,10.dp,0,10.dp) binding.discount.text = R.string.obtainWayActionItem.getString() } else { - binding.discount.setViewWH(height = 30) + binding.discount.setViewWH(height = 29) + binding.name.setPadding(0,5.dp,0,0) if (item.vipLimit > 0) { binding.discount.text = R.string.vipLimit.getString(item.vipLimit) } else { diff --git a/app/src/main/java/com/chwl/app/decoration/ui/DressUpDialog.kt b/app/src/main/java/com/chwl/app/decoration/ui/DressUpDialog.kt index e1b2df4db..1ece47540 100644 --- a/app/src/main/java/com/chwl/app/decoration/ui/DressUpDialog.kt +++ b/app/src/main/java/com/chwl/app/decoration/ui/DressUpDialog.kt @@ -12,6 +12,7 @@ import com.chwl.core.user.UserModel import com.chwl.core.utils.net.RxHelper import com.chwl.library.common.util.ClickUtils.click import com.chwl.library.common.util.doToast +import com.chwl.library.common.util.setVis import com.chwl.library.common.util.toColor import com.chwl.library.net.rxnet.RxNet import com.example.lib_utils.ktx.dp @@ -36,47 +37,63 @@ class DressUpDialog : BaseDialogFragment() { override fun init() { val cacheLoginUserInfo = UserModel.get().cacheLoginUserInfo val myVipLevel = cacheLoginUserInfo?.userVipInfoVO?.vipLevel?: 0 + var canBuy = true mDressUpInfo?.let { binding.name.text = it.name if (it.vipLimit == 0 && it.obtainWay != ObtainWay.ACT){ //没有等级限定,且装扮不是活动获得 - DressUpUtil.setTextPrice(binding.price,it) + DressUpUtil.setTextPrice(binding.price,it,false,true) }else{ if (it.obtainWay == ObtainWay.ACT) { //装扮是活动获得 + binding.price.setTextColor("#CCD9E7F7".toColor()) + binding.price.setVis(true) binding.price.text = R.string.obtainWayAction.getString() + canBuy = false }else if (it.vipLimit != 0) { if (myVipLevel >= it.vipLimit) { - DressUpUtil.setTextPrice(binding.price,it) + DressUpUtil.setTextPrice(binding.price,it,false,true) } else { //装扮vip等级限制没达到 + binding.price.setTextColor("#CCD9E7F7".toColor()) + binding.price.setVis(true) binding.price.text = R.string.vipLimit.getString(it.vipLimit) + canBuy =false } } } - DressUpUtil.setItemPic(it,binding.picLayout) + DressUpUtil.setDialogPic(it,binding.picLayout) } - if (mTargetUid != -1L) { - binding.btnBuy.text = R.string.fairy_give.getString() - binding.btnBuy.setGradientDrawable( - "#b2fcff".toColor(), - -1, - "#4da2ea".toColor(), - -1,-1f - ) + + if (canBuy) { + binding.btnBuy.setVis(true) + if (mTargetUid != -1L) { + binding.btnBuy.text = R.string.fairy_give.getString() + binding.btnBuy.setGradientDrawable( + "#b2fcff".toColor(), + -1, + "#4da2ea".toColor(), + -1,-1f + ) + } else { + binding.btnBuy.text = R.string.buy.getString() + binding.btnBuy.setGradientDrawable( + "#FFE3b2".toColor(), + -1, + "#e9a71d".toColor(), + -1,-1f + ) + } } else { - binding.btnBuy.text = R.string.buy.getString() - binding.btnBuy.setGradientDrawable( - "#FFE3b2".toColor(), - -1, - "#e9a71d".toColor(), - -1,-1f - ) + binding.btnCancel.text = R.string.ok.getString() + binding.btnBuy.setVis(false) } + + binding.btnBuy.click { mDressUpInfo?.let { if (mTargetUid != -1L) { diff --git a/app/src/main/java/com/chwl/app/decoration/ui/activity/DressUpTabActivity.kt b/app/src/main/java/com/chwl/app/decoration/ui/activity/DressUpTabActivity.kt index e2e837e99..24c7aa079 100644 --- a/app/src/main/java/com/chwl/app/decoration/ui/activity/DressUpTabActivity.kt +++ b/app/src/main/java/com/chwl/app/decoration/ui/activity/DressUpTabActivity.kt @@ -3,7 +3,6 @@ package com.chwl.app.decoration.ui.activity import android.content.Context import android.content.Intent import android.os.Bundle -import android.view.View import androidx.fragment.app.Fragment import androidx.viewpager2.widget.ViewPager2 import com.alibaba.fastjson.JSON @@ -137,13 +136,13 @@ class DressUpTabActivity : BaseViewBindingActivity() binding.viewPage.offscreenPageLimit = 6 binding.viewPage.registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() { override fun onPageSelected(position: Int) { - selectTab(position) mDressUpInfo = null + selectTab(position) if (isMy) { binding.bottomView.setVis(false) } else { - binding.bottomView.visibility = View.INVISIBLE +// binding.bottomView.visibility = View.INVISIBLE } } }) @@ -190,6 +189,15 @@ class DressUpTabActivity : BaseViewBindingActivity() tabView.tabBg.setBackgroundResource(if (pos == i) R.drawable.ic_dress_tab_bg_s else R.drawable.ic_dress_tab_bg_n) tabView.tabText.alpha = if (pos == i) 1f else 0.5f } + + if (!isMy) { + val fg = fgLists?.getOrNull(pos) + if (fg != null && fg is DressUpStoreFragment) { + fg.selectOne() + } + } + + } @@ -205,13 +213,19 @@ class DressUpTabActivity : BaseViewBindingActivity() binding.avatarHead.loadUrl(data.effect) } } else { +// if (data.obtainWay == ObtainWay.ACT) { +// binding.bottomView.setVis(false) +// }else if (data.vipLimit > 0 && mMyVipLevel < data.vipLimit) { +// binding.bottomView.setVis(false) +// }else { +// binding.bottomView.setVis(true) +// DressUpUtil.setTextPrice(binding.price,data) +// } if (data.obtainWay == ObtainWay.ACT) { binding.bottomView.setVis(false) - }else if (data.vipLimit > 0 && mMyVipLevel < data.vipLimit) { - binding.bottomView.setVis(false) - }else { + }else { binding.bottomView.setVis(true) - DressUpUtil.setTextPrice(binding.price,data) + DressUpUtil.setTextPrice(binding.price,data,false,false) } } diff --git a/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpMyFragment.kt b/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpMyFragment.kt index 59fddd211..2c9585f1e 100644 --- a/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpMyFragment.kt +++ b/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpMyFragment.kt @@ -69,7 +69,8 @@ class DressUpMyFragment : BaseListFragment() { override fun onResume() { super.onResume() - if (!mAdapter?.data.isVerify()){ + if (!mAdapter.data.isVerify()){ + mPosition = -1 onRefresh() } } diff --git a/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpStoreFragment.kt b/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpStoreFragment.kt index cbfeb3d8c..e3a253eea 100644 --- a/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpStoreFragment.kt +++ b/app/src/main/java/com/chwl/app/decoration/ui/fragment/DressUpStoreFragment.kt @@ -16,6 +16,7 @@ import com.chwl.core.decoration.bean.DecorationInfo import com.chwl.core.decoration.bean.DressUpInfo import com.chwl.core.utils.net.RxHelper import com.chwl.library.common.util.doToast +import com.chwl.library.common.util.isVerify import com.chwl.library.common.util.setMargin import com.chwl.library.net.rxnet.RxNet import com.example.lib_utils.ktx.getString @@ -55,8 +56,10 @@ class DressUpStoreFragment: BaseListFragment() { override fun onResume() { super.onResume() - mPosition = -1 - onLoad() + if (!mAdapter.data.isVerify()) { + mPosition = -1 + onLoad() + } } override fun getAdapter(): BaseBindingAdapter<*, DressUpInfo> { @@ -78,6 +81,9 @@ class DressUpStoreFragment: BaseListFragment() { newData.add(DressUpUtil.tranData(it)) } mAdapter.setNewData(newData) + binding.rvList.post { + setlect(0) + } } } .doOnError { @@ -104,22 +110,34 @@ class DressUpStoreFragment: BaseListFragment() { } override fun onItemClicks(adapter: BaseBindingAdapter<*, DressUpInfo>?, view: View?, position: Int) { - adapter?.data?.getOrNull(position)?.let { data -> + setlect(position) + } + + private fun setlect(position: Int) { + mAdapter?.data?.getOrNull(position)?.let { data -> if (mPosition != -1) { - adapter?.data?.getOrNull(mPosition)?.isSelect = false - adapter?.notifyItemChanged(mPosition) + mAdapter?.data?.getOrNull(mPosition)?.isSelect = false + mAdapter?.notifyItemChanged(mPosition) } mPosition = position - adapter?.data?.getOrNull(mPosition)?.isSelect = true - adapter?.notifyItemChanged(mPosition) + mAdapter?.data?.getOrNull(position)?.isSelect = true + mAdapter?.notifyItemChanged(position) EventBus.getDefault().post(DressUpEvent(DressUpEvent.Action.Select, data)) } } + fun selectOne() { + if (mPosition != -1) { + mAdapter?.data?.getOrNull(mPosition)?.let { data -> + EventBus.getDefault().post(DressUpEvent(DressUpEvent.Action.Select, data)) + } + } + } + private fun getShopList(): Single> { return api.getShopList(mDressType) diff --git a/app/src/main/java/com/chwl/app/decoration/util/DressUpUtil.kt b/app/src/main/java/com/chwl/app/decoration/util/DressUpUtil.kt index e75c460d2..35b6dbda3 100644 --- a/app/src/main/java/com/chwl/app/decoration/util/DressUpUtil.kt +++ b/app/src/main/java/com/chwl/app/decoration/util/DressUpUtil.kt @@ -207,64 +207,129 @@ class DressUpUtil { return outData } + fun setTextPrice(textView: DrawableTextView, item: DressUpInfo,isItemView:Boolean = false,isDialog:Boolean = false) { - fun setTextPrice(textView: DrawableTextView, item: DressUpInfo,isItemView:Boolean = false) { + var oPrice = "0" + if (!isDialog && !isItemView) { + oPrice = "" + } else { + oPrice = if (isItemView) NumberUtils.format(item.originalPrice.toDouble(),false) else item.originalPrice + } - val oPrice = if (isItemView) NumberUtils.format(item.originalPrice.toDouble()) else item.originalPrice - val price = if (isItemView) NumberUtils.format(item.price.toDouble()) else item.price + val price = if (isItemView) NumberUtils.format(item.price.toDouble(),false) else item.price + val priceSize = if (isItemView) 13 else if(isDialog) 18 else 16 + val oPriceSize = if (isItemView) 10 else if(isDialog) 14 else 12 if (price == oPrice) { val message = R.string.s_sDays_s.getString(price, item.buyDay.toString(), "") + SpannableTextBuilder(textView).appendText(message) .addTextStyleList(arrayListOf( SpannableTextBuilder.TextStyleBean().apply { text = price textStyle = Typeface.BOLD + textSize = priceSize }, SpannableTextBuilder.TextStyleBean().apply { text = item.buyDay.toString() textStyle = Typeface.NORMAL + textSize = oPriceSize } )) .apply() + +// SpannableTextBuilder(textView).appendText(message) +// .setTextStyle( +// text = price, +// textStyle = Typeface.BOLD, +// textSize = priceSize +// ).setTextStyle( +// text = item.buyDay.toString(), +// textStyle = Typeface.NORMAL, +// textSize = oPriceSize, +// ) +// .apply() + } else { val message = R.string.s_sDays_s.getString(price, item.buyDay.toString(), oPrice) if (textView.context.isRtl()) { + SpannableTextBuilder(textView).appendText(message) .addTextStyleList(arrayListOf( SpannableTextBuilder.TextStyleBean().apply { text = item.buyDay.toString() textStyle = Typeface.NORMAL + textSize = oPriceSize }, SpannableTextBuilder.TextStyleBean().apply { text = price textStyle = Typeface.BOLD + textSize = priceSize }, SpannableTextBuilder.TextStyleBean().apply { text = oPrice textColor = R.color.color_d9e7f7_50.getColor() textStyle = Typeface.NORMAL delLine = true + textSize = oPriceSize } )).apply() + +// SpannableTextBuilder(textView).appendText(message) +// .setTextStyle( +// text = item.buyDay.toString(), +// textStyle = Typeface.NORMAL, +// textSize = oPriceSize, +// ).setTextStyle( +// text = price, +// textStyle = Typeface.BOLD, +// textSize = priceSize, +// ).setTextStyle( +// text = oPrice, +// textColor = R.color.color_d9e7f7_50.getColor(), +// textStyle = Typeface.NORMAL, +// delLine = true, +// textSize = oPriceSize, +// ).apply() + } else { SpannableTextBuilder(textView).appendText(message) .addTextStyleList(arrayListOf( SpannableTextBuilder.TextStyleBean().apply { text = price textStyle = Typeface.BOLD + textSize = priceSize }, SpannableTextBuilder.TextStyleBean().apply { text = item.buyDay.toString() textStyle = Typeface.NORMAL + textSize = oPriceSize }, SpannableTextBuilder.TextStyleBean().apply { text = oPrice textColor = R.color.color_d9e7f7_50.getColor() textStyle = Typeface.NORMAL + textSize = oPriceSize delLine = true } )).apply() + +// SpannableTextBuilder(textView).appendText(message) +// .setTextStyle( +// text = price, +// textStyle = Typeface.BOLD, +// textSize = priceSize, +// ).setTextStyle( +// text = item.buyDay.toString(), +// textStyle = Typeface.NORMAL, +// textSize = oPriceSize, +// ).setTextStyle( +// text = oPrice, +// textColor = R.color.color_d9e7f7_50.getColor(), +// textStyle = Typeface.NORMAL, +// textSize = oPriceSize, +// delLine = true, +// ).apply() } } @@ -276,7 +341,7 @@ class DressUpUtil { if (data.dressType == DressUpTabActivity.TAB_USER_CARD) { //此时传回的是mp4.. // layout.setViewWH() - play(data,layout,true) + play(data,layout,false) } else { layout.removeAllViews() val pic = ImageView(layout.context) @@ -296,7 +361,33 @@ class DressUpUtil { } } - fun play(data:DressUpInfo,layout: ViewGroup,isItem :Boolean = false){ + fun setDialogPic(data:DressUpInfo,layout: ViewGroup) { + if (data.dressType == DressUpTabActivity.TAB_USER_CARD) { + //此时传回的是mp4.. +// layout.setViewWH() + play(data,layout,true) + } else { + layout.removeAllViews() + val pic = ImageView(layout.context) + layout.addView(pic) + if (data.dressType == DressUpTabActivity.TAB_CAR) { + pic.setViewWH(155,155) + }else if (data.dressType == DressUpTabActivity.TAB_HEAD_WEAR) { + pic.setViewWH(147,147) + }else if (data.dressType == DressUpTabActivity.TAB_USER_CARD) { + pic.setViewWH(182,161) + }else if (data.dressType == DressUpTabActivity.TAB_NAMEPLATE) { + pic.setViewWH(108,30) + }else if (data.dressType == DressUpTabActivity.TAB_CHAT_BUBBLE) { + pic.setViewWH(100,52) + }else if (data.dressType == DressUpTabActivity.TAB_USER_INFO_BG) { + pic.setViewWH(163,161) + } + pic.loadImage(data.pic) + } + } + + fun play(data:DressUpInfo,layout: ViewGroup){ if (data.effect.isVerify()) { var animView : AnimView?=null @@ -317,26 +408,22 @@ class DressUpUtil { svgaView.setScaleType(ImageView.ScaleType.FIT_XY) } - //item 时占满就行 - if (isItem) { - animView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false) - svgaView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,false) + + if (data.dressType == TAB_HEAD_WEAR) { + animView?.setViewWH(183, 183, true) + svgaView?.setViewWH(183, 183, true) + } else if (data.dressType == TAB_USER_CARD) { + animView?.setViewWH(285, 250, true) + svgaView?.setViewWH(285, 250, true) + } else if (data.dressType == TAB_USER_INFO_BG) { + animView?.setViewWH(305, 300, true) + svgaView?.setViewWH(305, 300, true) } else { - if (data.dressType == TAB_HEAD_WEAR) { - animView?.setViewWH(183, 183, true) - svgaView?.setViewWH(183, 183, true) - }else if (data.dressType == TAB_USER_CARD) { - animView?.setViewWH(285, 250, true) - svgaView?.setViewWH(285, 250, true) - }else if (data.dressType == TAB_USER_INFO_BG) { - animView?.setViewWH(305, 300, true) - svgaView?.setViewWH(305, 300, true) - } else { - animView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false) - svgaView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,false) - } + animView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false) + svgaView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false) } + animView?.setAnimListener(object : IAnimListener { override fun onFailed(errorType: Int, errorMsg: String?) { } override fun onVideoComplete() { @@ -371,6 +458,85 @@ class DressUpUtil { animView?.loadAnim2(data.effect,false) svgaView?.loadUrl(data.effect,true) + }else{ + layout.setVis(false) + layout.removeAllViews() + } + } + + + fun play(data:DressUpInfo,layout: ViewGroup,isDialog :Boolean = false){ + if (data.effect.isVerify()) { + + var animView : AnimView?=null + var svgaView : SVGAView?=null + + layout.setVis(true) + layout.removeAllViews() + + if (data.effectType == EffectType.MP4) { + animView = AnimView(layout.context) + layout.addView(animView) + animView.setLoop(Int.MAX_VALUE) + animView.setScaleType(ScaleType.FIT_XY) + } else { + svgaView = SVGAView(layout.context) + layout.addView(svgaView) + svgaView.loops = Int.MAX_VALUE + svgaView.setScaleType(ImageView.ScaleType.FIT_XY) + } + + //item 时占满就行 + if (!isDialog) { + animView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false) + svgaView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,false) + } else { + if (data.dressType == TAB_USER_CARD) { + animView?.setViewWH(182, 161, true) + svgaView?.setViewWH(182, 161, true) + } else { + animView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, false) + svgaView?.setViewWH(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,false) + } + } + +// animView?.setAnimListener(object : IAnimListener { +// override fun onFailed(errorType: Int, errorMsg: String?) { } +// override fun onVideoComplete() { +// layout?.post { +// animView?.stopPlay() +// layout?.removeAllViews() +// layout?.setVis(false) +// } +// } +// override fun onVideoDestroy() {} +// override fun onVideoRender(frameIndex: Int, config: AnimConfig?) {} +// override fun onVideoStart() {} +// }) +// +// svgaView?.callback = object : SVGACallback { +// override fun onFinished() { +// layout?.post { +// animView?.stopPlay() +// layout?.removeAllViews() +// layout?.setVis(false) +// } +// } +// +// override fun onPause() {} +// +// override fun onRepeat() {} +// +// override fun onStep(frame: Int, percentage: Double) { +// +// } +// } + animView?.loadAnim2(data.effect,false) + svgaView?.loadUrl(data.effect,true) + + }else{ + layout.setVis(false) + layout.removeAllViews() } } } diff --git a/app/src/main/java/com/chwl/app/ui/widget/BonsellaJoinAttackButtonView.kt b/app/src/main/java/com/chwl/app/ui/widget/BonsellaJoinAttackButtonView.kt index 8a7863a64..51e00d310 100644 --- a/app/src/main/java/com/chwl/app/ui/widget/BonsellaJoinAttackButtonView.kt +++ b/app/src/main/java/com/chwl/app/ui/widget/BonsellaJoinAttackButtonView.kt @@ -39,7 +39,7 @@ class BonsellaJoinAttackButtonView @JvmOverloads constructor( fun getSvgaView() = mBinding.svga fun setComboClick(listener: OnClickListener) { - mBinding.tvText.singleClick (listener,100) + mBinding.tvText.singleClick (listener,200) } private val vibrator by lazy { diff --git a/app/src/main/java/com/chwl/app/utils/NumberUtils.kt b/app/src/main/java/com/chwl/app/utils/NumberUtils.kt index 255985b37..be865db65 100644 --- a/app/src/main/java/com/chwl/app/utils/NumberUtils.kt +++ b/app/src/main/java/com/chwl/app/utils/NumberUtils.kt @@ -27,7 +27,7 @@ object NumberUtils { } @JvmStatic - fun format(num:Double):String{ + fun format(num:Double, roundUp:Boolean = true):String{ val longValue = num.roundToLong() return if(num < 10000){ if(num - num.toLong() > 0){ @@ -36,11 +36,11 @@ object NumberUtils { longValue.toString() } }else if(longValue < 1000000){ - format(longValue, "K") + format(longValue, "K",roundUp = roundUp) }else if(longValue < 1000000000){ - format(longValue/1000, "M") + format(longValue/1000, "M",roundUp = roundUp) }else - format(longValue/1000000, "B") + format(longValue/1000000, "B",roundUp = roundUp) } @JvmStatic diff --git a/app/src/main/res/drawable-ar-xhdpi/ic_new_user_hello.png b/app/src/main/res/drawable-ar-xhdpi/ic_new_user_hello.png deleted file mode 100644 index 819d3bcf7..000000000 Binary files a/app/src/main/res/drawable-ar-xhdpi/ic_new_user_hello.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_new_user.png b/app/src/main/res/drawable-xhdpi/ic_new_user.png new file mode 100644 index 000000000..967f8be58 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_new_user.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_new_user.webp b/app/src/main/res/drawable-xhdpi/ic_new_user.webp deleted file mode 100644 index b78d2e29b..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_new_user.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_new_user_hello.webp b/app/src/main/res/drawable-xhdpi/ic_new_user_hello.webp deleted file mode 100644 index edbb62ff4..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_new_user_hello.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_effect.png b/app/src/main/res/drawable-xhdpi/icon_gift_effect.png new file mode 100644 index 000000000..79d59e55e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_gift_effect.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_effect.webp b/app/src/main/res/drawable-xhdpi/icon_gift_effect.webp deleted file mode 100644 index 2c459da64..000000000 Binary files a/app/src/main/res/drawable-xhdpi/icon_gift_effect.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_exclusive.png b/app/src/main/res/drawable-xhdpi/icon_gift_exclusive.png new file mode 100644 index 000000000..2b1183712 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_gift_exclusive.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_exclusive.webp b/app/src/main/res/drawable-xhdpi/icon_gift_exclusive.webp deleted file mode 100644 index 0e0095f0f..000000000 Binary files a/app/src/main/res/drawable-xhdpi/icon_gift_exclusive.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_limit_time.png b/app/src/main/res/drawable-xhdpi/icon_gift_limit_time.png new file mode 100644 index 000000000..02480a02f Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_gift_limit_time.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_limit_time.webp b/app/src/main/res/drawable-xhdpi/icon_gift_limit_time.webp deleted file mode 100644 index adce7f860..000000000 Binary files a/app/src/main/res/drawable-xhdpi/icon_gift_limit_time.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_new.png b/app/src/main/res/drawable-xhdpi/icon_gift_new.png new file mode 100644 index 000000000..be4f94f7f Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_gift_new.png differ diff --git a/app/src/main/res/drawable-xhdpi/icon_gift_new.webp b/app/src/main/res/drawable-xhdpi/icon_gift_new.webp deleted file mode 100644 index 49a32dcd5..000000000 Binary files a/app/src/main/res/drawable-xhdpi/icon_gift_new.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/icon_room_operation_music.png b/app/src/main/res/drawable-xhdpi/icon_room_operation_music.png new file mode 100644 index 000000000..bd55b684d Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_room_operation_music.png differ diff --git a/app/src/main/res/drawable-xhdpi/img.png b/app/src/main/res/drawable-xhdpi/img.png new file mode 100644 index 000000000..2cec0c450 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/img.png differ diff --git a/app/src/main/res/layout/activity_dress_up_tab.xml b/app/src/main/res/layout/activity_dress_up_tab.xml index 42832348c..f2f91fa34 100644 --- a/app/src/main/res/layout/activity_dress_up_tab.xml +++ b/app/src/main/res/layout/activity_dress_up_tab.xml @@ -62,15 +62,15 @@ @@ -82,6 +82,7 @@ android:layout_height="wrap_content" android:paddingStart="10dp" android:paddingEnd="0dp" + android:layout_marginTop="15dp" app:layout_constraintTop_toBottomOf="@id/infoLayout" app:stl_distributeEvenly="true" app:stl_indicatorThickness="0dp" diff --git a/app/src/main/res/layout/activity_search_user.xml b/app/src/main/res/layout/activity_search_user.xml index a5212a1be..88ab9d0fc 100644 --- a/app/src/main/res/layout/activity_search_user.xml +++ b/app/src/main/res/layout/activity_search_user.xml @@ -1,7 +1,6 @@ @@ -36,12 +35,12 @@ android:paddingStart="45dp" android:paddingEnd="10dp" android:textColor="@color/color_d9e7f7" - android:textColorHint="@color/color_d9e7f7" + android:textColorHint="@color/color_d9e7f7_50" android:textSize="14sp" + android:hint="@string/search_hint" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/title_bar" - tools:text="111" /> + app:layout_constraintTop_toBottomOf="@id/title_bar" /> @@ -112,13 +113,10 @@ + android:layout_height="wrap_content" + android:background="@drawable/ic_dress_dialog_bg"> + android:layout_height="244dp" + android:background="@drawable/ic_dress_item_n" + app:layout_constraintTop_toTopOf="parent" /> @@ -48,9 +47,10 @@ android:layout_height="wrap_content" android:layout_marginHorizontal="9dp" android:lines="1" - android:paddingVertical="6dp" + android:paddingTop="5dp" android:textColor="#d9e7f7" android:textSize="14sp" + app:layout_constraintBottom_toTopOf="@+id/price" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/picBg" @@ -63,9 +63,9 @@ android:layout_marginHorizontal="9dp" android:drawablePadding="2dp" android:gravity="start|center_vertical" - android:paddingBottom="7dp" - android:textColor="#f8ce1f" - android:textSize="12sp" + android:paddingVertical="5dp" + android:textColor="#F8CE1F" + android:textSize="10sp" android:visibility="gone" app:dt_drawableLeftHeight="18dp" app:dt_drawableLeftSrc="@drawable/ic_coin_84" @@ -80,24 +80,20 @@ - diff --git a/app/src/main/res/layout/item_home_hall_right.xml b/app/src/main/res/layout/item_home_hall_right.xml index 136b9bc51..4ade3670e 100644 --- a/app/src/main/res/layout/item_home_hall_right.xml +++ b/app/src/main/res/layout/item_home_hall_right.xml @@ -44,7 +44,7 @@ android:layout_width="@dimen/dp_13" android:layout_height="@dimen/dp_13" android:layout_marginEnd="3dp" - android:src="@mipmap/ic_pretty_account_13dp" + android:src="@mipmap/ic_good_num" android:visibility="gone" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/item_search_user.xml b/app/src/main/res/layout/item_search_user.xml index b80bcc8ff..7581e5bc9 100644 --- a/app/src/main/res/layout/item_search_user.xml +++ b/app/src/main/res/layout/item_search_user.xml @@ -2,6 +2,8 @@ @@ -44,10 +49,8 @@ android:layout_height="wrap_content" android:layout_marginEnd="15dp" android:gravity="center" - android:minWidth="60dp" - android:minHeight="26dp" - android:paddingHorizontal="12dp" - android:paddingVertical="6dp" + android:paddingHorizontal="15dp" + android:paddingVertical="3dp" android:text="@string/ui_search_searchadapter_03" android:textColor="#172055" android:textSize="14sp" diff --git a/app/src/main/res/mipmap-xhdpi/ic_good_num.png b/app/src/main/res/mipmap-xhdpi/ic_good_num.png new file mode 100644 index 000000000..1ac12fc48 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_good_num.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_good_num.webp b/app/src/main/res/mipmap-xhdpi/ic_good_num.webp deleted file mode 100644 index 0ce549cf4..000000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_good_num.webp and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_pretty_account_13dp.webp b/app/src/main/res/mipmap-xhdpi/ic_pretty_account_13dp.webp deleted file mode 100644 index 33742b552..000000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_pretty_account_13dp.webp and /dev/null differ diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 6c1bd5bef..d8d7aeb50 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -1849,7 +1849,7 @@ تأكيد الشراء شراء إلغاء - متجر الادوات + مول أزيائي الأزياء للرأس السيارات @@ -5351,4 +5351,10 @@ احصل عليها فقط في الحدث احصل عليها فقط في الحدث، لا يمكن الشراء "%2$s/%1$s يوم %3$s " + حظر المشرف الأعلى + وقت الحظر + سبب الحظر + يرجى إدخال سبب الحظر، والذي سيكون مرئيًا في الخلفية + %s ساعات + التطبيق يقصر التسجيل على المستخدمين الذين تقل أعمارهم عن 18 عاماً \ No newline at end of file diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index f42562f72..9e55fd39f 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -1748,7 +1748,7 @@ Toplam imza alın, ilgili ödülü alın Satın alma onayı Satın al İptal - Süsleme Mağazası + Mağaza Benim Süslemelerim Başlık Araç @@ -5147,4 +5147,10 @@ Toplam imza alın, ilgili ödülü alın Yalnızca Etkinliğe Göre Alın Yalnızca etkinliğe göre alın, satın alınamaz. %1$s/%2$sgün %3$s + Süper Yönetici Engelleme + Engellenen zaman + Engellenme nedeni + Lütfen arka planda görünecek olan engelleme nedenini girin + %s saat + Bu uygulamada 18 yaş altında olan kişiler hesabı açmaz. diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 8be444a26..aae75d759 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -1865,7 +1865,7 @@ 購買確認 購買 取消 - 裝扮商城 + 商城 我的裝扮 頭飾 座駕 @@ -5294,5 +5294,11 @@ 僅參與活動獲得 僅參與活動獲得,無法購買 %1$s/%2$s天 %3$s + 超级管理员封禁 + 封禁时间 + 封禁原因 + 请输入封禁原因,该原因将在后台可见 + %s 小时 + APP限制18歲以下用戶註冊。 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 13b531e90..c222b99a1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -381,7 +381,7 @@ Customer Service Hotline: %1$s Family Guide - Quick Start Tutorial + Hızlı Start Tutorial Distance to Previous Rank Family ID: %1$s @@ -979,8 +979,8 @@ Personal Center Banner Module Click - Personal Center Quick Access Room Click Successfully Matched - Personal Center Quick Access Room Click Successfully Matched + Personal Center Hızlı Access Room Click Successfully Matched + Personal Center Hızlı Access Room Click Successfully Matched Short of Upgrade Power Value Noble My Entry Click Event @@ -2102,7 +2102,7 @@ No rooms available Loading… Unknown error - Personal center quick entry room click failed to match + Personal center Hızlı entry room click failed to match Recommended Recommended No data @@ -3323,7 +3323,7 @@ More Popular anchors More - Quick match + Hızlı match There are many interesting people and rooms waiting for you to discover~ Make friends and chat People you follow @@ -5240,7 +5240,7 @@ You cannot join again within 24 hours after leaving Medal Room type After the setting is completed, members who are out of the microphone order will be removed. Do you confirm the setting? - Classic + Klasik Party Carnival Using @@ -5361,12 +5361,12 @@ You cannot join again within 24 hours after leaving Only get by event, cannot buy. %1$s/%2$sD %3$s - 封禁 - 封禁 - 封禁说明 - 封禁说明输入提示 - %s 小时 - 18限制 + Super Admin Block + Blocked time + Blocked reason + Please enter the block reason, which will be visible in the background + %s hours + APP restricts registration to users under 18 years old. diff --git a/app/src/module_labour_union/res/layout/item_member.xml b/app/src/module_labour_union/res/layout/item_member.xml index abaee418c..019741ec6 100644 --- a/app/src/module_labour_union/res/layout/item_member.xml +++ b/app/src/module_labour_union/res/layout/item_member.xml @@ -122,7 +122,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="3dp" - android:src="@mipmap/ic_pretty_account_13dp" + android:src="@mipmap/ic_good_num" android:visibility="gone" /> 0 || rightTopRadius > 0 || rightBottomRadius > 0 || leftBottomRadius > 0) { - // topLeftRadius, topLeftRadius, - // topRightRadius, topRightRadius, - // bottomRightRadius, bottomRightRadius, - // bottomLeftRadius, bottomLeftRadius - shape.setCornerRadii(new float[]{leftTopRadius, leftTopRadius, rightTopRadius, rightTopRadius, rightBottomRadius, rightBottomRadius, leftBottomRadius, leftBottomRadius}); + if (OtherExtKt.isRtl(getContext())) { + shape.setCornerRadii(new float[]{rightTopRadius, rightTopRadius,leftTopRadius, leftTopRadius, leftBottomRadius, leftBottomRadius, rightBottomRadius, rightBottomRadius}); + } else { + shape.setCornerRadii(new float[]{leftTopRadius, leftTopRadius, rightTopRadius, rightTopRadius, rightBottomRadius, rightBottomRadius, leftBottomRadius, leftBottomRadius}); + } } } //设置边框的厚度和颜色 @@ -439,7 +439,7 @@ public class DrawableTextView extends AppCompatTextView { paddings[2] = drawableRightPadding; paddings[3] = drawableBottomPadding; - if (UiUtils.INSTANCE.isRtl(getContext())) { + if (OtherExtKt.isRtl(getContext())) { paddings[0] = drawableRightPadding; paddings[2] = drawableLeftPadding; } else { @@ -515,7 +515,7 @@ public class DrawableTextView extends AppCompatTextView { bottom.setBounds(0, 0, getDrawableWidth(bottom, mDrawableBottomWidth), getDrawableHeight(bottom, mDrawableBottomHeight)); } - if (UiUtils.INSTANCE.isRtl(getContext())) { + if (OtherExtKt.isRtl(getContext())) { setCompoundDrawables(right, top, left, bottom); } else { setCompoundDrawables(left, top, right, bottom); diff --git a/libs/lib_utils/src/main/java/com/example/lib_utils/spannable/SpannableTextBuilder.kt b/libs/lib_utils/src/main/java/com/example/lib_utils/spannable/SpannableTextBuilder.kt index 6fb11ce25..8697ba8a1 100644 --- a/libs/lib_utils/src/main/java/com/example/lib_utils/spannable/SpannableTextBuilder.kt +++ b/libs/lib_utils/src/main/java/com/example/lib_utils/spannable/SpannableTextBuilder.kt @@ -445,11 +445,13 @@ class SpannableTextBuilder(private val textView: TextView) { fun addTextStyleList(list: List) : SpannableTextBuilder{ var start = 0; list.forEach { - start = spannableBuilder.indexOf(it.text, start+1) - val end = start + it.text.length + val indexStart = start + val findIndex = spannableBuilder.toString().indexOf(it.text, indexStart) + val end = findIndex + it.text.length + start = end setTextStyle( it.text, - start, + findIndex, end, it.textColor, it.backgroundColor,