-1
A
回答
0
ScrollView
XML資源相當易於使用且功能強大。只需用ScrollView
標籤將您想要在XML中滾動的任何內容包裝起來,剩下的內容將會爲您處理。簡單的例子:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical"
android:background="@color/colorPrimary"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/yourID"
android:layout_weight="1" />
...
</LinearLayout></ScrollView>
這個例子顯示了一個LinearLayout
填充任何你需要(在這種情況下的TextView),將在屏幕上滾動時,它必須如此。
相關問題
- 1. 本地腳本ScrollView和AbsoluteLayout
- 2. YUI3 scrollView和mousewheel
- 3. ScrollView和LinearLayout
- 4. RelativeLayout和ScrollView
- 5. ScrollView和layout_weight =「1」?
- 6. iOS - scrollView和setContentSize
- 7. scrollview和expandablelistview切
- 8. ScrollView和Spinner
- 9. SlidingDrawer和ScrollView
- 10. scrollView linearlayout和listview
- 11. 如何重置ScrollView文本的長度?
- 12. ScrollView不斷推送文本字段
- 13. ScrollView在編輯文本中寫入文本後向上滾動
- 14. iPhone ScrollView和Picker Issue
- 15. 使用ScrollView和TextView
- 16. ScrollView根本不滾動
- 17. ScrollView和QML中的畫布
- 18. 不工作ScrollView和HorizontalListView
- 19. iPhone -ScrollView塗抹視圖和
- 20. ScrollView和丟失滾動條
- 21. Android:EditText不填充ScrollView和RelativeLayout
- 22. ScrollView中的WebView和ListView
- 23. ScrollView中的React-Native和ListView
- 24. ScrollView中的GridView和ListView
- 25. ScrollView和導航欄ios9
- 26. Android ScrollView ScrollTo和閃爍
- 27. ScrollView和LinearLayout的困難
- 28. ScrollView和刪除邊框
- 29. 同時使用CardScrollView和ScrollView
- 30. EditText滾動條和ScrollView