I have a search function in my app that shows a text box with a slide in animation when clicked and automatically requests focus on the text box.
I wanted to make it that this animation is reversed and the screen goes back to normal(without the text box) if the user clicks anywhere outside the text box.
I figured that the function (when textbox lost focus…DO… ) is able to do that because normally the text box should lose focus when ever the user clicks something else, but apparently nothing cause text box to lose focus , not clicking something else or even finishing typing. if this is true this function is useless or is something wrong in the companion?
the question remains how do I reverse the animation when the user clicks on something else other than the text box?