[英]scrollview, tablelayout and linearlayout doesnt work together in android
[英]Is it possible to add more than one TableLayout in a LinearLayout with a ScrollView in Android development?
我組成了這個漂亮的android應用程序,打算添加一些畫龍點睛的內容,其中之一包括一個包含兩個表的頁面,結果發現我做不到。 基本上,我試圖制作一個帶有某些值的表(跨4或5列),然后在下面制作另一個表的不同值(僅2列)。 表格將超出屏幕,因此需要ScrollView。 但是,當我將所有這些放在一起時,會出現一個錯誤:ScrollView只能容納一個直接子代。 我試過將其放在LinearLayout中。 那什么也沒做。 一世
是的,您可以使用更多的TableLayout,但是在滾動視圖中只需要一個父布局
<Scrollview>
<LinearLayout> //parent layout
<TableLayout>
<TableRow></TableRow>
</TableLayout>
<TableLayout>
<TableLayout>
</TableLayout>
</TableLayout>
<LinearLayout>
<Scrollview>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.