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

setVisibility on android native view module #5531

Closed
soxunyi opened this issue Jan 25, 2016 · 6 comments
Closed

setVisibility on android native view module #5531

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

Comments

@soxunyi
Copy link

soxunyi commented Jan 25, 2016

I use android native view in js file,If a sub view 'mViewXXX' of native view is setVisibility(View.GONE) before render on screen, and click other button of native view to show mViewXXX(using setVisibility(VISIBLE)), but mViewXXX is not show on screen. And I found its width and height are both zero, but its visibility is VISIBLE. Why from setVisibility(GONE) to setVisibility(VISIBLE) not work? Anyone encounter this issue?

@facebook-github-bot
Copy link
Contributor

Hey soxunyi, 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!

@satya164
Copy link
Contributor

Can you give an example and code sample on what are you trying to achieve?

@soxunyi
Copy link
Author

soxunyi commented Jan 30, 2016

@satya164
I submit demo project as follows:https://github.com/soxunyi/reactnative_android_nativeview_visibility_issue

Please run react-native run-android, then click button ’Click me!‘ on home page, but the right button can not be shown. You can see the following code in MyView.java

Button bt1 = (Button) view.findViewById(R.id.btn_test1);
        final Button bt2 = (Button) view.findViewById(R.id.btn_test2);
        bt1.setOnClickListener(new OnClickListener() {
            @Override public void onClick(View v) {
                bt2.setVisibility(View.VISIBLE);
                Toast.makeText(mReactContext, "Button 2 should be shown! But not shown! Why?", Toast.LENGTH_LONG).show();
            }
        });

Thanks

@satya164
Copy link
Contributor

@facebook-github-bot stack-overflow

@facebook-github-bot
Copy link
Contributor

Hey @soxunyi and thanks for posting this! @satya164 tells me this issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Mar 20, 2016
@charpeni
Copy link
Contributor

charpeni commented Feb 8, 2018

@soxunyi have you found out why? I think I may have encounter this issue as well in RN 0.52.

@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

6 participants