remove butterknife at all, remove unused code, overview graph optimalization
This commit is contained in:
parent
66c05d8a08
commit
b8a8bed6c5
36 changed files with 244 additions and 337 deletions
|
@ -180,8 +180,4 @@ dependencies {
|
|||
compile 'com.google.code.gson:gson:2.7'
|
||||
compile 'com.google.guava:guava:20.0'
|
||||
|
||||
compile ('com.jakewharton:butterknife:8.5.1') {
|
||||
exclude module: 'support-compat'
|
||||
}
|
||||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
|
||||
}
|
|
@ -50,7 +50,7 @@ import info.nightscout.androidaps.plugins.TempTargetRange.TempTargetRangeFragmen
|
|||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsFragment;
|
||||
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpFragment;
|
||||
import info.nightscout.androidaps.plugins.Wear.WearFragment;
|
||||
import info.nightscout.androidaps.plugins.persistentnotification.PersistentNotificationPlugin;
|
||||
import info.nightscout.androidaps.plugins.Persistentnotification.PersistentNotificationPlugin;
|
||||
import info.nightscout.androidaps.receivers.KeepAliveReceiver;
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
package info.nightscout.androidaps.interfaces;
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
*/
|
||||
public interface FragmentBase {
|
||||
}
|
|
@ -17,17 +17,16 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.Actions.dialogs.FillDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
import info.nightscout.androidaps.plugins.Actions.dialogs.NewExtendedBolusDialog;
|
||||
import info.nightscout.androidaps.plugins.Actions.dialogs.NewTempBasalDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class ActionsFragment extends Fragment implements FragmentBase, View.OnClickListener {
|
||||
public class ActionsFragment extends Fragment implements View.OnClickListener {
|
||||
|
||||
static ActionsPlugin actionsPlugin = new ActionsPlugin();
|
||||
|
||||
|
|
|
@ -9,10 +9,9 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
|
||||
public class CareportalFragment extends Fragment implements FragmentBase, View.OnClickListener {
|
||||
public class CareportalFragment extends Fragment implements View.OnClickListener {
|
||||
|
||||
static CareportalPlugin careportalPlugin;
|
||||
|
||||
|
|
|
@ -21,9 +21,6 @@ import com.crashlytics.android.answers.CustomEvent;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventConfigBuilderChange;
|
||||
|
@ -31,7 +28,6 @@ import info.nightscout.androidaps.events.EventRefreshGui;
|
|||
import info.nightscout.androidaps.interfaces.APSInterface;
|
||||
import info.nightscout.androidaps.interfaces.BgSourceInterface;
|
||||
import info.nightscout.androidaps.interfaces.ConstraintsInterface;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.ProfileInterface;
|
||||
|
@ -42,7 +38,7 @@ import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
|
|||
import info.nightscout.utils.PasswordProtection;
|
||||
|
||||
|
||||
public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
||||
public class ConfigBuilderFragment extends Fragment {
|
||||
|
||||
static ConfigBuilderPlugin configBuilderPlugin = new ConfigBuilderPlugin();
|
||||
|
||||
|
@ -50,42 +46,26 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
|||
return configBuilderPlugin;
|
||||
}
|
||||
|
||||
@BindView(R.id.configbuilder_insulinlistview)
|
||||
ListView insulinListView;
|
||||
@BindView(R.id.configbuilder_bgsourcelistview)
|
||||
ListView bgsourceListView;
|
||||
@BindView(R.id.configbuilder_pumplistview)
|
||||
ListView pumpListView;
|
||||
@BindView(R.id.configbuilder_pumplabel)
|
||||
TextView pumpLabel;
|
||||
@BindView(R.id.configbuilder_looplistview)
|
||||
ListView loopListView;
|
||||
@BindView(R.id.configbuilder_looplabel)
|
||||
TextView loopLabel;
|
||||
@BindView(R.id.configbuilder_treatmentslistview)
|
||||
ListView treatmentsListView;
|
||||
@BindView(R.id.configbuilder_tempslistview)
|
||||
ListView tempsListView;
|
||||
@BindView(R.id.configbuilder_tempslabel)
|
||||
TextView tempsLabel;
|
||||
@BindView(R.id.configbuilder_profilelistview)
|
||||
ListView profileListView;
|
||||
@BindView(R.id.configbuilder_apslistview)
|
||||
ListView apsListView;
|
||||
@BindView(R.id.configbuilder_apslabel)
|
||||
TextView apsLabel;
|
||||
@BindView(R.id.configbuilder_constraintslistview)
|
||||
ListView constraintsListView;
|
||||
@BindView(R.id.configbuilder_constraintslabel)
|
||||
TextView constraintsLabel;
|
||||
@BindView(R.id.configbuilder_generallistview)
|
||||
ListView generalListView;
|
||||
@BindView(R.id.configbuilder_nsclientversion)
|
||||
TextView nsclientVerView;
|
||||
@BindView(R.id.configbuilder_nightscoutversion)
|
||||
TextView nightscoutVerView;
|
||||
|
||||
private Unbinder unbinder;
|
||||
LinearLayout mainLayout;
|
||||
Button unlock;
|
||||
|
||||
PluginCustomAdapter insulinDataAdapter = null;
|
||||
PluginCustomAdapter bgsourceDataAdapter = null;
|
||||
|
@ -98,11 +78,6 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
|||
PluginCustomAdapter constraintsDataAdapter = null;
|
||||
PluginCustomAdapter generalDataAdapter = null;
|
||||
|
||||
@BindView(R.id.configbuilder_mainlayout)
|
||||
LinearLayout mainLayout;
|
||||
@BindView(R.id.configbuilder_unlock)
|
||||
Button unlock;
|
||||
|
||||
// TODO: sorting
|
||||
|
||||
@Override
|
||||
|
@ -110,7 +85,26 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
|||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.configbuilder_fragment, container, false);
|
||||
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
insulinListView = (ListView) view.findViewById(R.id.configbuilder_insulinlistview);
|
||||
bgsourceListView = (ListView) view.findViewById(R.id.configbuilder_bgsourcelistview);
|
||||
pumpListView = (ListView) view.findViewById(R.id.configbuilder_pumplistview);
|
||||
pumpLabel = (TextView) view.findViewById(R.id.configbuilder_pumplabel);
|
||||
loopListView = (ListView) view.findViewById(R.id.configbuilder_looplistview);
|
||||
loopLabel = (TextView) view.findViewById(R.id.configbuilder_looplabel);
|
||||
treatmentsListView = (ListView) view.findViewById(R.id.configbuilder_treatmentslistview);
|
||||
tempsListView = (ListView) view.findViewById(R.id.configbuilder_tempslistview);
|
||||
tempsLabel = (TextView) view.findViewById(R.id.configbuilder_tempslabel);
|
||||
profileListView = (ListView) view.findViewById(R.id.configbuilder_profilelistview);
|
||||
apsListView = (ListView) view.findViewById(R.id.configbuilder_apslistview);
|
||||
apsLabel = (TextView) view.findViewById(R.id.configbuilder_apslabel);
|
||||
constraintsListView = (ListView) view.findViewById(R.id.configbuilder_constraintslistview);
|
||||
constraintsLabel = (TextView) view.findViewById(R.id.configbuilder_constraintslabel);
|
||||
generalListView = (ListView) view.findViewById(R.id.configbuilder_generallistview);
|
||||
nsclientVerView = (TextView) view.findViewById(R.id.configbuilder_nsclientversion);
|
||||
nightscoutVerView = (TextView) view.findViewById(R.id.configbuilder_nightscoutversion);
|
||||
|
||||
mainLayout = (LinearLayout) view.findViewById(R.id.configbuilder_mainlayout);
|
||||
unlock = (Button) view.findViewById(R.id.configbuilder_unlock);
|
||||
|
||||
nsclientVerView.setText(ConfigBuilderPlugin.nsClientVersionName);
|
||||
nightscoutVerView.setText(ConfigBuilderPlugin.nightscoutVersionName);
|
||||
|
@ -139,12 +133,6 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
|
|||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
unbinder.unbind();
|
||||
}
|
||||
|
||||
void setViews() {
|
||||
insulinDataAdapter = new PluginCustomAdapter(getContext(), R.layout.configbuilder_simpleitem, MainApp.getSpecificPluginsListByInterface(InsulinInterface.class), PluginBase.INSULIN);
|
||||
insulinListView.setAdapter(insulinDataAdapter);
|
||||
|
|
|
@ -23,9 +23,8 @@ import java.util.List;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
public class ObjectivesFragment extends Fragment implements View.OnClickListener, FragmentBase {
|
||||
public class ObjectivesFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(ObjectivesFragment.class);
|
||||
|
||||
private static ObjectivesPlugin objectivesPlugin;
|
||||
|
@ -43,15 +42,6 @@ public class ObjectivesFragment extends Fragment implements View.OnClickListener
|
|||
LinearLayout fake_layout;
|
||||
TextView reset;
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
switch (id) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.ObjectiveViewHolder> {
|
||||
|
||||
List<ObjectivesPlugin.Objective> objectives;
|
||||
|
@ -236,16 +226,4 @@ public class ObjectivesFragment extends Fragment implements View.OnClickListener
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
MainApp.bus().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
MainApp.bus().register(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,9 +6,7 @@ import android.support.v4.app.Fragment;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
public class SafetyFragment extends Fragment implements FragmentBase{
|
||||
public class SafetyFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(SafetyFragment.class);
|
||||
|
||||
private static SafetyPlugin safetyPlugin = new SafetyPlugin();
|
||||
|
|
|
@ -5,42 +5,35 @@ import android.support.v4.app.Fragment;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
/**
|
||||
* Created by mike on 17.04.2017.
|
||||
*/
|
||||
|
||||
public class InsulinFastactingFragment extends Fragment implements FragmentBase {
|
||||
public class InsulinFastactingFragment extends Fragment {
|
||||
static InsulinFastactingPlugin insulinFastactingPlugin = new InsulinFastactingPlugin();
|
||||
|
||||
static public InsulinFastactingPlugin getPlugin() {
|
||||
return insulinFastactingPlugin;
|
||||
}
|
||||
|
||||
private Unbinder unbinder;
|
||||
@BindView(R.id.insulin_name)
|
||||
TextView insulinName;
|
||||
@BindView(R.id.insulin_comment)
|
||||
TextView insulinComment;
|
||||
@BindView(R.id.insulin_dia)
|
||||
TextView insulinDia;
|
||||
@BindView(R.id.insuling_graph)
|
||||
ActivityGraph insulinGraph;
|
||||
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.insulin_fragment, container, false);
|
||||
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
insulinName = (TextView) view.findViewById(R.id.insulin_name);
|
||||
insulinComment = (TextView) view.findViewById(R.id.insulin_comment);
|
||||
insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
|
||||
insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
|
||||
|
||||
insulinName.setText(insulinFastactingPlugin.getFriendlyName());
|
||||
insulinComment.setText(insulinFastactingPlugin.getComment());
|
||||
|
@ -50,11 +43,4 @@ public class InsulinFastactingFragment extends Fragment implements FragmentBase
|
|||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
unbinder.unbind();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,43 +5,36 @@ import android.support.v4.app.Fragment;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.InsulinFastacting.ActivityGraph;
|
||||
|
||||
/**
|
||||
* Created by mike on 17.04.2017.
|
||||
*/
|
||||
|
||||
public class InsulinFastactingProlongedFragment extends Fragment implements FragmentBase {
|
||||
public class InsulinFastactingProlongedFragment extends Fragment {
|
||||
static InsulinFastactingProlongedPlugin insulinFastactingProlongedPlugin = new InsulinFastactingProlongedPlugin();
|
||||
|
||||
static public InsulinFastactingProlongedPlugin getPlugin() {
|
||||
return insulinFastactingProlongedPlugin;
|
||||
}
|
||||
|
||||
private Unbinder unbinder;
|
||||
@BindView(R.id.insulin_name)
|
||||
TextView insulinName;
|
||||
@BindView(R.id.insulin_comment)
|
||||
TextView insulinComment;
|
||||
@BindView(R.id.insulin_dia)
|
||||
TextView insulinDia;
|
||||
@BindView(R.id.insuling_graph)
|
||||
ActivityGraph insulinGraph;
|
||||
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.insulin_fragment, container, false);
|
||||
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
insulinName = (TextView) view.findViewById(R.id.insulin_name);
|
||||
insulinComment = (TextView) view.findViewById(R.id.insulin_comment);
|
||||
insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
|
||||
insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);
|
||||
|
||||
insulinName.setText(insulinFastactingProlongedPlugin.getFriendlyName());
|
||||
insulinComment.setText(insulinFastactingProlongedPlugin.getComment());
|
||||
|
@ -51,11 +44,4 @@ public class InsulinFastactingProlongedFragment extends Fragment implements Frag
|
|||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
unbinder.unbind();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -19,11 +19,10 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.Loop.events.EventLoopSetLastRunGui;
|
||||
import info.nightscout.androidaps.plugins.Loop.events.EventLoopUpdateGui;
|
||||
|
||||
public class LoopFragment extends Fragment implements View.OnClickListener, FragmentBase {
|
||||
public class LoopFragment extends Fragment implements View.OnClickListener {
|
||||
private static Logger log = LoggerFactory.getLogger(LoopFragment.class);
|
||||
|
||||
private static LoopPlugin loopPlugin;
|
||||
|
|
|
@ -28,13 +28,12 @@ import org.slf4j.LoggerFactory;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientNewLog;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientRestart;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.events.EventNSClientUpdateGUI;
|
||||
import info.nightscout.utils.SP;
|
||||
|
||||
public class NSClientInternalFragment extends Fragment implements FragmentBase, View.OnClickListener, CompoundButton.OnCheckedChangeListener {
|
||||
public class NSClientInternalFragment extends Fragment implements View.OnClickListener, CompoundButton.OnCheckedChangeListener {
|
||||
private static Logger log = LoggerFactory.getLogger(NSClientInternalFragment.class);
|
||||
|
||||
static NSClientInternalPlugin nsClientInternalPlugin;
|
||||
|
@ -189,5 +188,4 @@ public class NSClientInternalFragment extends Fragment implements FragmentBase,
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,12 +20,11 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateGui;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateResultGui;
|
||||
import info.nightscout.utils.JSONFormatter;
|
||||
|
||||
public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener, FragmentBase {
|
||||
public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener {
|
||||
private static Logger log = LoggerFactory.getLogger(OpenAPSAMAFragment.class);
|
||||
|
||||
private static OpenAPSAMAPlugin openAPSAMAPlugin;
|
||||
|
|
|
@ -18,12 +18,11 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateGui;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSMA.events.EventOpenAPSUpdateResultGui;
|
||||
import info.nightscout.utils.JSONFormatter;
|
||||
|
||||
public class OpenAPSMAFragment extends Fragment implements View.OnClickListener, FragmentBase {
|
||||
public class OpenAPSMAFragment extends Fragment implements View.OnClickListener {
|
||||
private static Logger log = LoggerFactory.getLogger(OpenAPSMAFragment.class);
|
||||
|
||||
private static OpenAPSMAPlugin openAPSMAPlugin;
|
||||
|
|
|
@ -40,13 +40,6 @@ import java.text.DecimalFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnCheckedChanged;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnItemSelected;
|
||||
import butterknife.OnTextChanged;
|
||||
import butterknife.Unbinder;
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
|
@ -73,68 +66,37 @@ import info.nightscout.utils.SP;
|
|||
import info.nightscout.utils.SafeParse;
|
||||
import info.nightscout.utils.ToastUtils;
|
||||
|
||||
import static butterknife.OnItemSelected.Callback.NOTHING_SELECTED;
|
||||
|
||||
public class WizardDialog extends DialogFragment {
|
||||
public class WizardDialog extends DialogFragment implements OnClickListener, CompoundButton.OnCheckedChangeListener, Spinner.OnItemSelectedListener {
|
||||
private static Logger log = LoggerFactory.getLogger(WizardDialog.class);
|
||||
|
||||
@BindView(R.id.treatments_wizard_deliverButton)
|
||||
Button wizardDialogDeliverButton;
|
||||
@BindView(R.id.treatments_wizard_correctioninput)
|
||||
TextView correctionInput;
|
||||
@BindView(R.id.treatments_wizard_carbsinput)
|
||||
TextView carbsInput;
|
||||
@BindView(R.id.treatments_wizard_bginput)
|
||||
TextView bgInput;
|
||||
@BindView(R.id.treatments_wizard_bg)
|
||||
TextView bg;
|
||||
@BindView(R.id.treatments_wizard_bginsulin)
|
||||
TextView bgInsulin;
|
||||
@BindView(R.id.treatments_wizard_bgunits)
|
||||
TextView bgUnits;
|
||||
@BindView(R.id.treatments_wizard_bgcheckbox)
|
||||
CheckBox bgCheckbox;
|
||||
@BindView(R.id.treatments_wizard_carbs)
|
||||
TextView carbs;
|
||||
@BindView(R.id.treatments_wizard_carbsinsulin)
|
||||
TextView carbsInsulin;
|
||||
@BindView(R.id.treatments_wizard_bolusiobinsulin)
|
||||
TextView bolusIobInsulin;
|
||||
@BindView(R.id.treatments_wizard_basaliobinsulin)
|
||||
TextView basalIobInsulin;
|
||||
@BindView(R.id.treatments_wizard_bolusiobcheckbox)
|
||||
CheckBox bolusIobCheckbox;
|
||||
@BindView(R.id.treatments_wizard_basaliobcheckbox)
|
||||
CheckBox basalIobCheckbox;
|
||||
@BindView(R.id.treatments_wizard_correctioninsulin)
|
||||
TextView correctionInsulin;
|
||||
@BindView(R.id.treatments_wizard_total)
|
||||
TextView total;
|
||||
@BindView(R.id.treatments_wizard_totalinsulin)
|
||||
TextView totalInsulin;
|
||||
@BindView(R.id.treatments_wizard_carbtimeinput)
|
||||
EditText carbTimeEdit;
|
||||
@BindView(R.id.treatments_wizard_profile)
|
||||
Spinner profileSpinner;
|
||||
@BindView(R.id.treatments_wizard_sbcheckbox)
|
||||
CheckBox superbolusCheckbox;
|
||||
@BindView(R.id.treatments_wizard_sb)
|
||||
TextView superbolus;
|
||||
@BindView(R.id.treatments_wizard_sbinsulin)
|
||||
TextView superbolusInsulin;
|
||||
@BindView(R.id.treatments_wizard_bgtrendcheckbox)
|
||||
CheckBox bgtrendCheckbox;
|
||||
@BindView(R.id.treatments_wizard_bgtrend)
|
||||
TextView bgTrend;
|
||||
@BindView(R.id.treatments_wizard_bgtrendinsulin)
|
||||
TextView bgTrendInsulin;
|
||||
@BindView(R.id.treatments_wizard_cob_layout)
|
||||
LinearLayout cobLayout;
|
||||
@BindView(R.id.treatments_wizard_cobcheckbox)
|
||||
CheckBox cobCheckbox;
|
||||
@BindView(R.id.treatments_wizard_cob)
|
||||
TextView cob;
|
||||
@BindView(R.id.treatments_wizard_cobinsulin)
|
||||
TextView cobInsulin;
|
||||
|
||||
PlusMinusEditText editBg;
|
||||
|
@ -142,8 +104,6 @@ public class WizardDialog extends DialogFragment {
|
|||
PlusMinusEditText editCorr;
|
||||
PlusMinusEditText editCarbTime;
|
||||
|
||||
private Unbinder unbinder;
|
||||
|
||||
Integer calculatedCarbs = 0;
|
||||
Double calculatedTotalInsulin = 0d;
|
||||
JSONObject boluscalcJSON;
|
||||
|
@ -167,12 +127,6 @@ public class WizardDialog extends DialogFragment {
|
|||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
unbinder.unbind();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
@ -241,8 +195,48 @@ public class WizardDialog extends DialogFragment {
|
|||
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
|
||||
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
wizardDialogDeliverButton = (Button) view.findViewById(R.id.treatments_wizard_deliverButton);
|
||||
wizardDialogDeliverButton.setOnClickListener(this);
|
||||
|
||||
bg = (TextView) view.findViewById(R.id.treatments_wizard_bg);
|
||||
bgInsulin = (TextView) view.findViewById(R.id.treatments_wizard_bginsulin);
|
||||
bgUnits = (TextView) view.findViewById(R.id.treatments_wizard_bgunits);
|
||||
carbs = (TextView) view.findViewById(R.id.treatments_wizard_carbs);
|
||||
carbsInsulin = (TextView) view.findViewById(R.id.treatments_wizard_carbsinsulin);
|
||||
bolusIobInsulin = (TextView) view.findViewById(R.id.treatments_wizard_bolusiobinsulin);
|
||||
basalIobInsulin = (TextView) view.findViewById(R.id.treatments_wizard_basaliobinsulin);
|
||||
correctionInsulin = (TextView) view.findViewById(R.id.treatments_wizard_correctioninsulin);
|
||||
total = (TextView) view.findViewById(R.id.treatments_wizard_total);
|
||||
totalInsulin = (TextView) view.findViewById(R.id.treatments_wizard_totalinsulin);
|
||||
carbTimeEdit = (EditText) view.findViewById(R.id.treatments_wizard_carbtimeinput);
|
||||
superbolus = (TextView) view.findViewById(R.id.treatments_wizard_sb);
|
||||
superbolusInsulin = (TextView) view.findViewById(R.id.treatments_wizard_sbinsulin);
|
||||
|
||||
bgTrend = (TextView) view.findViewById(R.id.treatments_wizard_bgtrend);
|
||||
bgTrendInsulin = (TextView) view.findViewById(R.id.treatments_wizard_bgtrendinsulin);
|
||||
cobLayout = (LinearLayout) view.findViewById(R.id.treatments_wizard_cob_layout);
|
||||
cob = (TextView) view.findViewById(R.id.treatments_wizard_cob);;
|
||||
cobInsulin = (TextView) view.findViewById(R.id.treatments_wizard_cobinsulin);;
|
||||
|
||||
bgCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_bgcheckbox);
|
||||
bolusIobCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_bolusiobcheckbox);
|
||||
basalIobCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_basaliobcheckbox);
|
||||
superbolusCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_sbcheckbox);
|
||||
bgtrendCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_bgtrendcheckbox);
|
||||
cobCheckbox = (CheckBox) view.findViewById(R.id.treatments_wizard_cobcheckbox);
|
||||
bgCheckbox.setOnCheckedChangeListener(this);
|
||||
basalIobCheckbox.setOnCheckedChangeListener(this);
|
||||
bolusIobCheckbox.setOnCheckedChangeListener(this);
|
||||
superbolusCheckbox.setOnCheckedChangeListener(this);
|
||||
bgtrendCheckbox.setOnCheckedChangeListener(this);
|
||||
cobCheckbox.setOnCheckedChangeListener(this);
|
||||
|
||||
profileSpinner = (Spinner) view.findViewById(R.id.treatments_wizard_profile);
|
||||
profileSpinner.setOnItemSelectedListener(this);
|
||||
|
||||
correctionInput = (TextView) view.findViewById(R.id.treatments_wizard_correctioninput);
|
||||
carbsInput = (TextView) view.findViewById(R.id.treatments_wizard_carbsinput);
|
||||
bgInput = (TextView) view.findViewById(R.id.treatments_wizard_bginput);
|
||||
correctionInput.addTextChangedListener(textWatcher);
|
||||
carbsInput.addTextChangedListener(textWatcher);
|
||||
bgInput.addTextChangedListener(textWatcher);
|
||||
|
@ -261,26 +255,27 @@ public class WizardDialog extends DialogFragment {
|
|||
return view;
|
||||
}
|
||||
|
||||
@OnCheckedChanged({R.id.treatments_wizard_bgcheckbox, R.id.treatments_wizard_bolusiobcheckbox, R.id.treatments_wizard_basaliobcheckbox, R.id.treatments_wizard_sbcheckbox, R.id.treatments_wizard_cobcheckbox, R.id.treatments_wizard_bgtrendcheckbox})
|
||||
public void checkboxToggled(boolean isChecked) {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
calculateInsulin();
|
||||
}
|
||||
|
||||
@OnItemSelected(R.id.treatments_wizard_profile)
|
||||
public void profileSelected(int position) {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
calculateInsulin();
|
||||
wizardDialogDeliverButton.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@OnItemSelected(value = R.id.treatments_wizard_profile,
|
||||
callback = NOTHING_SELECTED)
|
||||
public void profileNotSelected() {
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
ToastUtils.showToastInUiThread(context, MainApp.sResources.getString(R.string.noprofileselected));
|
||||
wizardDialogDeliverButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@OnClick(R.id.treatments_wizard_deliverButton)
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.treatments_wizard_deliverButton:
|
||||
if (calculatedTotalInsulin > 0d || calculatedCarbs > 0d) {
|
||||
DecimalFormat formatNumber2decimalplaces = new DecimalFormat("0.00");
|
||||
String confirmMessage = getString(R.string.entertreatmentquestion);
|
||||
|
@ -358,6 +353,8 @@ public class WizardDialog extends DialogFragment {
|
|||
builder.show();
|
||||
dismiss();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void initDialog() {
|
||||
|
@ -575,4 +572,5 @@ public class WizardDialog extends DialogFragment {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ import android.widget.TextView;
|
|||
import com.crashlytics.android.answers.Answers;
|
||||
import com.crashlytics.android.answers.CustomEvent;
|
||||
import com.jjoe64.graphview.GraphView;
|
||||
import com.jjoe64.graphview.LabelFormatter;
|
||||
import com.jjoe64.graphview.Viewport;
|
||||
import com.jjoe64.graphview.series.DataPoint;
|
||||
import com.jjoe64.graphview.series.LineGraphSeries;
|
||||
import com.jjoe64.graphview.series.PointsGraphSeries;
|
||||
|
@ -1133,10 +1135,18 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
bgGraph.getSecondScale().addSeries(basalsLineSeries);
|
||||
bgGraph.getSecondScale().setMinY(0);
|
||||
bgGraph.getSecondScale().setMaxY(maxBgValue / lowLine * maxBasalValueFound * 1.2d);
|
||||
bgGraph.getGridLabelRenderer().setVerticalLabelsSecondScaleColor(ContextCompat.getColor(MainApp.instance(), R.color.background_material_dark)); // same color as backround = hide
|
||||
}
|
||||
bgGraph.getSecondScale().setLabelFormatter(new LabelFormatter() {
|
||||
@Override
|
||||
public String formatLabel(double value, boolean isValueX) {
|
||||
return "";
|
||||
}
|
||||
|
||||
//updatePumpStatus(null);
|
||||
@Override
|
||||
public void setViewport(Viewport viewport) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Notifications
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package info.nightscout.androidaps.plugins.Persistentnotification;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
/**
|
||||
* Created by adrian on 23/12/16.
|
||||
*/
|
||||
|
||||
public class PersistentNotificationFragment extends Fragment {
|
||||
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.persistentnotification;
|
||||
package info.nightscout.androidaps.plugins.Persistentnotification;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
|
@ -33,14 +33,13 @@ import org.slf4j.LoggerFactory;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
|
||||
public class CircadianPercentageProfileFragment extends Fragment implements FragmentBase {
|
||||
public class CircadianPercentageProfileFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(CircadianPercentageProfileFragment.class);
|
||||
|
||||
private static CircadianPercentageProfilePlugin circadianPercentageProfilePlugin = new CircadianPercentageProfilePlugin();
|
||||
|
|
|
@ -23,14 +23,13 @@ import java.text.DecimalFormat;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
import info.nightscout.utils.TimeListEdit;
|
||||
|
||||
public class LocalProfileFragment extends Fragment implements FragmentBase {
|
||||
public class LocalProfileFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(LocalProfileFragment.class);
|
||||
|
||||
private static LocalProfilePlugin localProfilePlugin = new LocalProfilePlugin();
|
||||
|
|
|
@ -12,11 +12,10 @@ import com.squareup.otto.Subscribe;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.ProfileNS.events.EventNSProfileUpdateGUI;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
|
||||
public class NSProfileFragment extends Fragment implements FragmentBase {
|
||||
public class NSProfileFragment extends Fragment {
|
||||
private static NSProfilePlugin nsProfilePlugin = new NSProfilePlugin();
|
||||
|
||||
public static NSProfilePlugin getPlugin() {
|
||||
|
|
|
@ -21,13 +21,12 @@ import org.slf4j.LoggerFactory;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.Careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Careportal.OptionsToShow;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
|
||||
public class SimpleProfileFragment extends Fragment implements FragmentBase {
|
||||
public class SimpleProfileFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(SimpleProfileFragment.class);
|
||||
|
||||
private static SimpleProfilePlugin simpleProfilePlugin = new SimpleProfilePlugin();
|
||||
|
|
|
@ -26,7 +26,6 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.Dialogs.ProfileViewDialog;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.History.DanaRHistoryActivity;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.History.DanaRStatsActivity;
|
||||
|
@ -35,7 +34,7 @@ import info.nightscout.utils.DateUtil;
|
|||
import info.nightscout.utils.DecimalFormatter;
|
||||
import info.nightscout.utils.SetWarnColor;
|
||||
|
||||
public class DanaRFragment extends Fragment implements FragmentBase {
|
||||
public class DanaRFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(DanaRFragment.class);
|
||||
|
||||
private static DanaRPlugin danaRPlugin;
|
||||
|
|
|
@ -26,7 +26,6 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.Dialogs.ProfileViewDialog;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaR.events.EventDanaRNewStatus;
|
||||
import info.nightscout.androidaps.plugins.PumpDanaRKorean.History.DanaRHistoryActivity;
|
||||
|
@ -35,7 +34,7 @@ import info.nightscout.utils.DateUtil;
|
|||
import info.nightscout.utils.DecimalFormatter;
|
||||
import info.nightscout.utils.SetWarnColor;
|
||||
|
||||
public class DanaRKoreanFragment extends Fragment implements FragmentBase {
|
||||
public class DanaRKoreanFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(DanaRKoreanFragment.class);
|
||||
|
||||
private static DanaRKoreanPlugin danaRKoreanPlugin = new DanaRKoreanPlugin();
|
||||
|
|
|
@ -3,14 +3,7 @@ package info.nightscout.androidaps.plugins.PumpMDI;
|
|||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
public class MDIFragment extends Fragment implements FragmentBase {
|
||||
private static Logger log = LoggerFactory.getLogger(MDIFragment.class);
|
||||
|
||||
public class MDIFragment extends Fragment {
|
||||
private static MDIPlugin mdiPlugin = new MDIPlugin();
|
||||
|
||||
public static MDIPlugin getPlugin() {
|
||||
|
|
|
@ -18,10 +18,9 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.PumpVirtual.events.EventVirtualPumpUpdateGui;
|
||||
|
||||
public class VirtualPumpFragment extends Fragment implements FragmentBase {
|
||||
public class VirtualPumpFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(VirtualPumpFragment.class);
|
||||
|
||||
private static VirtualPumpPlugin virtualPumpPlugin = new VirtualPumpPlugin();
|
||||
|
|
|
@ -3,9 +3,7 @@ package info.nightscout.androidaps.plugins.SourceGlimp;
|
|||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
public class SourceGlimpFragment extends Fragment implements FragmentBase {
|
||||
public class SourceGlimpFragment extends Fragment {
|
||||
|
||||
private static SourceGlimpPlugin sourceGlimpPlugin = new SourceGlimpPlugin();
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ package info.nightscout.androidaps.plugins.SourceMM640g;
|
|||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
public class SourceMM640gFragment extends Fragment implements FragmentBase {
|
||||
public class SourceMM640gFragment extends Fragment {
|
||||
|
||||
private static SourceMM640gPlugin sourceMM640gPlugin = new SourceMM640gPlugin();
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ package info.nightscout.androidaps.plugins.SourceNSClient;
|
|||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
public class SourceNSClientFragment extends Fragment implements FragmentBase {
|
||||
public class SourceNSClientFragment extends Fragment {
|
||||
|
||||
private static SourceNSClientPlugin sourceNSClientPlugin = new SourceNSClientPlugin();
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ package info.nightscout.androidaps.plugins.SourceXdrip;
|
|||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
public class SourceXdripFragment extends Fragment implements FragmentBase {
|
||||
public class SourceXdripFragment extends Fragment {
|
||||
|
||||
private static SourceXdripPlugin sourceXdripPlugin = new SourceXdripPlugin();
|
||||
|
||||
|
|
|
@ -26,12 +26,11 @@ import info.nightscout.androidaps.R;
|
|||
import info.nightscout.androidaps.data.IobTotal;
|
||||
import info.nightscout.androidaps.db.TempBasal;
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.utils.DateUtil;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
|
||||
|
||||
public class TempBasalsFragment extends Fragment implements FragmentBase {
|
||||
public class TempBasalsFragment extends Fragment {
|
||||
private static Logger log = LoggerFactory.getLogger(TempBasalsFragment.class);
|
||||
|
||||
private static TempBasalsPlugin tempBasalsPlugin = new TempBasalsPlugin();
|
||||
|
|
|
@ -31,10 +31,9 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.Services.Intents;
|
||||
import info.nightscout.androidaps.db.TempTarget;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.TempTargetRange.events.EventTempTargetRangeChange;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSProfile;
|
||||
import info.nightscout.androidaps.plugins.TempTargetRange.events.EventTempTargetRangeChange;
|
||||
import info.nightscout.utils.DateUtil;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
import info.nightscout.utils.ToastUtils;
|
||||
|
@ -43,7 +42,7 @@ import info.nightscout.utils.ToastUtils;
|
|||
* Created by mike on 13/01/17.
|
||||
*/
|
||||
|
||||
public class TempTargetRangeFragment extends Fragment implements View.OnClickListener, FragmentBase {
|
||||
public class TempTargetRangeFragment extends Fragment implements View.OnClickListener {
|
||||
|
||||
private static TempTargetRangePlugin tempTargetRangePlugin = new TempTargetRangePlugin();
|
||||
|
||||
|
|
|
@ -37,14 +37,13 @@ import info.nightscout.androidaps.Services.Intents;
|
|||
import info.nightscout.androidaps.data.Iob;
|
||||
import info.nightscout.androidaps.db.Treatment;
|
||||
import info.nightscout.androidaps.events.EventTreatmentChange;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
||||
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSProfile;
|
||||
import info.nightscout.utils.DateUtil;
|
||||
import info.nightscout.utils.DecimalFormatter;
|
||||
import info.nightscout.utils.ToastUtils;
|
||||
|
||||
public class TreatmentsFragment extends Fragment implements View.OnClickListener, FragmentBase {
|
||||
public class TreatmentsFragment extends Fragment implements View.OnClickListener {
|
||||
private static Logger log = LoggerFactory.getLogger(TreatmentsFragment.class);
|
||||
|
||||
private static TreatmentsPlugin treatmentsPlugin = new TreatmentsPlugin();
|
||||
|
|
|
@ -8,13 +8,12 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
/**
|
||||
* Created by adrian on 17/11/16.
|
||||
*/
|
||||
|
||||
public class WearFragment extends Fragment implements FragmentBase {
|
||||
public class WearFragment extends Fragment {
|
||||
|
||||
private static WearPlugin wearPlugin;
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.persistentnotification;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import info.nightscout.androidaps.interfaces.FragmentBase;
|
||||
|
||||
/**
|
||||
* Created by adrian on 23/12/16.
|
||||
*/
|
||||
|
||||
public class PersistentNotificationFragment extends Fragment implements FragmentBase {
|
||||
|
||||
|
||||
}
|
|
@ -192,14 +192,21 @@
|
|||
android:layout_gravity="center_horizontal"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.jjoe64.graphview.GraphView
|
||||
android:id="@+id/overview_bggraph"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dip" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="160dip"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/overview_showprediction"
|
||||
|
@ -217,7 +224,9 @@
|
|||
android:layout_alignWithParentIfMissing="false"
|
||||
android:layout_below="@+id/overview_showprediction"
|
||||
app:buttonTint="@color/cyan" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/overview_accepttemplayout"
|
||||
|
|
Loading…
Reference in a new issue