fix wizard gui
This commit is contained in:
parent
4b388da5a3
commit
4da0f345cf
|
@ -37,7 +37,7 @@
|
||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -15,6 +15,7 @@ import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
|
@ -110,6 +111,20 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
final AdapterView.OnItemSelectedListener onItemSelectedListener = new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
calculateInsulin();
|
||||||
|
wizardDialogDeliverButton.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
ToastUtils.showToastInUiThread(getContext(), MainApp.sResources.getString(R.string.noprofileselected));
|
||||||
|
wizardDialogDeliverButton.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
@ -148,6 +163,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
|
||||||
bgCheckbox.setOnCheckedChangeListener(onCheckedChangeListener);
|
bgCheckbox.setOnCheckedChangeListener(onCheckedChangeListener);
|
||||||
basalIobCheckbox.setOnCheckedChangeListener(onCheckedChangeListener);
|
basalIobCheckbox.setOnCheckedChangeListener(onCheckedChangeListener);
|
||||||
bolusIobCheckbox.setOnCheckedChangeListener(onCheckedChangeListener);
|
bolusIobCheckbox.setOnCheckedChangeListener(onCheckedChangeListener);
|
||||||
|
profileSpinner.setOnItemSelectedListener(onItemSelectedListener);
|
||||||
|
|
||||||
Integer maxCarbs = MainApp.getConfigBuilder().applyCarbsConstraints(Constants.carbsOnlyForCheckLimit);
|
Integer maxCarbs = MainApp.getConfigBuilder().applyCarbsConstraints(Constants.carbsOnlyForCheckLimit);
|
||||||
Double maxCorrection = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit);
|
Double maxCorrection = MainApp.getConfigBuilder().applyBolusConstraints(Constants.bolusOnlyForCheckLimit);
|
||||||
|
|
|
@ -304,5 +304,6 @@
|
||||||
<string name="objectives_6_objective">Enabling additional features for daytime use, such as advanced meal assist</string>
|
<string name="objectives_6_objective">Enabling additional features for daytime use, such as advanced meal assist</string>
|
||||||
<string name="youareonallowedlimit">You reached allowed limit</string>
|
<string name="youareonallowedlimit">You reached allowed limit</string>
|
||||||
<string name="openapsma_target_bg">Target value for calculations</string>
|
<string name="openapsma_target_bg">Target value for calculations</string>
|
||||||
|
<string name="noprofileselected">No profile seselcted</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue