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