Search code examples
androidstackview

Dynamic equivalent of these XML properties for a StackView


I am dynamically creating a StackView object in my Android project. How can I accomplish the following equivalent properties dynamically through code?

android:animateLayoutChanges="true"
android:loopViews="true"

Solution

  • Here's the first:

    http://developer.android.com/reference/android/view/ViewGroup.html#setLayoutTransition

    The second apparently has no related methods:

    http://developer.android.com/reference/android/widget/AdapterViewAnimator.html#attr_android:loopViews