作者newJoey (newJoey)
看板java
标题[问题] 想平均tablelayout栏高
时间Mon Dec 1 15:04:57 2014
我在Android平台上
用TableLayout上放了个显示摄影画面的SurfaceView
与一个按钮Button
layout的xml如下:
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="*" >
<TableRow
android:id="@+id/camera_preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="@+id/button_capture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Capture" />
</TableRow>
</TableLayout>
但还是无法平均栏高
这是什麽原因?
还是自行定义的SurfaceView不能平均栏高?
那有什麽办法可以让画面平分?
谢谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 60.250.32.153
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/java/M.1417417499.A.7A8.html
1F:→ lucky1lk: layout_weight? 12/02 11:51
2F:→ newJoey: 不行 那我也试过了 12/02 22:53
3F:→ lucky1lk: 有包LinearLayout OR horizontal Layout? 在两者改? 12/03 09:52