看板 AndroidDev 關於我們 聯絡資訊
小弟最近在排面板 我想要用 <LinearLayout>將兩個textview使用horizontal方式排列 以一樣比例塞入,我使用了stretchColumns="*",以為就可以達成效果, 但是卻一點都沒有改變,textview還是以內容的文字多寡為size 請問該如何解決,打字可能不清楚,所以貼下code <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="*" android:orientation="horizontal" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="size" /> <TextView android:id="@+id/show" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/TextView01" android:text="non" /> </LinearLayout> 麻煩各位大大了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.58.187.208
andy13579372:不知道linear能不能 不過不如用個tablerow嗎? 05/09 12:08
odin2008:還是要下weight吧,這個屬性只是在做填滿而已 05/09 14:04
corrupt003:試試 layout_weight ? 05/09 23:09
crazyma:官網有教喔 http://goo.gl/1wo70 05/10 12:01
fake01:謝謝回答 我試試 05/10 13:36