2013-07-20 40 views
1

我有以下問題:我需要18個按鈕與他們旁邊的TextView和一個TextView在他們自己之間。當然,他們不適合在顯示器上,所以我搜索這個問題,並找到ListView,但這不適合我,因爲我需要18個按鈕/ TextViews與不同的ID。如何滾動內容?

我希望你能幫助我。

+2

將ü更復雜的東西u需要??? – duggu

+0

爲什麼每個人都需要不同的ID? – Pongpat

回答

2

使用<ScrollView>注意<ScrollView>只是一個直接子

,所以必須使用像

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" > 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" > 
     <!-- your contents are here --> 
    </LinearLayout> 

</ScrollView> 
+1

好的,謝謝它的作品! – user2602876

+0

@ user2602876歡迎:) –