-6
Q
如何繪製此佈局
A
回答
2
與此模板來吧:
但始終顯示你的努力提出任何問題時:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:text="@string/hello_world" />
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:text="click"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="hi"
android:gravity="center"
android:layout_weight="0.2" />
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:text="click"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:gravity="center"
android:weightSum="1">
<ImageView
android:layout_width="0dp"
android:layout_weight="0.3"
android:background="@android:color/darker_gray"
android:layout_marginLeft="5dp"
android:layout_height="100dp"/>
<ImageView
android:layout_width="0dp"
android:layout_weight="0.3"
android:layout_marginLeft="2dp"
android:background="@android:color/darker_gray"
android:layout_height="100dp"/>
<ImageView
android:layout_width="0dp"
android:layout_weight="0.3"
android:layout_marginLeft="2dp"
android:background="@android:color/darker_gray"
android:layout_height="100dp"/>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_gravity="center"
android:text="Button"/>
+0
@Matteo Depasquali:如果您有任何想法,那麼您可以接受答案 –
相關問題
- 1. 如何使用畫布繪製此img?
- 2. 如何繪製兩個線性佈局
- 3. 如何在佈局頂部繪製
- 4. 如何優化此佈局?
- 5. 如何獲得此佈局?
- 6. 如何解決此佈局?
- 7. 如何實現此佈局?
- 8. 如何模仿此佈局
- 9. 如何獲得此佈局?
- 10. 如何解決此佈局
- 11. 如何獲得此佈局?
- 12. 如何完成此佈局?
- 13. Qt繪製垂直佈局
- 14. 如何在佈局上繪製動態繪圖
- 15. 如何繪製此功能?
- 16. 如何繪製此路徑?
- 17. 如何繪製此窗口?
- 18. 如何在android的佈局層次結構中繪製精細的子佈局
- 19. Java - Swing佈局+ AWT - 如何在帶有佈局的JPanel中繪製一條線?
- 20. 如何在第一次繪製時以編程方式顯示佈局佈局?
- 21. GWT佈局:我將如何修復此佈局(DockPanel)?
- 22. 如何使用自動佈局來實現此佈局?
- 23. 如何將此表格佈局更改爲CSS佈局?
- 24. 佈局背景角落和子佈局的繪製
- 25. 如何使此滾動佈局有效?
- 26. 如何使用flexbox編寫此佈局?
- 27. 如何在Android上進行此佈局?
- 28. 如何在Android中構建此佈局?
- 29. Android:如何動態創建此佈局?
- 30. 如何實現此導航欄佈局?
好了,[你有什麼試過嗎?(http://mattgemmell.com/2008/12/08/what -have-you-tried /) –
通過相同的努力,您將能夠創建XML佈局。 –
我嘗試了RelativeLayout,但我無法將3 ImagView放在那個位置。我使用android:layout_toRightOf,android:layout_below,但是我無法將這些imageview放在那個位置。 然後我嘗試使用LinearLayout,但我有同樣的問題。我必須在3個不同的行上顯示對象 – MDP