CPP small redesign
This commit is contained in:
parent
f815f7fce6
commit
4dbb20b8c5
2 changed files with 153 additions and 133 deletions
|
@ -37,6 +37,8 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
||||||
EditText percentageView;
|
EditText percentageView;
|
||||||
EditText timeshiftView;
|
EditText timeshiftView;
|
||||||
TextView profileView;
|
TextView profileView;
|
||||||
|
TextView baseprofileView;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,7 +54,7 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
||||||
percentageView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_percentage);
|
percentageView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_percentage);
|
||||||
timeshiftView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_timeshift);
|
timeshiftView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_timeshift);
|
||||||
profileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_profileview);
|
profileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_profileview);
|
||||||
|
baseprofileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_baseprofileview);
|
||||||
|
|
||||||
mgdlView.setChecked(circadianPercentageProfilePlugin.mgdl);
|
mgdlView.setChecked(circadianPercentageProfilePlugin.mgdl);
|
||||||
mmolView.setChecked(circadianPercentageProfilePlugin.mmol);
|
mmolView.setChecked(circadianPercentageProfilePlugin.mmol);
|
||||||
|
@ -125,11 +127,11 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
||||||
profileView.append("Basal: " + circadianPercentageProfilePlugin.basalString() + "\n");
|
profileView.append("Basal: " + circadianPercentageProfilePlugin.basalString() + "\n");
|
||||||
profileView.append("IC: " + circadianPercentageProfilePlugin.icString() + "\n");
|
profileView.append("IC: " + circadianPercentageProfilePlugin.icString() + "\n");
|
||||||
profileView.append("ISF: " + circadianPercentageProfilePlugin.isfString() + "\n");
|
profileView.append("ISF: " + circadianPercentageProfilePlugin.isfString() + "\n");
|
||||||
profileView.append("\n");
|
|
||||||
profileView.append("Base Profile:\n");
|
baseprofileView.setText("Base Profile:\n");
|
||||||
profileView.append("Basal: " + circadianPercentageProfilePlugin.baseBasalString() + "\n");
|
baseprofileView.append("Basal: " + circadianPercentageProfilePlugin.baseBasalString() + "\n");
|
||||||
profileView.append("IC: " + circadianPercentageProfilePlugin.baseIcString() + "\n");
|
baseprofileView.append("IC: " + circadianPercentageProfilePlugin.baseIcString() + "\n");
|
||||||
profileView.append("ISF: " + circadianPercentageProfilePlugin.baseIsfString() + "\n");
|
baseprofileView.append("ISF: " + circadianPercentageProfilePlugin.baseIsfString() + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,172 +3,190 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.CircadianPercentageProfile.CircadianPercentageProfileFragment">
|
tools:context=".plugins.CircadianPercentageProfile.CircadianPercentageProfileFragment">
|
||||||
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true">
|
android:fillViewport="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:text="Profile View"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/circadianpercentageprofile_profileview"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"/>
|
|
||||||
|
|
||||||
<TableLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="left|top">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TableRow
|
<TextView
|
||||||
|
android:id="@+id/circadianpercentageprofile_profileview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/cardColorBackground"
|
||||||
|
android:text="Profile View"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_gravity="center_horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Units:"
|
android:orientation="horizontal"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:background="@drawable/pillborder"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="%:"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/circadianpercentageprofile_percentage"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:inputType="number"
|
||||||
|
android:hint="Percentage factor by which the base profile will be multiplied."/>
|
||||||
|
|
||||||
|
|
||||||
<RadioButton
|
</LinearLayout>
|
||||||
android:id="@+id/simpleprofile_mgdl"
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_column="2"
|
android:orientation="horizontal"
|
||||||
android:text="mgdl" />
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:background="@drawable/pillborder"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
<RadioButton
|
<TextView
|
||||||
android:id="@+id/simpleprofile_mmol"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="Time-Shift:"
|
||||||
android:layout_column="3"
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
android:text="mmol" />
|
|
||||||
|
|
||||||
</TableRow>
|
<EditText
|
||||||
|
android:id="@+id/circadianpercentageprofile_timeshift"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:inputType="number"
|
||||||
|
android:hint="Time in hours by which the profile will be shifted round robin."/>
|
||||||
|
|
||||||
<TableRow
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/circadianpercentageprofile_baseprofileview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/cardColorBackground"
|
||||||
|
android:text="Profile View"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="DIA:"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
|
|
||||||
<EditText
|
<TableLayout
|
||||||
android:id="@+id/simpleprofile_dia"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_column="2"
|
|
||||||
android:inputType="numberDecimal" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="left|top">
|
||||||
|
|
||||||
<TextView
|
<TableRow
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:text="Absorption rate:"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
|
|
||||||
<EditText
|
<TextView
|
||||||
android:id="@+id/simpleprofile_car"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="100dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="Units:"
|
||||||
android:layout_column="2"
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
android:inputType="numberDecimal" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<TableRow
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
<RadioButton
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/simpleprofile_mgdl"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:text="Basal rate:"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:layout_column="2"
|
||||||
|
android:text="mgdl" />
|
||||||
|
|
||||||
<EditText
|
<RadioButton
|
||||||
android:id="@+id/simpleprofile_basalrate"
|
android:id="@+id/simpleprofile_mmol"
|
||||||
android:layout_width="100dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_column="2"
|
android:layout_column="3"
|
||||||
android:inputType="numberDecimal" />
|
android:text="mmol" />
|
||||||
</TableRow>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<TableRow
|
</TableRow>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
<TableRow
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:text="Target range:"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
|
|
||||||
<EditText
|
<TextView
|
||||||
android:id="@+id/simpleprofile_targetlow"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="100dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="DIA:"
|
||||||
android:layout_column="2"
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
android:inputType="numberDecimal" />
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/simpleprofile_targethigh"
|
android:id="@+id/simpleprofile_dia"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_column="2"
|
android:layout_column="2"
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
<TableRow
|
<TableRow
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Percentage:"
|
android:text="Absorption rate:"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/circadianpercentageprofile_percentage"
|
android:id="@+id/simpleprofile_car"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_column="2"
|
android:layout_column="2"
|
||||||
android:inputType="number" />
|
android:inputType="numberDecimal" />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
<TableRow
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
<TableRow
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:text="Time-Shift:"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
|
|
||||||
<EditText
|
<TextView
|
||||||
android:id="@+id/circadianpercentageprofile_timeshift"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="100dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="Target range:"
|
||||||
android:layout_column="2"
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
android:inputType="number" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
</TableLayout>
|
<EditText
|
||||||
|
android:id="@+id/simpleprofile_targetlow"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/simpleprofile_targethigh"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
|
||||||
|
</TableLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
Loading…
Reference in a new issue