KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've recreated my problem to a very simple representation. I have 3 TextViews. 2 of them are in a seperate LinearLayout , the third is on the same level as the LinearLayout . I'm toggling the visibility of test1 and test2 , and I'd like to see them fade away (which works). Furthermore, I want test3 to slide into his new place (taking place of test1 and test2 ). I can't make this happen. test3 just snaps to it's new point. How can I achive this? My code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:animateLayoutChanges="true" android:orientation="vertical" > <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click" /> <LinearLayout android:animateLayoutChanges="true" android:id="@+id/child1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/test1" android:layout_width="match_parent" android:visibility="gone" android:layout_height="wrap_content" android:text="TEST1" /> <TextView android:id="@+id/test2" android:layout_width="match_parent" android:visibility="gone" android:layout_height="wrap_content" android:text="TEST2" /> </LinearLayout> <TextView android:id="@+id/test3" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="TEST3" /> </LinearLayout> And in my Activity
Tags (comma-separated)
Save Edits
Cancel