From 3eb07a1ae17b8077b59803376f8e23fe80efa27e Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 14 Sep 2017 17:47:01 +0200 Subject: improves comparison of images - reduces complexity and more reliable --- app/src/main/java/se/leap/bitmaskclient/VpnFragment.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/VpnFragment.java b/app/src/main/java/se/leap/bitmaskclient/VpnFragment.java index 9210c6ec..6ffeacc1 100644 --- a/app/src/main/java/se/leap/bitmaskclient/VpnFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/VpnFragment.java @@ -49,6 +49,7 @@ public class VpnFragment extends Fragment implements Observer { private static EipStatus eip_status; private boolean wants_to_connect; + //FIXME: replace with onAttach(Context context) public void onAttach(Activity activity) { super.onAttach(activity); @@ -254,12 +255,15 @@ public class VpnFragment extends Fragment implements Observer { if(eip_status.isConnecting()) { vpn_status_image.showProgress(true); vpn_status_image.setIcon(R.drawable.ic_stat_vpn_empty_halo, R.drawable.ic_stat_vpn_empty_halo); + vpn_status_image.setTag(R.drawable.ic_stat_vpn_empty_halo); } else { vpn_status_image.showProgress(false); vpn_status_image.setIcon(R.drawable.ic_stat_vpn, R.drawable.ic_stat_vpn); + vpn_status_image.setTag(R.drawable.ic_stat_vpn); } } else { vpn_status_image.setIcon(R.drawable.ic_stat_vpn_offline, R.drawable.ic_stat_vpn_offline); + vpn_status_image.setTag(R.drawable.ic_stat_vpn_offline); vpn_status_image.showProgress(false); } } -- cgit v1.2.3