作者fake01 (code)
看板AndroidDev
标题[问题] stretchColumns="*" 使用
时间Wed May 8 23:46:04 2013
小弟最近在排面板
我想要用 <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
1F:推 andy13579372:不知道linear能不能 不过不如用个tablerow吗? 05/09 12:08
2F:推 odin2008:还是要下weight吧,这个属性只是在做填满而已 05/09 14:04
3F:推 corrupt003:试试 layout_weight ? 05/09 23:09
5F:→ fake01:谢谢回答 我试试 05/10 13:36