Search code examples
androidandroid-recyclerviewandroid-spinnerandroid-relativelayout

Previous layout get clicked from overlaped layout in Activity


I have two reletive layout. First has spinner and recyclerview and second has a imageview. Second layout overlap first layout on button click. But when I click on second layout, first layout spinner and recylerview get clicked and it shows on second layout.


Solution

  • Add

    android:clickable="true" android:focusable="true"

    to your image view layout. It will not propagate your clicks to your first layout.