Android-Bootstrap icon indicating copy to clipboard operation
Android-Bootstrap copied to clipboard

Making bootstrap button extend android.widget.button

Open greatjack1 opened this issue 6 years ago • 1 comments

I started using this library to spruce up my app, and I noticed that while most controls just required me to change the xml layout files, the bootstrap button required me to change my controller code since bootstrap button does not extend from android.widget.button. What was the reason for this design decision? and if possible can it be changed?

greatjack1 avatar Nov 01 '17 18:11 greatjack1

It extends AwesomeTextView, which in turns extends TextView. This was done as a lot of behaviour such as Bootstrap themes, and Font icons, is common across multiple classes (e.g. BootstrapButton, BootstrapLabel).

BootstrapButton also makes use of some custom touch event logic, which IMO could feel quite confusing to users if the class was extending a regular Android button - as you'd expect it to have the regular Android touch behaviour.

If there are good reasons to change the design of the class then I'm happy to change the implementation

fractalwrench avatar Nov 01 '17 20:11 fractalwrench