#android
Вопрос:
<ScrollView
android:id="@ id/scrollView"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@ id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TableLayout
android:id="@ id/tableLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#333"
android:shrinkColumns="1"
android:stretchColumns="1" />
</LinearLayout>
<LinearLayout
android:id="@ id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
</ScrollView>
Ява:
LinearLayout ll = findViewById(R.id.linearLayout);
ll.addView(myButton)
Приведенный выше код обычно работает нормально. Иногда ll.addView(MyButton) выдает:
Exception: Circular dependencies cannot exist in AnimatorSet
Class: java.lang.IllegalStateException
Stack trace: java.lang.IllegalStateException: Circular dependencies cannot exist in AnimatorSet
at android.animation.AnimatorSet.sortNodes(AnimatorSet.java:922)
at android.animation.AnimatorSet.start(AnimatorSet.java:540)
at android.animation.StateListAnimator.start(StateListAnimator.java:187)
at android.animation.StateListAnimator.setState(StateListAnimator.java:180)
at android.view.View.drawableStateChanged(View.java:17313)
at android.widget.TextView.drawableStateChanged(TextView.java:3989)
at android.view.View.refreshDrawableState(View.java:17361)
at android.view.View.dispatchAttachedToWindow(View.java:14730)
at android.view.ViewGroup.addViewInner(ViewGroup.java:4477)
at android.view.ViewGroup.addView(ViewGroup.java:4274)
at android.view.ViewGroup.addView(ViewGroup.java:4215)
at android.view.ViewGroup.addView(ViewGroup.java:4188)
Может ли кто-нибудь пролить свет на возможные причины?