fix: 調整多語言時,點擊 tab 的移動判斷

This commit is contained in:
eggmanQQQ
2024-08-05 19:22:44 +08:00
parent b5bcd9cb5f
commit 7ef78bc3e1

View File

@@ -777,7 +777,9 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
updateDrawGift();
giftIndicator.post(() -> {
boolean isRTL = UiUtils.INSTANCE.isRtl(getContext());
if (position < TYPE_WEEK) {
// if (position < TYPE_WEEK) { GiftModel.get().getTabList().size()/2;
int centerIndex = GiftModel.get().getTabList().size()/2;
if (position < centerIndex) {
giftIndicator.fullScroll(isRTL ? View.FOCUS_RIGHT : View.FOCUS_LEFT);
} else {
giftIndicator.fullScroll(isRTL ? View.FOCUS_LEFT : View.FOCUS_RIGHT);