2012-12-29 36 views
0

我在我的应用程序中有一个小动画,它在最后改变了一个ListView的位置参数,即它比它开始时低一点(它开始为全屏幕,之后一个按钮按下,它向下滑动一点以显示下面的东西,在屏幕的顶部)。通过按列表,我可以看到它的参数真的发生了变化,它的位置真的改变了。现在,如果SlidingDrawer在此时被打开,布局将被重新排列,列表将回到全屏。这是为什么?SlidingDrawer在打开时重新排列主布局

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res/com.softtechnics.mobuynet" 
android:id="@+id/coupon_list_layout" 
style="@style/FillParent" 
android:orientation="vertical" > 

<include 
    android:id="@+id/filter_tab" 
    android:layout_width="match_parent" 
    android:layout_height="34dp" 
    android:layout_below="@+id/action_bar" 
    layout="@layout/filter" /> 

<com.softtechnics.mobuynet.gui.components.ListArr 
    android:id="@+id/list" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_above="@id/footer" 
    android:layout_below="@+id/action_bar"> 

</com.softtechnics.mobuynet.gui.components.ListArr> 

<com.softtechnics.mobuynet.gui.components.ActionBar 
    android:id="@+id/action_bar" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true" /> 

<ProgressBar 
    android:id="@+id/progress" 
    style="@style/WrapContent" 
    android:layout_centerInParent="true" 
    android:visibility="gone" /> 

<com.softtechnics.mobuynet.gui.components.Footer 
    android:id="@+id/drawer" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_alignTop="@+id/textView1" /> 

<TextView 
    android:id="@+id/textView1" 
    android:layout_width="wrap_content" 
    android:layout_height="113dp" 
    android:layout_alignParentBottom="true" 
    android:visibility="invisible" /> 

Footer是我的SlidingDrawer。 谢谢!

回答

-1

当动画结束时,您必须更改listview属性。你也应该记住这个视图的实际状态,并在onResume方法中更新它。

+0

列表视图的动画是好的。我确实改变了属性。但在此之后,如果用户打开抽屉,那么listView会弹出。如果我不打开抽屉,那么一切都可以。 – roiberg

+0

你能粘贴更多的代码吗?那么我可能会找到这个bug – RobertM