From d357b00ca67c0757ec8cbe9e9f3a34398d6f6c41 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 26 Mar 2018 10:56:56 +0200 Subject: [PATCH] display activate button properly --- .../plugins/ProfileNS/NSProfileFragment.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java index 62fb71a0a0..f47ef8a686 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java @@ -119,10 +119,15 @@ public class NSProfileFragment extends SubscriberFragment { target.setText(profile.getTargetList()); basalGraph.show(profile); } - if (profile.isValid("NSProfileFragment")) + if (profile.isValid("NSProfileFragment")) { invalidProfile.setVisibility(View.GONE); - else + activateButton.setVisibility(View.VISIBLE); + } else { invalidProfile.setVisibility(View.VISIBLE); + activateButton.setVisibility(View.GONE); + } + } else { + activateButton.setVisibility(View.GONE); } } @@ -137,6 +142,7 @@ public class NSProfileFragment extends SubscriberFragment { isf.setText(""); basal.setText(""); target.setText(""); + activateButton.setVisibility(View.GONE); } @OnClick(R.id.nsprofile_profileswitch)