I am seeking forgiveness for this simple problem. I am using FastAdapter for the first time and I am new to Kotlin. Let me share the problem. I have a layout for the recyclerview item holder, an adapter which extends AbstractItem class.
Actually I couldn't format the code correctly here on Stack overflow. So I created the code at GitHub Gist. Here is the link.
In the layout_add_item.xml
file, I have two buttons, one's id is addStudent
and another one's id is addTeacher
.
So, my problem is, these two button's onClickListener is not triggered until I click on the root layout once on every onCreate method is called. If I click on the LinearLayout once, then these two button's onClickEvent get fired normally.
I don't know what's wrong here :-(
Any help would be appreciated. Thanks in advance.