Add comments

This commit is contained in:
misaochan 2016-08-10 18:24:40 +12:00
parent 6e47d7866d
commit 0ba6b9c09a

View file

@ -43,8 +43,8 @@ public class SignupActivity extends Activity {
intent.putExtra("Redirected", true); intent.putExtra("Redirected", true);
startActivity(intent); startActivity(intent);
return true; return true;
} } else {
else { //If user clicks any other links in the webview
Log.d("SignupActivity", "Not overriding URL, URL is: " + url); Log.d("SignupActivity", "Not overriding URL, URL is: " + url);
otherPage = true; otherPage = true;
return false; return false;
@ -55,10 +55,12 @@ public class SignupActivity extends Activity {
@Override @Override
public void onBackPressed() { public void onBackPressed() {
if (otherPage == true) { if (otherPage == true) {
//If we are in any page except the main signup page, back button should take us back to signup page
Intent intent = new Intent(this, SignupActivity.class); Intent intent = new Intent(this, SignupActivity.class);
startActivity(intent); startActivity(intent);
} }
else { else {
//If we are in signup page, back button should take us back to LoginActivity
Intent intent = new Intent(getApplicationContext(), LoginActivity.class); Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
intent.putExtra("Redirected", true); intent.putExtra("Redirected", true);
startActivity(intent); startActivity(intent);