Bearded-Hen / Android-Bootstrap

Bootstrap style widgets for Android, with Glyph Icons
MIT License
7.28k stars 1.43k forks source link

AwesomeTextView "android:clickable" cannot be set to false within XML #155

Closed TediPapajorgji closed 8 years ago

TediPapajorgji commented 8 years ago

When setting the property "android:clickable" to false for an AwesomeTextView through XML, the AwesomeTextView remains clickable. The only way to set AwesomeTextView to non-clickable is through the method .setClickable(false); inside the activity.

jamie-beardedhen commented 8 years ago

This line seems to be causing the issue. I believe this default value of true might be required for subclasses like BootstrapButton to display visual feedback for presses, although the correct behaviour would be for the XML attribute to override that default value.

setClickable(true); // allows view to reach android:state_pressed
ademcayir commented 8 years ago

this is very annoying

jamie-beardedhen commented 8 years ago

Feel free to make a pull request if the issue is blocking your usecases. You would need to check whether android:clickable is in the XML attributes, and if so use that rather than always setting clickable to true.