Possible Duplicate:
How to Define Callbacks in Android?
I was reading through the Internet about Callbacks and I understand that this has heavy weightage in an Android Ecosystem.
Can anyone state an example and explain what are callbacks are how do they work?
Do you mean callback using interface?
if yes here’s an example
this is callbackmenu.java
this is an example how you implement it
this is an example that will allow you to access a view from another view
like what I use in my calendar library, I create 3 view classes, calendar View, calendar row, calendar cell
with passing this callback from calendar view to calendar cell we can add view,set value or anything else in the calendar view from the calendar cell (calendar cell is a part of calendar row and calendar row is a part of calendar view) in this example I’m trying to set whenever the user click the cell we will add another view in the calendar view (main view)
this is the example of using callback in the calendar cell
so I set the callback in the calendar view and pass it to the calendar row and pass it again to the calendar cell and call the onClick in the calendar cell
I think that’s all if you have any question feel free to write in the comment 🙂