I am facing a strange problem. I have 4 fragments A,B,C and D. At starting I added fragment A then replace with Fragment B using fragmentTransaction.replace(id,B). then I added fragment C using fragmentTransaction.add(id,C). Fragment C contains some buttons. Then I use fragmentTransaction.replace(id,D). The problem is when fragment D is visible and I tap on the possition where button lie on fragment C, the click event of button get fired.
I can't understand why it happens. If I use replace for all fragments then it is working fine. Please help me out. I need to use fragmentTransaction.add. Thanks in advance.
0 comments:
Post a Comment