本帖最后由 CCDDzclxy 于 2013-09-22 19:26:26 编辑

解决方案 »

  1.   

    android:layout_height="wrap_content"意思是适应控件的高度,你有几行文字,这个控件就相应的显示多高。
    想要占满屏幕可以用android:layout_height="match_parent"或者类似android:layout_height="300dp",想要多高你都可以自己定义
      

  2.   

    把完整的xml贴出来看看<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="300dp"
        android:layoutMode="clipBounds"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        tools:context=".MainActivity" >    <Button
            android:id="@+id/btnDns"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:text="@string/btnDns" />    <TextView
            android:id="@+id/tvDnsResponse"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/btnDns"
            android:layout_toRightOf="@+id/btnDns"
            android:background="@drawable/darkgray"
            android:text="@string/tvDnsResponse" />    <TextView
            android:id="@+id/tvDnsQuery"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/btnDns"
            android:layout_toRightOf="@+id/btnDns"
            android:background="@drawable/darkgray"
            android:text="@string/tvDnsQuery" />    <EditText
            android:id="@+id/editText1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:layout_marginTop="150dp"
            android:ems="10"
            android:gravity="center_vertical|top"
            android:inputType="textMultiLine"
            android:lines="50" >        <requestFocus />
        </EditText></RelativeLayout>
      

  3.   

    貌似 和 主窗口的 Bottom 有关,如下图:我在 整体将MutilineText 往下拖动的时候,提示里会出现这样一句“android:layout_alignParentBottom="true"”,而且看到我红色箭头所指处出现一条横线,我也无法将 MutilineText 拖到那条线的下面...
    那条 横线下面的区域就这样浪费掉了?
      

  4.   

    RelativeLayout的高度才300dp,EditText的marginTop就有150dp,在加上上面的Button和TextView剩下的空间都不到150dp了啊。
    你要把RelativeLayout的android:layout_height="match_parent"。EditText的android:layout_height也改成"match_parent"。
      

  5.   

    那条横线就是RelativeLayout高度300dp的下限,所以你RelativeLayout里的所有控件都不可能超过那条线。
      

  6.   

    果然是 RelativeLayout 的layout_height的原因,可能是在设置别的属性的时候,失误设置了 RelativeLayout 的layout_height...