實戰 QQ demo源碼(本例中有該應用) 伺服器端下載下傳 : http://download.csdn.net/download/knight_black_bob/9822551 android eclipse 版 http://download.csdn.net/download/knight_black_bob/9822553 android stdio 版本 http://download.csdn.net/download/knight_black_bob/9822556

ListView 改成 ScrollView 也是有效果的,但改成RelativeLayout 卻不行,
改成 RelativeLayout 嵌套 listview 也是可以得 ,
可以 給我一個解釋 為啥是這樣的嗎 ?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/aaa"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:background="@color/black"
android:gravity="top" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
android:textColor="@color/white"
android:textSize="20sp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:background="@color/grey" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<requestFocus />
</EditText>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/relativeLayout1"
android:layout_below="@id/aaa" >
// 将 ListView 改成 ScrollView 也是有效果的,但改成RelativeLayout 卻不行,
// 改成 RelativeLayout 嵌套 listview 也是可以得 ,
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:visibility="visible" />
</RelativeLayout>
</RelativeLayout>
捐助開發者
在興趣的驅動下,寫一個
免費
的東西,有欣喜,也還有汗水,希望你喜歡我的作品,同時也能支援一下。 當然,有錢捧個錢場(右上角的愛心标志,支援支付寶和PayPal捐助),沒錢捧個人場,謝謝各位。
謝謝您的贊助,我會做的更好!