[TIMOB-27307] Add visibility property to views to support collapse
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Brenton House |
Assignee | Unknown |
Created | 2019-08-05T15:11:12.000+0000 |
Updated | 2019-08-06T20:12:24.000+0000 |
Description
Add visibility property to View (and any control that inherits from View) to support collapse, in addition to hidden.
Currently, if you want to collapse a view and you set the visible property to false, it will be invisible but still take up real estate on the screen. Would be great to support a "visibility" property (and probably align it with the CSS property def: https://www.w3schools.com/cssref/pr_class_visibility.asp) so that a control can be hidden and collapsed.
<View visibility="hidden" />
<View visibility="collapse" />
<View visibility="visible" />
You can set the view's "width" and "height" properties to zero to collapse it. Most native UI frameworks (particularly Apple's and Microsoft's) don't support a "collapse" like property. Meaning we would have to set the width/height to zero natively anyways to do this. Titanium is tightly bound to native UI and I think we should accept this behavior. Note that Android supports a "collapse" like feature via
View.GONE
, but this is the only native UI framework that I know of that does.Note that Android also supports this on Titanium already, e.g. hidden vs. gone. It just needs iOS parity