-3
A
回答
2
你可能會尋找預覽不同的屏幕尺寸比手機的設備。
要在所有設備中將圖像均分爲3部分,可以使用GridView/GridLayout或使用帶有權重的LinearLayout。
0
試試這個:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="3" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="3" >
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="3" >
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="3" >
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
<ImageButton
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
</LinearLayout>
相關問題
- 1. bar3d(),圖走出去的範圍
- 2. 圖像走出去的容器
- 3. 在GDB的catchpoint停下來之後走出去
- 4. 是變量去分配,當他們走出去的範圍
- 5. wordpress中的圖片,要走哪條路?
- 6. 去:在走常規
- 7. Android .apk安裝後運行任務
- 8. 添加圖片後運行jquery圖片縮放器
- 9. $登錄JavaScript試圖殺死我,誰可以讓我走出去
- 10. BPMN - 唯一網關走出去並行分支
- 11. 圖像滑塊讓圖片走出邊界
- 12. 的Sybase:近「走出去」的「IF存在」塊語法不正確
- 13. 如何保持走出圖形窗口的隨機行走場景
- 14. RemoveChild幀動畫影片剪輯,將停止幀運行?
- 15. 如何隱藏apk的圖片?
- 16. 的Python:簡單的柱狀圖從數據幀走了歪
- 17. iOS的虛擬鍵盤在Safari中:改變「走出去」「回車」
- 18. 文本內容走出去卡的角材料2
- 19. 谷歌的「走出去」和範圍/功能
- 20. 需要渲染幀後運行協程
- 21. 運行幾幀後,位圖動畫停止工作
- 22. 構建apk後出現的錯誤
- 23. 運行時錯誤拋出:IllegalArgumentException設置圖片的JavaFX
- 24. 運行時錯誤 - (圖片)
- 25. apk無法正常運行
- 26. 刪除加載後的新圖片後,出現上一張圖片 - jQuery File Upload
- 27. 無法在archos5IT中運行我的APK
- 28. Android Studio簽名的APK不運行
- 29. 用android 2.2編寫的APK運行2.3版APK?
- 30. 圖像幀(iPhone)的動畫片段
請將您的XML代碼到後身體並通過添加4尾隨空間格式化。另外,請閱讀https://www.stackoverflow.com/help/how-to-ask以瞭解如何提出問題/現在它的質量很低,可能會被關閉或刪除。 – SteveFest