Android編程簡單設(shè)置ListView分割線的方法
本文實例講述了Android編程簡單設(shè)置ListView分割線的方法。分享給大家供大家參考,具體如下:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView
android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:divider="#FFCC00"
android:dividerHeight="4px"/>
</LinearLayout>
關(guān)鍵是這兩句:
Android:divider="#FFCC00"
android:dividerHeight="4px"
前一句是設(shè)置分割線的顏色,后一句是設(shè)置分割線高(即分割線的粗細(xì))
更多關(guān)于Android相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《Android視圖View技巧總結(jié)》、《Android布局layout技巧總結(jié)》、《Android圖形與圖像處理技巧總結(jié)》、《Android開發(fā)入門與進(jìn)階教程》、《Android調(diào)試技巧與常見問題解決方法匯總》、《Android多媒體操作技巧匯總(音頻,視頻,錄音等)》、《Android基本組件用法總結(jié)》及《Android控件用法總結(jié)》
希望本文所述對大家Android程序設(shè)計有所幫助。
- 詳解Android中ListView實現(xiàn)圖文并列并且自定義分割線(完善仿微信APP)
- Android 關(guān)于ExpandableListView去掉里頭分割線的方法
- android listview優(yōu)化幾種寫法詳細(xì)介紹
- android開發(fā)教程之listview使用方法
- Android ListView的item背景色設(shè)置和item點(diǎn)擊無響應(yīng)的解決方法
- android中ListView多次刷新重復(fù)執(zhí)行g(shù)etView的解決方法
- android ListView內(nèi)數(shù)據(jù)的動態(tài)添加與刪除實例代碼
- android二級listview列表實現(xiàn)代碼
- android ListView和GridView拖拽移位實現(xiàn)代碼
- Android ListView數(shù)據(jù)綁定顯示的三種解決方法
- android ListView和ProgressBar(進(jìn)度條控件)的使用方法
- Android ListView長按彈出菜單二種實現(xiàn)方式示例
相關(guān)文章
Android ViewDragHelper仿淘寶拖動加載效果
這篇文章主要為大家詳細(xì)介紹了Android ViewDragHelper仿淘寶拖動加載效果,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-08-08
Android應(yīng)用中設(shè)置alpha值來制作透明與漸變效果的實例
這篇文章主要介紹了Android應(yīng)用中設(shè)置alpha值來制作透明與漸變效果的實例,展示了基礎(chǔ)的透明漸變動畫的編寫方法,需要的朋友可以參考下2016-04-04
item高度不同時Recyclerview獲取滑動距離的方法
這篇文章主要介紹了item高度不同時Recyclerview獲取滑動距離的方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-11-11
36個Android開發(fā)常用經(jīng)典代碼大全
本篇文章主要介紹了36個Android開發(fā)常用經(jīng)典代碼片段,都是實用的代碼段,具有一定的參考價值,感興趣的小伙伴們可以參考一下。2016-11-11

