From: Tobias Brunner Date: Thu, 9 Aug 2012 13:01:19 +0000 (+0200) Subject: Use colors from the Android color palette for the VPN status texts X-Git-Tag: 5.0.1~210^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0fe43f0029c171c05df107f7338497b17fe2e0b;p=thirdparty%2Fstrongswan.git Use colors from the Android color palette for the VPN status texts --- diff --git a/src/frontends/android/res/values/colors.xml b/src/frontends/android/res/values/colors.xml new file mode 100644 index 0000000000..be64d5d5a4 --- /dev/null +++ b/src/frontends/android/res/values/colors.xml @@ -0,0 +1,24 @@ + + + + + #D9192C + + #99CC00 + + diff --git a/src/frontends/android/src/org/strongswan/android/ui/VpnStateFragment.java b/src/frontends/android/src/org/strongswan/android/ui/VpnStateFragment.java index ac632fd988..b86fd187b7 100644 --- a/src/frontends/android/src/org/strongswan/android/ui/VpnStateFragment.java +++ b/src/frontends/android/src/org/strongswan/android/ui/VpnStateFragment.java @@ -33,7 +33,6 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.ServiceConnection; -import android.graphics.Color; import android.os.Bundle; import android.os.IBinder; import android.view.LayoutInflater; @@ -213,7 +212,7 @@ public class VpnStateFragment extends Fragment implements VpnStateListener showProfile(true); enableActionButton(true); mStateView.setText(R.string.state_connected); - mStateView.setTextColor(Color.GREEN); + mStateView.setTextColor(getResources().getColor(R.color.success_text)); break; case DISCONNECTING: showProfile(true); @@ -254,7 +253,7 @@ public class VpnStateFragment extends Fragment implements VpnStateListener showProfile(true); enableActionButton(false); mStateView.setText(R.string.state_error); - mStateView.setTextColor(Color.RED); + mStateView.setTextColor(getResources().getColor(R.color.error_text)); switch (error) { case AUTH_FAILED: