This repository was archived by the owner on Jun 7, 2020. It is now read-only.
[FIX][IMPROVEMENT][I18N] Adds support for RTL ViewPager for RTL languages #2304
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@RocketChat/android
Closes #2301
Hopefully this pull request is the last one to fully support RTL languages in Rocket.Chat Android app.
The RTL ViewPager is based on Duolingo's RtlViewPager; however, I rewrote the code in Kotlin, and modified some parts of it.
Changes:
ic_send_24dp.xml), drawing send icon (ic_send_black_24dp.xml) and backspace icon (ic_backspace_gray_24dp.xml) be auto-mirrored for RTL languages.Note: There is a known bug, however, as displayed in the GIF, in which sometimes the tabs of Emoji categories are in text instead of icons. I doubt though that this issue has something to deal with the adapter. The adapter is working perfectly. I tried debugging a lot, and tried checking for line 180 in
EmojiKeyboardPopupand line 67 inEmojiPickerPopup, and the resource icon is always set, but does not appear on the layout. I think the issue might be in lines 177, 178 inEmojiKeyboardPopupand lines 64, 65 inEmojiPickerPopup; however, that's just a guess. I do not know the issue exactly. I also noticed it depends on the width of the tabs. If you tried rotating your device to landscape mode, things can change here.GIF for the change: