-
Notifications
You must be signed in to change notification settings - Fork 50
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
How to handle multiple gone views? #125
Comments
I am not sure I understand this correctly. Are your views overlapping when some of them are set to visibility=gone? Can you share screenshots if possible? |
Gotcha. Views with a visibility of view.layoutBy(
x = if (otherView.isVisible) otherView.bottom() else parent.top(),
y = ...
) The other option would be to keep them invisible but then they'll consume space on the screen. |
Only concern i see with the first approach is it get unwieldy with more components. . Maybe would be nice to have a helper function built in where a view can align to the first visible view. (Grant it i can do it myself in code in but I could see this being an issue for others coming from xml used to just doing gone on views and the alignments auto adjusting)
suggestion something like below
|
I have a header and chip group that can be visible, or gone. What is the best way to handle this and not have views overlap? It seems that if the view that visible relies on the view that gone it doesn't always evaluate correct.
Here is the sample in the init of the conditional fields. if for example there is no demographic then i hide the text and chips. This seems to work in some scenarios. One that does does not work is if contentType, format, theme are gone. Then the genre text overlaps in the demographic chip.
The text was updated successfully, but these errors were encountered: