dmytrodanylyk / android-process-button

Android Buttons With Built-in Progress Meters.
http://dmytrodanylyk.com/pages/portfolio/portfolio-process-button.html
MIT License
3k stars 545 forks source link

setText doesn't modify normal text #46

Open FranciscoE-Hudl opened 9 years ago

FranciscoE-Hudl commented 9 years ago

In FlatButton line 49you set mNormalText and don't allow modifying it again. When a programmer needs the idle text to change, there's no available method to override that initial value, which is later reused whenever the button changes states.

Solution: expose setNormalText()

Workaround: Subclass ActionProcessButton, add your accessible mNormalText field and override getNormalText() to return it instead.