I have a list item with a button inside.
When the button is shown, the list item is not clickable anymore. To make it clickable again, I have replaced the button with a view. The problem is that, when the list item is clicked, the button changes background image (like if it is clicked). How can avoid this bad behaviour?
Thanks
Find the array for the field you want to display as a link (e.g. custom_link_c ). Add 'type'=>'name', and 'link'=>true, to the array for the field, which will override the stock field's vardef and make the field clickable.
A disabled button is unusable and un-clickable. The disabled attribute can be set to keep a user from clicking on the button until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript could remove the disabled value, and make the button clickable again.
Set the following properties for you button
android:focusable="false"
android:focusableInTouchMode="false"
For ImageButton, also add the following to the parent view
android:descendantFocusability="blocksDescendants"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With