filling in some data
This commit is contained in:
parent
da89ea1643
commit
41af503104
2 changed files with 36 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.PumpDanaR.activities;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
@ -7,6 +8,7 @@ import android.os.HandlerThread;
|
|||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import android.text.Spanned;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
@ -21,6 +23,16 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaRKorean.DanaRKoreanPlugin;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaRS.DanaRSPlugin;
|
||||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
||||
import info.nightscout.utils.DateUtil;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
import info.nightscout.utils.SetWarnColor;
|
||||
|
||||
/**
|
||||
* Created by Rumen Georgiev on 5/31/2018.
|
||||
|
@ -41,6 +53,7 @@ public class DanaRUserOptionsActivity extends Activity {
|
|||
RadioButton pumpAlarmSound;
|
||||
RadioButton pumpAlarmVibrate;
|
||||
RadioButton pumpAlarmBoth;
|
||||
Switch pumpUnits;
|
||||
EditText screenTimeout;
|
||||
EditText backlightTimeout;
|
||||
EditText shutdown;
|
||||
|
@ -73,10 +86,32 @@ public class DanaRUserOptionsActivity extends Activity {
|
|||
pumpAlarmBoth = (RadioButton) findViewById(R.id.danar_pumpalarm_both);
|
||||
screenTimeout = (EditText) findViewById(R.id.danar_screentimeout);
|
||||
backlightTimeout = (EditText) findViewById(R.id.danar_backlight);
|
||||
pumpUnits = (Switch) findViewById(R.id.danar_units);
|
||||
shutdown = (EditText) findViewById(R.id.danar_shutdown);
|
||||
lowReservoir = (EditText) findViewById(R.id.danar_lowreservoir);
|
||||
|
||||
boolean isKorean = MainApp.getSpecificPlugin(DanaRKoreanPlugin.class) != null && MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).isEnabled(PluginType.PUMP);
|
||||
boolean isRS = MainApp.getSpecificPlugin(DanaRSPlugin.class) != null && MainApp.getSpecificPlugin(DanaRSPlugin.class).isEnabled(PluginType.PUMP);
|
||||
|
||||
Activity activity = this;
|
||||
if (activity != null)
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void run() {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
if (pump.getUnits() != null) {
|
||||
if(pump.getUnits() == "mmol") {
|
||||
pumpUnits.setChecked(true);
|
||||
}
|
||||
}
|
||||
if (pump.timeDisplayType != 0) {
|
||||
timeFormat.setChecked(true);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1081,7 +1081,7 @@
|
|||
<string name="setupwizard_aps_description">Select one from availables algorithms. They are sorted from oldest to newest. Newer algorithm is usualy more powerfull and more aggresive. Thus if you are new looper you may probably start with AMA and not with latest one. Do not forget to read the OpenAPS documentation and configure it before use.</string>
|
||||
<string name="startobjective">Start your first objective</string>
|
||||
<string name="danar_useroptions">Additional options</string>
|
||||
<string name="danar_timedisplay">Display time format( not 12hr )</string>
|
||||
<string name="danar_timedisplay">Display time format</string>
|
||||
<string name="danar_buttonscroll">Button scroll</string>
|
||||
<string name="danar_beep">Beep on button press</string>
|
||||
<string name="danar_pumpalarm">Alarm</string>
|
||||
|
|
Loading…
Reference in a new issue