I have a situation where I need to disable user interaction with user inputs , like i have filled username now i need to authenticate it with server. So the time while xhr is authenticating user cannot interact and navigate with the current view and its elements/objects Like other input fields ..
4 Answers
Accepted Answer
@gaurav you can try adding a layout over the top of everthing with
var overlay_view = Ti.Ui.createView({ height:'100%', width:'100%', top:0, left:0 }) win.add(overlay_view);Don't assign any color to it or if u want you can add some color and opacity of .8 or .7
This will make it on top of everything and user will not be ale to interact with anything !!
Hi, Good option is to add activity indicator to window , when authenticate it with server , activity indicator block the Ui , means user can not interact with the inputs.
Add a layer of view with top: 0, left: 0, right: 0, bottom: 0, backgroundColor: "transparent". Then add an activity indicator on it.. hide/show the view based on your requirement.
Hi Gaurav Sood,
First option is to use Activity Indicator but if you want to use this then it's ok but If you are using TabGroup then you can set tabGroup.touchEnabled = false after you get response then reset it tabGroup.touchEnabled = true.
Your Answer
Think you can help? Login to answer this question!