display activate button properly

This commit is contained in:
Milos Kozak 2018-03-26 10:56:56 +02:00
parent f0e779cb1f
commit d357b00ca6

View file

@ -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)