66import android .os .Bundle ;
77import android .os .Handler ;
88import android .support .v4 .app .DialogFragment ;
9+ import android .support .v4 .content .ContextCompat ;
910import android .support .v7 .preference .CheckBoxPreference ;
1011import android .support .v7 .preference .Preference ;
1112import android .util .Log ;
@@ -180,19 +181,23 @@ public void onRemoteOperationFinish(RemoteOperation caller, RemoteOperationResul
180181 Log .e ("OC" , result .getLogMessage (), result .getException ());
181182
182183 if (caller instanceof GetRemoteStatusOperation ) {
184+ mServerError .setTextColor (ContextCompat .getColor (getContext (), R .color .debit_red ));
183185 mServerError .setText (getString (R .string .owncloud_server_invalid ));
184186 mServerError .setVisibility (View .VISIBLE );
185187
186188 } else if (caller instanceof GetRemoteUserNameOperation &&
187189 mServerError .getText ().toString ().equals (getString (R .string .owncloud_server_ok ))) {
190+ mUsernameError .setTextColor (ContextCompat .getColor (getContext (), R .color .debit_red ));
188191 mUsernameError .setText (getString (R .string .owncloud_user_invalid ));
189192 mUsernameError .setVisibility (View .VISIBLE );
190193 }
191194 } else {
192195 if (caller instanceof GetRemoteStatusOperation ) {
196+ mServerError .setTextColor (ContextCompat .getColor (getContext (), R .color .theme_primary ));
193197 mServerError .setText (getString (R .string .owncloud_server_ok ));
194198 mServerError .setVisibility (View .VISIBLE );
195199 } else if (caller instanceof GetRemoteUserNameOperation ) {
200+ mUsernameError .setTextColor (ContextCompat .getColor (getContext (), R .color .theme_primary ));
196201 mUsernameError .setText (getString (R .string .owncloud_user_ok ));
197202 mUsernameError .setVisibility (View .VISIBLE );
198203 }
@@ -208,9 +213,11 @@ public void onRemoteOperationFinish(RemoteOperation caller, RemoteOperationResul
208213 gu .execute (mClient , listener , mHandler );
209214
210215 if (FileUtils .isValidPath (mOC_dir , false )) {
216+ mDirError .setTextColor (ContextCompat .getColor (getContext (), R .color .theme_primary ));
211217 mDirError .setText (getString (R .string .owncloud_dir_ok ));
212218 mDirError .setVisibility (View .VISIBLE );
213219 } else {
220+ mDirError .setTextColor (ContextCompat .getColor (getContext (), R .color .debit_red ));
214221 mDirError .setText (getString (R .string .owncloud_dir_invalid ));
215222 mDirError .setVisibility (View .VISIBLE );
216223 }
0 commit comments