cancel
Showing results for 
Search instead for 
Did you mean: 

How do I grey out / disable a widget?

RReta.1
Associate III

Hello,

I have a use case where a custom container with a ScrollList of items need to be displayed but grey-ed out and disabled (as in not touchable) at the start of the screen transition and only becomes active once a button on the screen is clicked (e.g. an "Edit" button).

What is the recommended way to achieve this?

Thanks for everyone's time.

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello RReta.1,

One way to do this that comes to mind is to call myCustomerContainer.setTouchable(false). This will prevent your custom Container from receiving click, drag and swipe events.

To grey out the container, I believe you can have a grey box with alpha on top of your container that you setVisible(true) or setVisible(false) accordingly.

/Alexandre

View solution in original post

2 REPLIES 2
Mathew Grabau
Associate III

One idea I have been playing with (and starting to prototype) is a template like MoveAnimator, etc. I haven't given it too much investigation yet.

Alexandre RENOUX
Principal

Hello RReta.1,

One way to do this that comes to mind is to call myCustomerContainer.setTouchable(false). This will prevent your custom Container from receiving click, drag and swipe events.

To grey out the container, I believe you can have a grey box with alpha on top of your container that you setVisible(true) or setVisible(false) accordingly.

/Alexandre