在相對佈局中在兩個ScrollView之間添加空間的最佳方式是什麼?您能舉個例子嗎?我一直在嘗試使用填充小運氣。相對佈局中滾動視圖之間的空間
0
A
回答
1
在第二個列表視圖中使用android:layout_below="@+id/ScrollView01"
將其位置設置爲第一個滾動視圖的下方。還設置android:layout_marginTop="50dip"
到第二滾動視圖,得到第一滾動視圖和第二滾動視圖
之間一些餘量嘗試下面的代碼
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">
<ScrollView
android:id="@+id/ScrollView01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:background="#000000">
<RadioGroup
android:id="@+id/RadioGroup01"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/RadioButton01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Radio Button....." />
</RadioGroup>
</ScrollView>
<ScrollView
android:id="@+id/ScrollView02"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:background="#000000"
android:layout_below="@+id/ScrollView01"
android:layout_marginTop="50dip">
<RadioGroup
android:id="@+id/RadioGroup01"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/RadioButton02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Radio Button....." />
</RadioGroup>
</ScrollView>
</RelativeLayout>
由於 迪帕克
2
也許嘗試使用餘量,而不是填充?我不是100%確定這是否能解決您的問題,但值得一試。
相關問題
- 1. 滾動視圖相對佈局問題
- 2. Android佈局兩個圖像視圖之間的滾動查看
- 3. 滾動視圖內部的相對佈局不可滾動
- 4. 添加滾動視圖後相對佈局不滾動
- 5. 在滾動視圖相對的相對佈局和列表視圖android
- 6. 視圖和佈局之間的通信
- 7. 網格佈局 - 共享相對空間
- 8. 相同視圖之間的鈦可滾動視圖
- 9. 相對佈局。 2項之間
- 10. 滾動視圖中的Android相對佈局不在橫向模式中滾動
- 11. 滾動視圖留下多餘的空間佈局,在活動的底部
- 12. Android佈局對齊並填充視圖中的剩餘空間
- 13. 佈局之間的意圖
- 14. 如何在視圖瀏覽器中的佈局之間滑動?
- 15. Isotope StraightDown佈局模式與無限滾動之間的不均勻空間
- 16. 相對佈局中的滾動查看
- 17. 回收站視圖中的視圖之間的空白空間
- 18. LinearLayout中視圖之間的空間
- 19. ListView的相對佈局和滾動視圖
- 20. 滾動視圖隱藏我的相對佈局1
- 21. Android - 滾動視圖內的相對佈局
- 22. 以相對佈局(佈局中間)運行時創建新視圖
- 23. 滾動視圖滾動佈局內?
- 24. 相對佈局 - android - 使相對佈局滾動
- 25. 自動佈局等於UIButton之間的空間
- 26. 隱藏的視圖和相鄰的間隙與自動佈局
- 27. 滾動視圖中的全屏佈局
- 28. 相對佈局和協調器佈局之間的佈局問題
- 29. 如何使用滾動視圖相對佈局
- 30. 滾動視圖崩潰嵌套相對佈局proplem