OK, I have a login class like the snippet below
public class LoginClass {
public void login() {
login.authorize(username,password);
//run activity specific code here
}
}
This class is quite generic, but depending on which activity calls LoginClass.login(), I would like different actions to be performed.
I've seen some implementation where a function is passed into the class and this function is then run on completion. Can anyone give me a brief example on how to do this.