[Resolved] Can You Collapse The Height Of A View When Hidden?


I’m trying to collapse the height of an element when it’s hidden so that the blank space is no longer blank.

is this possible? Or is there a workaround so that there isn’t a massive space where the element was hidden?

I can’t seem to adjust constraints by setting a value, which would be great.


Hi @justincrabbe. Great question!

I do not believe there is a way to achieve this at this moment, but I will escalate this question to one of our more experienced mobile engineers. Most of our team members are currently spending the holidays with their friends and family, so a response might take a bit longer than usual.


HI @catencio! If there was an option to set value of any elements vertical constraints from 0px (hidden) to any number to make it visible again that would be great too.


This is definitely a useful feature to have. Unfortunately, we do not have that capability at this time, but I have recorded it and communicated it back to the rest of the team. Hopefully this is something that we could add in the short term future.


@justincrabbe I’d be curious to know the context of what you’re trying to do here. What sort of element would you like to adjust the height for to eliminate a large blank space for? Is this is a dynamic element like a tables cell for instance?


Basically I’m making a date picker manually using a hidden element that’s exposed on the click of another element.

So when it’s exposed, it should essentially function like a drop down menu, pushing the element below it down to make space for the drop down, then when the user selects a drop down item i have an action that hides the view and should then bring up the element it pushed lower back to its original position.


Interesting. Do you know there’s a “Show a Date Picker” action you can do natively at a event trigger?

Have you figured out how to make the element below the dropdown move up and down when the date picker view is shown? I didn’t think that possible since elements are constrained to the view and not off of other elements.


No that’s the issue. Right now it doesn’t move up/down (which would be ideal).

And I’m trying to create a number picker not a date picker (my mistake in the above post) that has a list of numbers.

So i created a hidden view that has a static list of 1-10 thats shown on click of another element.


We don’t have a way to move elements yet but we’ll add it to the feature request tracker.

What if you used the native dropdown element and show and hid that appropriately like you want. You won’t be able to move thing down but you can have it appear on top of other elements, then when the user selects 1, you can hide it again.


I’ll try it out but will likely wait till the functionality is there and just work around it for now.


@wade I konw that this was solved for the original author but I am curious to show a date picker when focusing on a text box. I don’t see this as a native option? Am I missing something?


There is a focus changed event that will give a trigger point for this. Now this won’t work with a textview because tapping on it isn’t putting focus on it. You display text in a textview, you don’t write text into it.

This will work as I described though for a textfield for instance. Try it out.


Hey Wade, I’m using a text field for this and I’m changing the event trigger for the Focused event. See screenshot for the options in the events trigger that have searched for Date.


Matt, apologies I thought you were talking about an Android project. In an iOS project, native date pickers are an element that you drag onto a page like any other element. You can hide/show them when you want to see if them if that’s your use case but this is an area where Android and iOS design guidelines differ and that’s why we accommodate them differently per each platform.


No worries! I thought that might be the case. Thanks for the help!