我在layout.xml中有以下代码。在线性布局内嵌套相对布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_height="wrap_content" android:layout_width="fill_parent">
<EditText android:hint="@string/feed_url"
android:id="@+id/feedUrl" android:textSize="14dp" android:inputType="textUri"
android:layout_marginRight="45dp" android:layout_height="wrap_content" android:layout_width="fill_parent">
</EditText>
<Button android:id="@+id/getGraph"
android:text="@string/get"
android:layout_toRightOf="@id/feedUrl"
android:layout_alignParentRight="true"
android:layout_height="wrap_content" android:width="45dp" android:layout_width="wrap_content">
</Button>
</RelativeLayout>
<WebView android:id="@+id/wv1" android:layout_height="wrap_content"
android:layout_width="fill_parent" />
</LinearLayout>
在eclipse插件布局创建器中,EditText和按钮显示正确。 (参见下图)
但是装置和仿真器上时,按钮未隐藏。 (见下面的截图)
任何想法,为什么按钮是越来越隐藏在设备?
谢谢。奇迹般有效。 – Sudar 2010-10-16 10:23:14