Skip to content
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

disables onItemClick Listner when setClickable to Ripple View #21

Open
akashk1992 opened this issue Sep 1, 2015 · 1 comment
Open

Comments

@akashk1992
Copy link

I've list view listView.setOnItemClickListener(this)

and

I've ripple code in base adapter extending class
View view = layoutInflater.inflate(R.layout.quick_search_property_row, null);
LinearLayout propertyTypeLayout = (LinearLayout) view.findViewById(R.id.property_type_layout);
//ripple effect..
propertyTypeLayout.setBackground(getRippleDrawable(R.drawable.ripple_effect));
propertyTypeLayout.setClickable(true);
propertyTypeLayout.setOnTouchListener(new DrawableHotspotTouch((LollipopDrawable) propertyTypeLayout.getBackground()));

but this clickable removes onItemClickLisner on LIstView

@ozodrukh
Copy link
Owner

ozodrukh commented Sep 2, 2015

Instead use listView.setSelector(getRippleDrawable(R.drawable.ripple_effect));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants