|
@ -21,7 +21,7 @@ import static gr.thmmy.mthmmy.session.SessionManager.WRONG_USER; |
|
|
|
|
|
|
|
|
public class LoginActivity extends BaseActivity { |
|
|
public class LoginActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
//-----------------------------------------CLASS VARIABLES------------------------------------------
|
|
|
//-----------------------------------------CLASS VARIABLES------------------------------------------
|
|
|
/* --Graphics-- */ |
|
|
/* --Graphics-- */ |
|
|
private Button btnLogin; |
|
|
private Button btnLogin; |
|
|
private EditText inputUsername; |
|
|
private EditText inputUsername; |
|
@ -114,7 +114,7 @@ public class LoginActivity extends BaseActivity { |
|
|
return valid; |
|
|
return valid; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//--------------------------------------------LOGIN-------------------------------------------------
|
|
|
//--------------------------------------------LOGIN-------------------------------------------------
|
|
|
private class LoginTask extends AsyncTask<String, Void, Integer> { |
|
|
private class LoginTask extends AsyncTask<String, Void, Integer> { |
|
|
//Class variables
|
|
|
//Class variables
|
|
|
ProgressDialog progressDialog; |
|
|
ProgressDialog progressDialog; |
|
@ -128,10 +128,10 @@ public class LoginActivity extends BaseActivity { |
|
|
protected void onPreExecute() { //Show a progress dialog until done
|
|
|
protected void onPreExecute() { //Show a progress dialog until done
|
|
|
btnLogin.setEnabled(false); //Login button shouldn't be pressed during this
|
|
|
btnLogin.setEnabled(false); //Login button shouldn't be pressed during this
|
|
|
|
|
|
|
|
|
progressDialog = new ProgressDialog(LoginActivity.this, |
|
|
progressDialog = new ProgressDialog(LoginActivity.this,R.style.MyProgressDialog); |
|
|
R.style.AppTheme); |
|
|
progressDialog.setTitle("Please Wait"); |
|
|
progressDialog.setIndeterminate(true); |
|
|
|
|
|
progressDialog.setMessage("Authenticating..."); |
|
|
progressDialog.setMessage("Authenticating..."); |
|
|
|
|
|
progressDialog.setIndeterminate(true); |
|
|
progressDialog.show(); |
|
|
progressDialog.show(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|