Review of login view layout optimizing the adaption to different screen sizes
[pub/Android/ownCloud.git] / src / com / owncloud / android / authentication / AuthenticatorActivity.java
index ef5c21b..e4787fb 100644 (file)
@@ -178,6 +178,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             mStatusText = mStatusIcon = 0;\r
             mStatusCorrect = false;\r
             mIsSslConn = false;\r
+            updateConnStatus();\r
+            updateAuthStatus();\r
             \r
             /// retrieve extras from intent\r
             String tokenType = getIntent().getExtras().getString(AccountAuthenticator.KEY_AUTH_TOKEN_TYPE);\r
@@ -270,7 +272,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         updateConnStatus();\r
         \r
         /// UI settings depending upon connection\r
-        mOkButton.setEnabled(mStatusCorrect);   // TODO really necessary?\r
+        mOkButton.setEnabled(mStatusCorrect);  \r
         if (!mStatusCorrect)\r
             mRefreshButton.setVisibility(View.VISIBLE); // seems that setting visibility is necessary\r
         else\r
@@ -347,7 +349,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
 \r
         /// GET ACCESS TOKEN to the oAuth server \r
         RemoteOperation operation = new OAuth2GetAccessToken(   getString(R.string.oauth2_client_id), \r
-                                                                getString(R.string.oauth2_redirect_uri), // TODO check - necessary here?      \r
+                                                                getString(R.string.oauth2_redirect_uri),       \r
                                                                 getString(R.string.oauth2_grant_type),\r
                                                                 queryParameters);\r
         //WebdavClient client = OwnCloudClientUtils.createOwnCloudClient(Uri.parse(getString(R.string.oauth2_url_endpoint_access)), getApplicationContext());\r
@@ -964,16 +966,13 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
      * to the last check on the ownCloud server.\r
      */\r
     private void updateConnStatus() {\r
-        ImageView iv = (ImageView) findViewById(R.id.action_indicator);\r
-        TextView tv = (TextView) findViewById(R.id.status_text);\r
+        TextView tv = (TextView) findViewById(R.id.server_status_text);\r
 \r
         if (mStatusIcon == 0 && mStatusText == 0) {\r
-            iv.setVisibility(View.INVISIBLE);\r
             tv.setVisibility(View.INVISIBLE);\r
         } else {\r
-            iv.setImageResource(mStatusIcon);\r
             tv.setText(mStatusText);\r
-            iv.setVisibility(View.VISIBLE);\r
+            tv.setCompoundDrawablesWithIntrinsicBounds(mStatusIcon, 0, 0, 0);\r
             tv.setVisibility(View.VISIBLE);\r
         }\r
     }\r