ProgressRoundButton


Source link: https://github.com/cctanfujun/ProgressRoundButton

ProgressRoundButton

A Smooth Download Button with Progress.

Demo

![demo](./img/Oct-27-2016 10-39-17.gif)

Usage

step1

gradle

 dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.android.support:appcompat-v7:23.0.1'

compile 'com.xiaochendev.progressroundbtn:library:2.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"/>

advanced

  • If you want shadow and press effect?please use AnimButtonLayout instead of AnimDownloadProgressButton :
<com.xiaochen.progressroundbutton.AnimButtonLayout

 android:id="@+id/anim_btn3"

 android:layout_width="match_parent"

 android:layout_height="40dp"

 android:layout_marginTop="40dp"

 app:progressbtn_backgroud_color="@android:color/holo_blue_dark"

 app:progressbtn_backgroud_second_color="@android:color/darker_gray"

 app:progressbtn_enable_gradient="true"

 app:progressbtn_enable_press="true"/>
  • You can also implement your own ButtonController,so that you can controll gradient effect;

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
progressbtn_enable_press boolean false
progressbtn_enable_gradient boolean false

The follow picture make a clear explanation:

open gradient

use AnimButtonLayout

Version

  • 2.0.0 Now you can use press effect; Now you can use gradient effect; Add AnimButtomLayout with shadow ?when you press the button will be small;

  • 1.1.0 Fix the bug when setProgressText("something",100),first tiem getProgress() return 0;

  • 1.0.0
    Now you can set text size;
    Add Method removeAllAnim() to avoid memory leak;

  • 0.9.1

About me

I am a developer in China?If you have any idea about this project?please contact me ,Thank you!

??Android?

????????????? Android ???????????????????????????????Android????????

License

Copyright 2015 cctanfujun  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

Material Design EditText with a delightful linear ripple in background.

Vertically ViewPager and vertically transformer for Android.

An easy way to test performance, security and functionality on real devices.

Upload your .apk today and Monkop will test it for you. Get detailed report in your inbox in less than 24 hrs!

Convert OkHttp requests into curl logs.

IntelliJ/AndroidStudio plugin which provides a button to connect your Android device over WiFi to install, run and debug your applications without a USB connected.

Smash is Volley-inspired networking library that's using OkHttp in its core.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes