Skip to main content
RReta.1
Associate II
January 19, 2021
Solved

How do I grey out / disable a widget?

  • January 19, 2021
  • 2 replies
  • 1719 views

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.

This topic has been closed for replies.
Best answer by Alexandre RENOUX

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

2 replies

Mathew Grabau
Associate II
January 19, 2021

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
Alexandre RENOUXBest answer
Visitor II
January 20, 2021

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