Created
September 22, 2015 20:51
-
-
Save orhanobut/7bedeb75b210f9ff8fe4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginFragment extends Fragment { | |
private LoginListener listener; | |
@Override public void onAttach(Activity activity) { | |
super.onAttach(activity); | |
loginListener = (LoginListener) activity; | |
} | |
void onLoginClicked() { | |
listener.onLogin(); | |
} | |
void onRegisterClicked() { | |
listener.onRegister(); | |
} | |
public interface LoginListener { | |
void onLogin(); | |
void onRegister(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment