Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Conversation

@hfeky
Copy link
Contributor

@hfeky hfeky commented May 7, 2019

@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:

  1. Added support for RTL ViewPager. Now one can swipe from right to left in Emoji Picker fragments for RTL languages.
  2. Made message send icon (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.
  3. Merged Preferences messages with Settings messages in all strings resource files.
  4. Corrected some typos and translation mistakes in Arabic strings resource file.

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 EmojiKeyboardPopup and line 67 in EmojiPickerPopup, and the resource icon is always set, but does not appear on the layout. I think the issue might be in lines 177, 178 in EmojiKeyboardPopup and lines 64, 65 in EmojiPickerPopup; 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:

RTL ViewPager

@hfeky
Copy link
Contributor Author

hfeky commented May 7, 2019

@filipedelimabrito I wonder what the issue can be. Do you have any idea?

@philipbrito
Copy link
Contributor

@HusseinElFeky I'm not sure the issue you are referencing for (couldn't see the tabs of Emoji categories being shown as text instead of icons). Could you please create an issue for this by describing or showing by images about this issue?

This PR is good enough to be blocked by this issue 😁
Thank you.

@hfeky
Copy link
Contributor Author

hfeky commented May 14, 2019

@filipedelimabrito Yes, they sometimes occur as text and sometimes not, as shown in the GIF. I know that's very weird. I will make sure to debug this issue more. If I couldn't know the reason, I will create an issue for that soon.

@philipbrito philipbrito added this to the 3.4.0 milestone May 14, 2019
@philipbrito philipbrito changed the title [FIX] Adds support for RTL ViewPager for RTL languages [FIX][IMPROVEMENT][I18N] Adds support for RTL ViewPager for RTL languages May 14, 2019
@philipbrito philipbrito merged commit 475f195 into RocketChat:develop May 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Emoji Picker ViewPager does not support RTL swiping for RTL languages

2 participants