-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library has a configurable stroke witdth for the idle and the progress state #72
base: master
Are you sure you want to change the base?
Library has a configurable stroke witdth for the idle and the progress state #72
Conversation
The library supports right now custom properties, but they cannot be defined in a theme following this pattern (http://blog.stylingandroid.com/custom-controls-part-3/) due that it ignores the constructor parameter 'int defStyleAttr'. The commit 7a0725e fixes it. |
It is normally known if the progress view is going to be determinate or not, so it is handy to have an XML attribute 'cpb_progressIndeterminate' to define it. |
It is convenient to support the android attribute text as default for 'cpb_textIdle', as well as support CharSequence given the fact that TextView class hierarchy support it. |
return mIdleText; | ||
} | ||
|
||
public String getCompleteText() { | ||
public CharSequence getCompleteText() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please help me. what's wrong with String
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CharSequence
is more flexible.
E.g. https://developer.android.com/reference/android/text/Spannable
implements CharSequence
interface, so you can make text with different color, size, style, etc.
It is convenient to be able to tune the stroke width when the button is shown as idle and when a progress indicator is shown.