实战 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捐助),没钱捧个人场,谢谢各位。
谢谢您的赞助,我会做的更好!