mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Modify onBackPressed()
This commit is contained in:
parent
3c895e3473
commit
0fe7998488
1 changed files with 6 additions and 15 deletions
|
|
@ -17,16 +17,14 @@ import fr.free.nrw.commons.R;
|
|||
|
||||
public class SignupActivity extends Activity {
|
||||
|
||||
private boolean otherPage;
|
||||
private WebView webView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Log.d("SignupActivity", "Signup Activity started");
|
||||
otherPage = false;
|
||||
|
||||
|
||||
WebView webView = new WebView(this);
|
||||
webView = new WebView(this);
|
||||
setContentView(webView);
|
||||
|
||||
webView.setWebViewClient(new MyWebViewClient());
|
||||
|
|
@ -59,19 +57,12 @@ public class SignupActivity extends Activity {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
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);
|
||||
startActivity(intent);
|
||||
}
|
||||
else {
|
||||
//If we are in signup page, back button should take us back to LoginActivity
|
||||
Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
|
||||
startActivity(intent);
|
||||
if (webView.canGoBack()) {
|
||||
webView.goBack();
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue