Duplicate buttons are in my xml file which is fragment_employee2
I'm only creating one xml file to list out all the list in one xml
Here is the code in my https://gist.github.com/Umen14/8d1a205f016fa970369d37f37d4bf15d
And here are the images:-
enter image description here
I tried by removing here and there but the code seems to be the same but there is a problem in the onclick listener in my EmployeeFragment.java
enter image description here

Duplicate Buttons in xml file using android studio java
This is showing duplicate because you are using same xml in recyclerView item   as well as activity layout. which R.layout.fragment_employee2 in your case. You need to define different layout in EmployeeAdapter without button. This will resolve you issue.
