Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolbarAndroid doesn't play well with DrawerLayoutAndroid with app RTL #5147

Closed
avishayil opened this issue Jan 6, 2016 · 3 comments
Closed
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@avishayil
Copy link

Hi,
I noticed some problems while browsing ToolbarAndroid options.
I followed the documentation:
https://facebook.github.io/react-native/docs/toolbarandroid.html
Added the android:supportsRtl="true" parameter to my AndroidManifest.xml. and set the mReactRootView.setLayoutDirection(1) like the function documentation says to get my application RTLed.
The result was correct, but some things were buggy:

  1. Adding rtl={true} to ToolbarAndroid returned the app state to LTR.
  2. Defining DrawerLayoutAndroid drawerPosition parameter to {DrawerLayoutAndroid.positions.Right} made the drawer open from the left. Also, In the first time the drawer were triggered, it "flew" from the right to the left. When changing the value to {DrawerLayoutAndroid.positions.Left}, it were triggered from the right side but "flew" from the left side as well.

Simplified, there are two problems:

  1. DrawerLayoutAndroid and RTLing the app using android:supportsRtl="true" and setLayoutDirection(1), combined with {DrawerLayoutAndroid.positions} parameter causing the drawer to be opened from the wrong side, and to "fly" from the opposite side instead of flowing from the chosen one.
  2. ToolbarAndroid rtl={true} parameter, combined with android:supportsRtl="true" and setLayoutDirection(1), is causing the opposite effect. Leaving the app without the rtl parameter works well.
@facebook-github-bot
Copy link
Contributor

Hey avishayil, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@christopherdro
Copy link
Contributor

@facebook-github-bot no-reply

@facebook-github-bot
Copy link
Contributor

Closing this issue as more information is needed to debug this and we haven't heard back from the author. Once there's more information we can reopen the issue.

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Mar 20, 2016
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants