看板 AndroidDev 關於我們 聯絡資訊
最近買了一本書"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
solomn:將聯絡人上面一行的wrap_parent改成wrap_content 11/17 01:14
solomn:應該就行了 11/17 01:14
milochen:檢查 fill_parent 跟 wrap_content。這部份容易打錯字. 11/17 07:17
alexcarol:我想法跟1樓依樣~原PO有解決了嗎? 11/17 12:43
spiderman007:恭喜樓上各位大大...您答對了!!! 真是眼花了!! 11/17 22:26