我正在學習android。我創建了一個簡單的xml屏幕,但數據不在屏幕上,屏幕也不滾動。任何機構可以告訴我如何使我的手機屏幕滾動?如何在android中滾動屏幕
4
A
回答
0
讓你的活動ListActivity
這裏是實現一個ListView/ListActivity
http://p-xr.com/android-tutorial-how-to-parseread-xml-data-into-android-listview/
滾動到文章的底部找到Eclipse項目看全面實施的例子。
你也可以使用一個http://developer.android.com/reference/android/widget/ScrollView.html
5
0
北醫三院內部的整個佈局裏面scrollView.ie最頂層/父母佈局是滾動型
2
下面是一些代碼爲固定標題和固定頁腳以及滾動主體:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:id="@+id/relativeLayout1"
android:layout_width="wrap_content">
<TextView
android:text="Header"
android:id="@+id/textViewHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:layout_alignParentBottom="true"
android:text="Footer"
android:id="@+id/textViewFooter"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<ScrollView
android:layout_above="@id/textViewFooter"
android:layout_below="@id/textViewHeader"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
>
<LinearLayout
android:layout_below="@id/textViewHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView android:text="@string/about_tlh_body"
android:id="@+id/textViewBody"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
</ScrollView>
</RelativeLayout>
玩得開心。
相關問題
- 1. 在android應用中滾動屏幕?
- 2. 如何在droid @屏幕中滾動?
- 3. 如何在Vim中逐行滾動屏幕而不是逐段滾動屏幕?
- 4. 滾動屏幕
- 5. 滾動%屏幕
- 6. 如何在Android應用程序中滾動屏幕?
- 7. 如何在屏幕上滾動節點
- 8. Android主屏幕自動滾動槽頁
- 9. 如何滾動屏幕向左(如-100%)
- 10. 如何讓我的屏幕滾動Android中的Eclipse
- 11. 在Android中啓動屏幕
- 12. 滾動android屏幕上的圖像屏幕上的圖像
- 13. Android的水平滾動按鈕,屏幕
- 14. Android:可滾動(位圖)屏幕
- 15. Android ListView滾動整個屏幕
- 16. GNU屏幕:如何清除一次滾動和屏幕
- 17. 如何列出一個滾動屏幕
- 18. 如何滾動屏幕內存位圖
- 19. 如何適合沒有滾動屏幕?
- 20. 如何滾動我的屏幕
- 21. 如何使Kivy屏幕滾動
- 22. 模擬滑動事件以在Android中進行屏幕滾動
- 23. 移動滾動屏幕外
- 24. 顫動 - 屏幕不滾動
- 25. 如何滾動屏幕(我的意思是如何移動屏幕)
- 26. 如何在MVC App中自動滾動屏幕?
- 27. 在vim中的屏幕滾動
- 28. 如何讓我的鼠標滾輪在zsh上滾動屏幕?
- 29. 如何在jellybean(4.1.2)屏幕中的android中的相對佈局完全滾動?
- 30. 如何知道ViewPager滾動了一半的屏幕android