自從去年發布了一款Android的滾輪控件,從別的項目反編譯過來的后,由于各種原因(其實是懶),一直沒有更新,一直拖了這么久,實在慚愧。
這次抽空,對項目做一輪徹底的更新,優化了很多的細節體驗和接口,性能也提升了許多,目的是為了在實際的項目中,可以直接使用。
使用gradle集成
dependencies {
compile 'com.weigan:loopView:0.1.0'
}
先上一張圖,看下這個滾輪控件的效果:
效果預覽圖.gif
下面是主要的更新點:
- 滾輪的大小,可以隨著視圖的大小調整,之前滾輪控件都是由文本大小決定的,這樣很不合理,改成隨著控件的大小而改變。
- 提供各種參數接口,包括文本大小,顯示數量,控件顏色等各種參數
Description of Attributes
Attributes | Format | Default | Description |
---|---|---|---|
awv_textsize | integer | 15 | textsize |
awv_lineSpace | float | 2.0f | line space |
awv_centerTextColor | integer | oxff313131 | center text color |
awv_outerTextColor | integer | 0xffafafaf | outer text color |
awv_dividerTextColor | integer | oxff313131 | center text color |
awv_itemsVisibleCount | integer | 9 | visible item count |
awv_isLoop | boolean | true | is loop mode |
3.性能的極大優化,下面是優化前后的刷新對比
優化前
優化后
更新控件目的,是希望可以直接在項目中使用,也希望大家會喜歡,如果有任何問題,請隨時在GitHub上面提交issue,這個項目,我將會持續跟進。