UnsupportedOperationException due to injection of Application Context while inflating layout in adapter.
Author: riteshakya037Created Jun 26, 2017Updated Sep 3, 2024
So I was trying to set android:background="?selectableItemBackground" on the adapter item view when I ran into this issue. On further research I found out that passing application context while creating custom view results in this issue. This seriously limits injecting the adapter.
Thanks
Source: android10/Android-CleanArchitecture