ckurtm / FabButton

Android Floating ActionButton with a progress indicator ring
774 stars 152 forks source link

fabButton block onItemClickListener in listView #6

Closed luckyshane closed 9 years ago

luckyshane commented 9 years ago

Hi, Thanks to this great button. It works well in normal layout, except when i put it in my listView. I found that will lead to onItemClickListener and onItemLongClickListener won't work.
I have tried to set "android:descendantFocusability="blocksDescendants" and make this button focuseable false, but it didn't work.
somebody can help me ?

luckyshane commented 9 years ago

Hi, I modified the source code of class "CircleImageView " to solve the up issue.

Just make it can not be focusable in "init" function, like this: private void init(Context context, AttributeSet attrs) { this.setFocusable(false); ...... }

Also, I found that "FabButton" can not be disable. So I override the "setEnabled" function to make it work. Just like this:

@Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); circle.setEnabled(enabled); ring.setEnabled(enabled); }

ckurtm commented 9 years ago

fixed as suggested. get new version 1.0.7