Pump needs rest.

(cherry picked from commit 2e88fb9)
This commit is contained in:
Johannes Mockenhaupt 2018-01-31 00:30:53 +01:00
parent 154902acdc
commit 6981c0fec6
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 10 additions and 2 deletions

View file

@ -14,6 +14,8 @@ import android.widget.TextView;
import com.squareup.otto.Subscribe; import com.squareup.otto.Subscribe;
import org.apache.commons.lang3.StringUtils;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState; import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.PumpState;
import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus; import info.nightscout.androidaps.plugins.PumpCombo.ruffyscripter.history.Bolus;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
@ -193,7 +195,13 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis
// activity // activity
String activity = plugin.getPump().activity; String activity = plugin.getPump().activity;
activityView.setText(activity != null ? activity : ""); if (StringUtils.isNotEmpty(activity)) {
activityView.setTextSize(14);
activityView.setText(activity);
} else {
activityView.setTextSize(18);
activityView.setText("{fa-bed}");
}
if (plugin.isInitialized()) { if (plugin.isInitialized()) {
refreshButton.setVisibility(View.VISIBLE); refreshButton.setVisibility(View.VISIBLE);

View file

@ -87,7 +87,7 @@
android:text=":" android:text=":"
android:textSize="14sp" /> android:textSize="14sp" />
<TextView <com.joanzapata.iconify.widget.IconTextView
android:id="@+id/combo_activity" android:id="@+id/combo_activity"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"