我有一個帶有註釋的列表視圖。評論的長度不同(例如,從1行到20)。 雖然我滾動此列表視圖,標準滾動條增加和減少,這取決於我在這一刻滾動的評論。 爲什麼會發生?android scrollbar length with different items sizes
7
A
回答
12
也許這就是你需要的。只需設置它false
7
我發現爲什麼出現這種情況本次網上。不知道爲什麼谷歌決定創建高度無關的列表。
如果
ListView
包含不同高度的物品,該ListView
無法知道所有項目的整個高度它包含了那麼拇指的高度計算基於項目視圖和數量的方式當前可見的項目數量。目前可見的項目數量各不相同,因此拇指高度也不相同。在iOS上,等效組件(
UITableView
)在顯示視圖之前請求UITableViewDataSource
中所有項目的高度,以便可以瞭解整體拇指大小並保持一致。最大霍威爾, Last.fm開發商
Why does the scroll bar change its length during scrolling?
+0
爲了能夠知道列表視圖的高度,您應該創建每個項目並完成它們的高度總和。但這不是發生的事情,這些項目是在需要時(僅在屏幕上)創建的,因此無法獲得高度。這並不完美,但這是最有效的工作方式。 (特別是有數千個項目的清單)。 – AxelH
相關問題
- 1. android scrollbar thumb length
- 2. grouped_collection_select with different option_key_methods
- 3. Treeview IsSelected with different viewmodel
- 4. Resign apk with different keystore
- 5. For loop with different inputs
- 6. Float:Left with different display types
- 7. Recycler Items with Indicator
- 8. Combobox with clickable items
- 9. PDF.js render pdf with scrollbar
- 10. SQL Statement for reconciliation with different operators
- 11. HTML5 Canvas Circle with three different colors
- 12. GSON Class with different body(Error/NoError)
- 13. Ruby on rails with different user types
- 14. Android listview with each items in each row
- 15. Content-Length:0 with OWIN
- 16. SoloSolved:22.0.1/aapt完成>非零退出值132 [With android sizes]
- 17. Laravel Validation unique/exists with different database connection
- 18. listview not displayed items android
- 19. android JSONArray length
- 20. Android - Collect String Array items
- 21. hadoop HDFS blcok size sizes
- 22. Laravel Model in different Namespace not working with eager/related加載
- 23. MySQL INSERT INTO表1 SELECT TABLE 2 with different column name
- 24. android recyclerview center horizontal items
- 25. Recycler view not displayed items-Android studio
- 26. NSPredicate over different entities
- 27. Jquery SlideToggle Different Div
- 28. different DelegatingFilterProxy和FilterToBeanProxy
- 29. .setText()for different layout
- 30. Application.Idle acting different
謝謝,這將有助於一會兒。但不光滑的滾動條並不那麼酷。這是滯後的,而我滾動。我認爲這並不好,當滾動條調整大小時,但在市場上,例如在評論中,它是存在的。 – jumper0k