我已经尝试了一些建议和教程,但没有像预期的那样工作。有人熟悉将布局从0
扩展到100%
并将其折叠回来吗?
<GridLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:columnCount="3">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:gravity="center"
android:padding="3dp"
android:text="Hello"
android:textSize="20sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:gravity="center"
android:padding="3dp"
android:text="Hello"
android:textSize="20sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:gravity="center"
android:padding="3dp"
android:text="Hello"
android:textSize="20sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:gravity="bottom"
android:text="ho-ho-ho"
android:textAlignment="center" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:gravity="bottom"
android:text="ho-ho-ho"
android:textAlignment="center" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:gravity="bottom"
android:text="ho-ho-ho"
android:textAlignment="center" />
</GridLayout>
感谢您的帮助
使用基于物理的动画
https://developer.android.com/guide/topics/graphics/physics-based-animation.html
享受