作者spiderman007 (千里之外)
看板AndroidDev
标题[问题] 新手请问RelativeLayout??
时间Thu Nov 17 00:28:34 2011
最近买了一本书"Android SDK实战演练"
在练习到RelativeLayout这个部份时...有点问题...
我试打了下面的程式码在xml档..
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="
http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/contact_entry"
android:layout_width="fill_parent"
android:layout_height="wrap_parent"
android:text="联络人" />
</RelativeLayout>
正常会显示联络人的字样...
但我的画面都没有...
如图
http://ppt.cc/gn~9
请问是哪边少设定到吗??
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.41.139.117
1F:推 solomn:将联络人上面一行的wrap_parent改成wrap_content 11/17 01:14
2F:→ solomn:应该就行了 11/17 01:14
3F:推 milochen:检查 fill_parent 跟 wrap_content。这部份容易打错字. 11/17 07:17
4F:推 alexcarol:我想法跟1楼依样~原PO有解决了吗? 11/17 12:43
5F:→ spiderman007:恭喜楼上各位大大...您答对了!!! 真是眼花了!! 11/17 22:26