5

I came across the View.isActivated() method recently and am not sure what it does. The documentation says:

public boolean isActivated ()

Indicates the activation state of this view.

Returns true if the view is activated, false otherwise

What does the state of a view mean? And when would a View be activated vs not activated?

Community
  • 1
  • 1
guribe94
  • 1,551
  • 3
  • 15
  • 29

1 Answers1

5

Activation is a longer-term state that the user can move views in and out of. For example, in a list view with single or multiple selection enabled, the views in the current selection set are activated. (Um, yeah, we are deeply sorry about the terminology here.) The activated state is propagated down to children of the view it is set on.

Source: http://developer.android.com/reference/android/view/View.html#setActivated(boolean)

davidgiga1993
  • 2,695
  • 18
  • 30