android qq 消息页面 editview 获得焦点把 标题栏 顶上去 问题

 

 

实战 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捐助),没钱捧个人场,谢谢各位。



 
 
 谢谢您的赞助,我会做的更好!

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值