I have a fragment that handle a button, i want my Activity to be notified when this button is clicked, Thank you for any help
Asked
Active
Viewed 906 times
2 Answers
1
Follow these steps :
1.Create one interface
2.Implement that in your activity
3.Pass its object to your fragment
4.And onclick of that button call Interface's method using that object

Apurva Kolapkar
- 1,270
- 2
- 16
- 32
-
Ok thank you it's working – hamou amroun May 19 '17 at 15:22
0
You can implement Observer Pattern to make such a handler, more info Observer Design Pattern

Bopmaster
- 61
- 6