<ListView
android:id="@+id/selected_photo_recycle_view"
android:layout_width="match_parent"
android:layout_height="100dp"
android:visibility="gone"
android:layout_below="@id/action_bar"
android:cacheColorHint="#00000000"
android:divider="@color/transparent"
android:dividerHeight="0dp"
android:fadingEdge="none"
android:fastScrollEnabled="false"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:listSelector="@color/transparent"
android:overScrollMode="never"
android:scrollbars="none">
ListView 常用屬性 詳解
android:divider="@color/transparent"
表示的是 每個Item 之間的 間隔, 這裏表示 間隔之間透明
android:footerDividersEnabled="false"
android:headerDividersEnabled="false
設置 是否顯示 header 和 footer 是否需要間隔
android:fastScrollEnabled="false"
設置是否會顯示 快速滾動 滑塊
android:dividerHeight="0dp"
表示間隔的高度
android:listSelector
表示點擊Item 時 選中狀態下顯示狀態, 這是是透明 一般設置爲透明
android:overScrollMode="never"
設置 是否顯示 滑到最頂部 和最下面的陰影
android:cacheColorHint="#00000000"
表示 總會在 ListView 上繪製的顏色 緩存下來
Indicates that this list will always be drawn on top of solid, single-color opaque background. This allows the list to optimize drawing.
一般頁設置爲Item 背景顏色
android:fadingEdge="none"
這個 在 api 14 後就 不用了
想說這些屬性 還是去Android 官方文檔的裏看來的靠譜
不要 總是百度 google , 有時候 官方文檔 最快捷方便靠譜
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.