[問題] 想平均tablelayout欄高

看板java作者 (newJoey)時間9年前 (2014/12/01 15:04), 編輯推噓0(003)
留言3則, 2人參與, 最新討論串1/1
我在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://www.ptt.cc/bbs/java/M.1417417499.A.7A8.html

12/02 11:51, , 1F
layout_weight?
12/02 11:51, 1F

12/02 22:53, , 2F
不行 那我也試過了
12/02 22:53, 2F

12/03 09:52, , 3F
有包LinearLayout OR horizontal Layout? 在兩者改?
12/03 09:52, 3F
文章代碼(AID): #1KV1CRUe (java)