From da63b0ee0ddd33693630719f1833107b944621e1 Mon Sep 17 00:00:00 2001 From: Iason Karakostas Date: Mon, 28 Nov 2016 18:42:07 +0200 Subject: [PATCH] progressDialog Fix --- .../java/gr/thmmy/mthmmy/activities/LoginActivity.java | 10 +++++----- app/src/main/res/values/styles.xml | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java index e4c3ed1b..78534e9c 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java @@ -21,7 +21,7 @@ import static gr.thmmy.mthmmy.session.SessionManager.WRONG_USER; public class LoginActivity extends BaseActivity { -//-----------------------------------------CLASS VARIABLES------------------------------------------ + //-----------------------------------------CLASS VARIABLES------------------------------------------ /* --Graphics-- */ private Button btnLogin; private EditText inputUsername; @@ -114,7 +114,7 @@ public class LoginActivity extends BaseActivity { return valid; } -//--------------------------------------------LOGIN------------------------------------------------- + //--------------------------------------------LOGIN------------------------------------------------- private class LoginTask extends AsyncTask { //Class variables ProgressDialog progressDialog; @@ -128,10 +128,10 @@ public class LoginActivity extends BaseActivity { protected void onPreExecute() { //Show a progress dialog until done btnLogin.setEnabled(false); //Login button shouldn't be pressed during this - progressDialog = new ProgressDialog(LoginActivity.this, - R.style.AppTheme); - progressDialog.setIndeterminate(true); + progressDialog = new ProgressDialog(LoginActivity.this,R.style.MyProgressDialog); + progressDialog.setTitle("Please Wait"); progressDialog.setMessage("Authenticating..."); + progressDialog.setIndeterminate(true); progressDialog.show(); } diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 854e6cdf..36a430fb 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -41,4 +41,10 @@ @color/primary + + +