You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
#126
Closed
shekita88 opened this issue
Mar 13, 2021
· 1 comment
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.
demographicText.layoutBy(
x = leftTo { parent.left() },
y = topTo { descriptionExpanded.bottom() }
)
demographicChips.layoutBy(
x = matchParentX(),
y = topTo { demographicText.bottom() - 8.ydip }
)
contentTypeText.layoutBy(
x = leftTo { parent.left() },
y = topTo { demographicChips.bottom() }
)
contentTypeChips.layoutBy(
x = matchParentX(),
y = topTo { contentTypeText.bottom() - 8.ydip }
)
formatText.layoutBy(
x = leftTo { parent.left() },
y = topTo { contentTypeChips.bottom() }
)
formatChips.layoutBy(
x = matchParentX(),
y = topTo { formatText.bottom() - 8.ydip }
)
themeText.layoutBy(
x = leftTo { parent.left() },
y = topTo { formatChips.bottom() }
)
themeChips.layoutBy(
x = matchParentX(),
y = topTo { themeText.bottom() - 8.ydip }
)
genreText.layoutBy(
x = leftTo { parent.left() },
y = topTo { themeChips.bottom() }
)
genreChips.layoutBy(
x = matchParentX(),
y = topTo { genreText.bottom() - 8.ydip }
)
altTitlesText.layoutBy(
x = leftTo { parent.left() },
y = topTo { genreChips.bottom() }
)
altTitles.layoutBy(
x = matchParentX(),
y = topTo { altTitlesText.bottom() - 12.ydip }
)
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.
Originally posted by @CarlosEsco in #125
The text was updated successfully, but these errors were encountered: