[Modify]登錄功能修改和房間内送禮飄屏隱藏

This commit is contained in:
wushaocheng
2023-08-16 18:27:33 +08:00
parent d46ec289ea
commit c36f127bce
5 changed files with 6 additions and 64 deletions

View File

@@ -130,63 +130,8 @@ public class GiftEffectView extends RelativeLayout implements SVGACallback {
giftInfo = giftEffectInfo.getGift();
}
if (giftInfo != null) {
int totalCoin = giftInfo.getGoldPrice() * giftEffectInfo.getGiftNum() * giftEffectInfo.getTargetUsers().size();
if (totalCoin >= 520 &&
giftEffectInfo.getGiftReceiveType() != GiftEffectInfo.GIFT_RECEIVE_TYPE_LUCKY
&& !AvRoomDataManager.get().isSelfGamePlaying()) {//礼物栏
ImageLoadUtils.loadImage(benefactorAvatar.getContext(), giftEffectInfo.getAvatar(), benefactorAvatar);
ImageLoadUtils.loadImage(giftImg.getContext(), giftInfo.getGiftUrl(), giftImg);
benefactorNick.setText(giftEffectInfo.getNick());
giftNumber.setText("X" + giftEffectInfo.getGiftNum());
giftName.setText(giftInfo.getGiftName());
container.setVisibility(VISIBLE);
isPlayAnim = true;
if (giftEffectInfo.getGiftReceiveType() == GiftEffectInfo.GIFT_RECEIVE_TYPE_SINGLE) {
GiftReceiver giftReceiver = giftEffectInfo.getTargetUsers().get(0);
ImageLoadUtils.loadAvatar(receiverAvatar.getContext(), giftReceiver.getAvatar(), receiverAvatar);
receiverNick.setText(giftReceiver.getNick());
} else if (giftEffectInfo.getGiftReceiveType() == GiftEffectInfo.GIFT_RECEIVE_TYPE_ALL) {
receiverAvatar.setImageResource(R.mipmap.app_logo);
receiverNick.setText(ResUtil.getString(R.string.avroom_widget_gifteffectview_01));
} else if (giftEffectInfo.getGiftReceiveType() == GiftEffectInfo.GIFT_RECEIVE_TYPE_MULTI) {
receiverAvatar.setImageResource(R.mipmap.app_logo);
StringBuilder sb = new StringBuilder();
for (GiftReceiver targetUser : giftEffectInfo.getTargetUsers()) {
RoomQueueInfo roomQueueInfo = AvRoomDataManager.get().getRoomQueueMemberInfoByAccount(targetUser.getUid() + "");
if (roomQueueInfo == null) continue;
sb.append(roomQueueInfo.mRoomMicInfo.getPosition() + 1).append(ResUtil.getString(R.string.avroom_widget_gifteffectview_02)).append(",");
}
if (sb.length() > 0) {
sb.replace(sb.lastIndexOf(","), sb.length(), "");
}
receiverNick.setText(sb.toString());
}
Animation operatingAnim = AnimationUtils.loadAnimation(getContext(), R.anim.light_bg_rotate_anim);
LinearInterpolator lin = new LinearInterpolator();
operatingAnim.setInterpolator(lin);
giftLightBg.setAnimation(operatingAnim);
final Point center = new Point();
center.x = ResolutionUtils.getScreenWidth(getContext()) / 2;
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(container, "translationX", -UIUtil.dip2px(getContext(), 400), center.x - container.getWidth() / 2).setDuration(1250);
objectAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
objectAnimator.start();
ObjectAnimator objectAnimator1 = ObjectAnimator.ofFloat(container, "alpha", 0.0F, 1.0F).setDuration(1250);
objectAnimator1.setInterpolator(new AccelerateDecelerateInterpolator());
objectAnimator1.start();
if (totalCoin < 4999) {
imgBg.setImageResource(R.drawable.icon_gift_effect_bg_1);
} else if (totalCoin < 9999) {
imgBg.setImageResource(R.drawable.icon_gift_effect_bg_2);
} else {
imgBg.setImageResource(R.drawable.icon_gift_effect_bg_3);
}
} else {
isPlayAnim = false;
container.setVisibility(INVISIBLE);
}
isPlayAnim = false;
container.setVisibility(INVISIBLE);
effectHandler.sendEmptyMessageDelayed(0, 4000);
if (giftInfo.getOtherViewType() == 1 && !TextUtils.isEmpty(giftInfo.getViewUrl())) {
drawVAPEffect(giftInfo.getViewUrl());

View File

@@ -36,7 +36,7 @@ class LoginBoundAuthCodeActivity : BaseViewBindingActivity<ActivityLoginBoundAut
override fun init() {
binding.btnNext.setOnClickListener(this)
binding.btnNext.addTextChangedListener(object : TextWatcher {
binding.etAccount.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
@@ -46,8 +46,7 @@ class LoginBoundAuthCodeActivity : BaseViewBindingActivity<ActivityLoginBoundAut
}
override fun afterTextChanged(s: Editable?) {
val enabled = !TextUtils.isEmptyText(binding.etAccount.text.toString())
&& binding.etAccount.text.toString().trim { it <= ' ' }.isNotEmpty()
val enabled = binding.etAccount.text.toString().trim { it <= ' ' }.isNotEmpty()
binding.btnNext.isEnabled = enabled
}

View File

@@ -54,7 +54,6 @@
android:text="@string/login_google"
android:textColor="@color/color_6D6B89"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
@@ -103,7 +102,6 @@
android:text="@string/login_facebook"
android:textColor="@color/color_6D6B89"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
@@ -153,7 +151,6 @@
android:text="@string/login_line"
android:textColor="@color/color_6D6B89"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>

View File

@@ -80,7 +80,7 @@
android:background="@drawable/bg_common_enabled"
android:enabled="false"
android:gravity="center"
android:text="@string/text_login"
android:text="@string/finish"
android:textColor="@color/white"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />

View File

@@ -5116,5 +5116,6 @@
<string name="set_login_password">設置登錄密碼</string>
<string name="set_login_password_tip">為了方便您下次登錄,請先設置登錄密碼</string>
<string name="last_login">上次登錄</string>
<string name="finish">完成</string>
</resources>