0
在佈局的頂部有一個textview,button和imageview..etc的元素,但大部分有listview。這是必需的,當我們滾動時,頂層元素必須用listview滾動。在滾動視圖相對的相對佈局和列表視圖android
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res/com.revolage.vkcommunity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/vk_white"
android:orientation="vertical"
tools:context="com.egay.borsh.fragments.MainActivity" >
<RelativeLayout
style="@style/ActionBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin" >
<RelativeLayout
android:id="@+id/action_bar_relative_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin" >
......
</RelativeLayout>
<com.costum.android.widget.PullAndLoadListView
android:id="@+id/main_post_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/header_linear_layout" />
</RelativeLayout>
但如此,沒有什麼是滾動。
由於ListView已經包含了一個滾動機制,所以你不應該在'ScrollView'中放置'ListView'。 – 2015-01-26 18:56:58