我是新來的GridView佈局GridView控件。你能幫我解決我們如何添加分隔符/分隔符到網格視圖,如我們對錶 請找到下面的圖像添加列邊框在android系統
0
A
回答
0
可悲的是沒有自動的方式來做到這一點。你可以試試這個。在表格中的每個視圖周圍設置1或2像素填充,並且您應該有一個邊框。
0
要創建這種類型的佈局,你必須一幀分配給你的GridView項目。讓我們考慮這是你的項目的佈局: -
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000" >
<ImageView
android:id="@+id/image_view_product_cell_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/image_content_description" />
<RelativeLayout
android:id="@+id/rel_lay_product_image_frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/image_view_product_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/image_content_description" />
<ImageView
android:id="@+id/image_view_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/image_content_description" />
<ProgressBar
android:id="@+id/progress_bar_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:indeterminateDrawable="@drawable/custom_progress_bar"
android:indeterminateDuration="800" />
</RelativeLayout>
<TextView
android:id="@+id/text_view_product_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:singleLine="true"
android:textIsSelectable="true" />
<TextView
android:id="@+id/text_view_product_brand"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/text_view_product_title"
android:gravity="center"
android:singleLine="true"
android:textIsSelectable="true" />
在上面的佈局您可以將幀分配給GridViewItem並提供所需的保證金。對於具有在右側和在底部的黑線網格視圖項
相關問題
- 1. 添加android系統
- 2. 添加PNG在android系統
- 3. Fitgrid - 在列的邊緣添加邊框
- 4. 動態添加android系統
- 5. 添加邊框列出
- 6. 在SSRS報告的數據欄系列中只添加邊框
- 7. 添加邊框
- 8. 如何刪除閃屏白色底部邊框在android系統
- 9. Android龍板820 - 添加系統服務
- 10. 添加到彤彤TextView的android系統
- 11. 如何將系統服務添加到Android框架
- 12. 在UIBarButtonItem中添加邊框
- 13. 在Java中添加邊框
- 14. Android添加邊框到按鈕
- 15. 加入android系統
- 16. html添加邊框
- 17. 將列表添加到系統屬性
- 18. 在android中添加邊距
- 19. 下列標題添加邊框QTableWidget的
- 20. 添加聲音到Android系統聲音列表
- 21. 的Android添加插圖邊框若要列表視圖
- 22. 在android系統
- 23. 在android系統
- 24. 在android系統
- 25. 在android系統
- 26. 在android系統
- 27. 在android系統
- 28. 在android系統
- 29. 在android系統
- 30. 在android系統
使用9-補丁圖像,還可以使用另一個9膜片用於具有在頂部和左側黑色linrs網格視圖本身 – pskink