i want to have a function in one class, that does an animation and then notify''s a function that is passed to it which is in another class. how do i do that ?
exapmle: in my scanning barcode activity i have:
public void callbackFNC () {
//this is the callback bunction
}
from scanning barcode activity i'm calling a function that is in another activity like (i want to pass the callback that is in scanning barcode activity as parameter there) :
loadToastModule loadToastMD = new loadToastModule();
loadToastMD.doEvent(toastModel);
then in doEvent that sits in LoadToastModule.class function i want to have
public void doEvent(LoadToast toastModel) {
toastModel.error();
new CountDownTimer(0, 500) {
public void onTick(long millisUntilFinished) {
//do nothing
}
public void onFinish() {
****DO THE CALLBACK HERE
****DO THE CALLBACK HERE
}
}.start();
- it is important to me that i'll use it like this instead of just calling a PACIFIC function because in the future i want to use the same function with different callback.
thnx !!!