所以我正在尝试创建一个具有 ListView 的屏幕,并且我需要能够在屏幕底部边缘浮动另一个自定义水平 ListView。当用户在垂直列表视图上滚动时,水平列表视图将不可见并在滚动停止时重新出现。我认为 FrameLayout 将是重叠视图的最佳选择。但我似乎无法完成这项工作。水平列表视图似乎占据了整个屏幕空间。有任何想法吗?这甚至是正确的方法吗?我希望在 HTML 中有类似于固定 div 的东西。
这是我的 XML:
UPDATE-1:按照建议使用 RelativeLayout,但仍然不行。HorizontalListView 似乎仍然占据了整个屏幕。我从这里使用 HorizintalListView
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ListView
android:id="@+id/messages"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="5dip" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<test.ui.app.HorizontalListView
android:id="@+id/folders"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF" />
</RelativeLayout>
</RelativeLayout>