Reputation: 450
So according to android documentation, defaultBehaviour
is deprecated and AttachedBehaviour
should be used instead.
However:
does not "exist" in android. I always receive the Annotation type expected
error.
My import is:
import androidx.coordinatorlayout.widget.CoordinatorLayout;
Am I using the wrong import?
Upvotes: 2
Views: 398
Reputation: 199805
AttachedBehavior
is an interface, not an annotation.
Therefore your CustomLinearLayout
must implement AttachedBehavior
and override the getBehavior()
method to return an instance of your MoveUpwardBehavior
class.
Upvotes: 3