Ren*_*ndy 6 android android-animation android-layout
我有以下XML代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/viewGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/textLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
<ListView
android:id="@+id/testList"
android:layout_width="match_parent"
android:layout_height="75dp"
android:visibility="gone" />
</LinearLayout>
<RelativeLayout
android:id="@+id/anotherLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TextView
android:id="@+id/messageText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
因此,当textLayout单击时,它将确定可见性testList.
当能见度变好时VISIBLE,效果很好.然而,当可见性变为时GONE,在结束anotherLayout动画之前返回到原始位置viewGroup,因此它重叠testList.
我怎么能阻止这个?
| 归档时间: |
|
| 查看次数: |
376 次 |
| 最近记录: |