Image View inside CollapsingToolbarLayout , but click event is not triggering. How to to solve this issue.
Just make sure you don't have any view above the layout. In my case I had a toolbar and it was eating the clicks.
<android.support.design.widget.CollapsingToolbarLayout
>
<include...
/>
<android.support.v7.widget.Toolbar...
/>
<android.support.design.widget.TabLayout...
/>
</android.support.design.widget.CollapsingToolbarLayout>
I had to create a new Class extending toolbar that let clicks go through it(How to click views behind a Toolbar?)
public class NonClickableToolbar extends Toolbar {
@Override
public boolean onTouchEvent(MotionEvent ev) {
return false;
}
}
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