Android動畫效果的加載按鈕:ProgressRoundButton

jopen 9年前發布 | 24K 次閱讀 Android開發 移動開發 ProgressRoundButton

一個帶有下載進度動畫展示效果的按紐。

demo

Usage

step1

gradle

 dependencies {
     compile fileTree(dir: 'libs', include: ['*.jar'])
     compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.xiaochendev.progressroundbtn:library:1.0.0' }

step2

you can define the button in xml like this:

<com.xiaochen.progressroundbutton.AnimDownloadProgressButton
        android:id="@+id/anim_btn"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        app:progressbtn_backgroud_color="@android:color/holo_orange_light"
        app:progressbtn_backgroud_second_color="@android:color/holo_green_light"/>

the Customized properties are in the follow table: git

Property Format Default
progressbtn_radius float half of the button height
progressbtn_backgroud_color color #6699ff
progressbtn_backgroud_second_color color Color.LTGRAY
progressbtn_text_color color progressbtn_backgroud_color
progressbtn_text_covercolor color Color.WHITE

The follow picture make a clear explanation:

show

項目主頁:http://www.baiduhome.net/lib/view/home/1446797944248

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!