fix:修复开红包结果页的view隐藏展示问题
fix:修复发红包背景展示问题
This commit is contained in:
@@ -341,9 +341,7 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
* @param optAdapter
|
||||
*/
|
||||
private void addRedPacketAction(OptAdapter optAdapter) {
|
||||
// TODO 临时打开
|
||||
// if (AvRoomDataManager.get().isRedEnvelopeOpen()) {
|
||||
if (true) {
|
||||
if (AvRoomDataManager.get().isRedEnvelopeOpen()) {
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo == null) {
|
||||
return;
|
||||
@@ -354,7 +352,6 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -119,7 +119,7 @@ class RedPackageHandler : RoomHandler() {
|
||||
* 请求刷新Icon(数据已过期)
|
||||
*/
|
||||
fun requestRefreshIcon() {
|
||||
updateIcon(null)
|
||||
// updateIcon(null)
|
||||
requestLatestRoomRedPackage()
|
||||
}
|
||||
}
|
@@ -15,6 +15,7 @@ import com.chuhai.utils.ServiceTime
|
||||
import com.chuhai.utils.ktx.getColorById
|
||||
import com.chuhai.utils.ktx.singleClick
|
||||
import com.chuhai.utils.ktx.toStringRes
|
||||
import com.chuhai.utils.log.ILog
|
||||
import com.chuhai.utils.spannable.spannableBuilder
|
||||
import com.trello.rxlifecycle3.android.FragmentEvent
|
||||
import com.yizhuan.erban.R
|
||||
@@ -46,7 +47,7 @@ import java.util.concurrent.TimeUnit
|
||||
* Desc:领取红包
|
||||
**/
|
||||
@ActLayoutRes(R.layout.red_package_open_dialog)
|
||||
class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>() {
|
||||
class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>(), ILog {
|
||||
|
||||
private var btnAnimator: ObjectAnimator? = null
|
||||
|
||||
@@ -163,8 +164,8 @@ class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>() {
|
||||
* 加载可领取数据
|
||||
*/
|
||||
private fun loadOpen(data: RedPackageData) {
|
||||
binding.groupOpen.isVisible = true
|
||||
binding.groupResult.isVisible = false
|
||||
switchResultViewVisible(false)
|
||||
switchOpenViewVisible(true)
|
||||
binding.ivSendAvatar.loadAvatar(data.avatar)
|
||||
binding.tvSendName.text = data.nick
|
||||
loadTips(data)
|
||||
@@ -372,14 +373,18 @@ class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>() {
|
||||
*/
|
||||
private fun loadResult(data: RedPackageInfo?) {
|
||||
binding.layoutContent.setBackgroundResource(R.drawable.red_package_result_bg)
|
||||
binding.groupOpen.isVisible = false
|
||||
binding.groupResult.isVisible = true
|
||||
switchOpenViewVisible(false)
|
||||
switchResultViewVisible(true)
|
||||
binding.groupResultMoney.isVisible = false
|
||||
binding.tvResultEmptyTips.isVisible = false
|
||||
binding.ivResultSendAvatar.loadAvatar(data?.redEnvelopeVO?.userVO?.avatar)
|
||||
binding.tvResultSendName.text = data?.redEnvelopeVO?.userVO?.nick ?: ""
|
||||
val name = data?.redEnvelopeVO?.userVO?.nick ?: ""
|
||||
binding.tvResultSendName.text = name?.take(8) + "..的紅包"
|
||||
if (name.length > 8) {
|
||||
binding.tvResultSendName.text = name?.take(8) + "..的紅包"
|
||||
} else {
|
||||
binding.tvResultSendName.text = name + "的紅包"
|
||||
}
|
||||
binding.tvMessage.text = data?.redEnvelopeVO?.message
|
||||
binding.tvCount.text = R.string.red_package_result_count_format.toStringRes()
|
||||
.format(data?.redEnvelopeVO?.pickNum ?: 0, data?.redEnvelopeVO?.totalNum ?: 0)
|
||||
@@ -460,6 +465,17 @@ class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun switchResultViewVisible(isVisible: Boolean) {
|
||||
binding.groupResult.isVisible = isVisible
|
||||
binding.groupResultMoney.isVisible = isVisible
|
||||
binding.tvResultEmptyTips.isVisible = isVisible
|
||||
}
|
||||
|
||||
private fun switchOpenViewVisible(isVisible: Boolean) {
|
||||
binding.groupOpen.isVisible = isVisible
|
||||
binding.tvOpenTips.isVisible = isVisible
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
btnAnimator?.cancel()
|
||||
|
@@ -171,7 +171,7 @@
|
||||
android:id="@+id/group_open"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="layout_btn,iv_send_avatar,tv_send_name,tv_open_tips"
|
||||
app:constraint_referenced_ids="layout_btn,iv_send_avatar,tv_send_name"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
@@ -335,7 +335,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="recyclerView,tv_count,tv_message,tv_result_send_name,iv_result_send_avatar,tv_money,tv_money_tips,iv_money,tv_result_empty_tips"
|
||||
app:constraint_referenced_ids="recyclerView,tv_count,tv_message,tv_result_send_name,iv_result_send_avatar"
|
||||
tools:visibility="gone" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
android:id="@+id/iv_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/red_package_send_bg"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
@@ -31,8 +31,8 @@ COMPILE_SDK_VERSION=33
|
||||
MIN_SDK_VERSION=21
|
||||
TARGET_SDK_VERSION=33
|
||||
|
||||
version_name=2.1.0
|
||||
version_code=2007
|
||||
version_name=2.2.0
|
||||
version_code=2220
|
||||
|
||||
#systemProp.https.proxyHost=127.0.0.1
|
||||
#systemProp.https.proxyPort=7890
|
Reference in New Issue
Block a user