Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27307] Add visibility property to views to support collapse

GitHub Issuen/a
TypeNew Feature
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterBrenton House
AssigneeUnknown
Created2019-08-05T15:11:12.000+0000
Updated2019-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" />

Comments

  1. Joshua Quick 2019-08-05

    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.
  2. Hans Knöchel 2019-08-06

    Note that Android also supports this on Titanium already, e.g. hidden vs. gone. It just needs iOS parity

JSON Source