任何人都可以幫助我解決一些問題。如果有人知道如何製作可調節的網格視圖,請幫助我。如何在Android中使可伸縮的GridView擴展到任何擴展的列寬?
6
A
回答
13
如果您已設置了特定數量的列並希望根據需要展開這些列,請嘗試gridView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH)
。
如果您改爲設置特定列寬並希望根據需要更改列數,請使用gridView.setNumColumns(GridView.AUTO_FIT)
。
0
在XML簡單地增加strechMode,這是可以做到
android:stretchMode="columnWidth"
相關問題
- 1. 可擴展Gridview
- 2. 在Gridview中可擴展?
- 3. Android GridView列伸展
- 4. Android:如何在擴展片段中使用擴展ListActivity
- 5. 如何製作可擴展列表Android
- 6. jQuery:如何擴展擴展?
- 7. 在android中的可擴展列表
- 8. Java Http Server如何可伸縮,或者如何使其可擴展?
- 9. 如何使擴展器不擴展工具欄寬度?
- 10. 我如何在html中擴展視頻以擴展Chrome擴展
- 11. 如何擴展Android的SimpleCursorAdapter?
- 12. 如何擴展android的ActionBar?
- 13. 如何讓子列的寬度擴展到其父寬度?
- 14. Android可擴展列表
- 15. Android可擴展列表
- 16. 如何擴展擴展類的接口
- 17. 如何在Android上擴展ORMLite的BaseDaoImpl類以擴展功能
- 18. 可擴展Gridview佈局
- 19. 如何使TableViewer在SWT中可擴展?
- 20. CUDA的任何Lisp擴展?
- 21. 如何存儲可擴展的可擴展事件日誌?
- 22. 你可以把可擴展列表可擴展列表中
- 23. Android中的可擴展列表視圖
- 24. android xml中的可擴展列表
- 25. 如何:可擴展的嵌套列表?
- 26. Android擴展:如何擴展導入android.util.Log?和它的擴展名是什麼?
- 27. Android - 如何在不擴展子項的情況下擴展Tablelayout的列
- 28. WPF-如何讓任何時候只擴展一個擴展器
- 29. ASP面板中的可擴展Gridview
- 30. XAML gridview項目擴展到GridView的全寬
直接的和明確的。你已經解釋過比Android的官方文檔更好的GridView。好樣的! – ridsatrio 2015-01-10 13:22:26