android 相对布局的问题!!!

llller 2012-12-24 03:38:48
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:background="@color/brown"
>
<EditText
android:id="@+id/ee"
android:layout_width="200dip"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/tt"
android:layout_width="200dip"
android:layout_height="wrap_content"
android:layout_above="@id/ee"
android:background="@color/darkgray"
android:text="123123"
/>

</RelativeLayout>

为什么TextView没有在EditText的上面???????

不要说把EditText放到TextView的下面!!!!!!!!
...全文
61 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
android_Y 2012-12-24
  • 打赏
  • 举报
回复
TextView 使用android:layout_below="@id/ee"这个
mjm2231 2012-12-24
  • 打赏
  • 举报
回复
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <EditText android:id="@+id/ee" android:layout_width="200dip" android:layout_height="wrap_content" android:layout_centerInParent="true" /> <TextView android:id="@+id/tt" android:layout_width="200dip" android:layout_height="wrap_content" android:layout_above="@id/ee" android:text="123123" /> </RelativeLayout> 这样可以
hzgmm 2012-12-24
  • 打赏
  • 举报
回复
	<TextView 
    	 android:id="@+id/tt"
    android:layout_width="200dip"
    android:layout_height="wrap_content"
    android:layout_above="@+id/ee"
    android:background="@color/darkgray"
    android:text="123123"
    	/>

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧