CPP cleanup and i18n

This commit is contained in:
AdrianLxM 2016-11-14 18:11:26 +01:00
parent 74ea6c4011
commit 513b2966c9
6 changed files with 148 additions and 132 deletions

View file

@ -65,12 +65,12 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View layout = inflater.inflate(R.layout.circadianpercentageprofile_fragment, container, false);
diaView = (EditText) layout.findViewById(R.id.simpleprofile_dia);
mgdlView = (RadioButton) layout.findViewById(R.id.simpleprofile_mgdl);
mmolView = (RadioButton) layout.findViewById(R.id.simpleprofile_mmol);
carView = (EditText) layout.findViewById(R.id.simpleprofile_car);
targetlowView = (EditText) layout.findViewById(R.id.simpleprofile_targetlow);
targethighView = (EditText) layout.findViewById(R.id.simpleprofile_targethigh);
diaView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_dia);
mgdlView = (RadioButton) layout.findViewById(R.id.circadianpercentageprofile_mgdl);
mmolView = (RadioButton) layout.findViewById(R.id.circadianpercentageprofile_mmol);
carView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_car);
targetlowView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_targetlow);
targethighView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_targethigh);
percentageView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_percentage);
timeshiftView = (EditText) layout.findViewById(R.id.circadianpercentageprofile_timeshift);
profileView = (TextView) layout.findViewById(R.id.circadianpercentageprofile_profileview);
@ -133,7 +133,7 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
@Override
public void onFocusChange(View view, boolean b) {
if(b)
ToastUtils.showToastInUiThread(getContext(), "Time in hours by which the profile will be shifted round robin.");
ToastUtils.showToastInUiThread(getContext(), getString(R.string.timeshift_hint));
}
});
@ -142,7 +142,7 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
@Override
public void onFocusChange(View view, boolean b) {
if(b)
ToastUtils.showToastInUiThread(getContext(), "Percentage factor by which the base profile will be multiplied.");
ToastUtils.showToastInUiThread(getContext(), getString(R.string.percentagefactor_hint));
}
});
@ -169,24 +169,24 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
basaleditIcon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BasalEditDialog basalEditDialog = new BasalEditDialog(getPlugin().basebasal, "Edit Base-Basal:");
basalEditDialog.show(getFragmentManager(), "Edit Basal");
BasalEditDialog basalEditDialog = new BasalEditDialog(getPlugin().basebasal, getString(R.string.edit_base_basal));
basalEditDialog.show(getFragmentManager(), getString(R.string.edit_base_basal));
}
});
isfeditIcon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BasalEditDialog basalEditDialog = new BasalEditDialog(getPlugin().baseisf, "Edit Base-ISF:");
basalEditDialog.show(getFragmentManager(), "Edit ISF");
BasalEditDialog basalEditDialog = new BasalEditDialog(getPlugin().baseisf, getString(R.string.edit_base_isf));
basalEditDialog.show(getFragmentManager(), getString(R.string.edit_base_isf));
}
});
iceditIcon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BasalEditDialog basalEditDialog = new BasalEditDialog(getPlugin().baseic, "Edit Base-IC:");
basalEditDialog.show(getFragmentManager(), "Edit IC");
BasalEditDialog basalEditDialog = new BasalEditDialog(getPlugin().baseic, getString(R.string.edit_base_ic));
basalEditDialog.show(getFragmentManager(), getString(R.string.edit_base_ic));
}
});
@ -234,16 +234,23 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
private void updateProfileInfo() {
StringBuilder sb = new StringBuilder();
sb.append("<h3>");
sb.append("Active Profile:");
sb.append(getString(R.string.nsprofileview_activeprofile_label));
sb.append("</h3>");
sb.append("<h4>Basal:</h4> " + circadianPercentageProfilePlugin.basalString());
sb.append("<h4>IC:</h4> " + circadianPercentageProfilePlugin.icString());
sb.append("<h4>ISF:</h4> " + circadianPercentageProfilePlugin.isfString());
sb.append("<h4>");
sb.append(getString(R.string.nsprofileview_basal_label));
sb.append("</h4> " + circadianPercentageProfilePlugin.basalString());
sb.append("<h4>");
sb.append(getString(R.string.nsprofileview_ic_label));
sb.append("</h4> " + circadianPercentageProfilePlugin.icString());
sb.append("<h4>");
sb.append(getString(R.string.nsprofileview_isf_label));
sb.append("</h4> " + circadianPercentageProfilePlugin.isfString());
profileView.setText(Html.fromHtml(sb.toString()));
baseprofileBasal.setText(Html.fromHtml("<h3>Base Profile:</h3><h4>Basal: </h4>" + circadianPercentageProfilePlugin.baseBasalString()));
baseprofileIC.setText(Html.fromHtml("<h4>IC: </h4>" + circadianPercentageProfilePlugin.baseIcString()));
baseprofileISF.setText(Html.fromHtml("<h4>ISF: </h4>" + circadianPercentageProfilePlugin.baseIsfString()));
baseprofileBasal.setText(Html.fromHtml("<h3>" + getString(R.string.base_profile_label) + "</h3>" +
"<h4>" + getString(R.string.nsprofileview_basal_label) + "</h4>" + circadianPercentageProfilePlugin.baseBasalString()));
baseprofileIC.setText(Html.fromHtml("<h4>" + getString(R.string.nsprofileview_ic_label) + "</h4>" + circadianPercentageProfilePlugin.baseIcString()));
baseprofileISF.setText(Html.fromHtml("<h4>" + getString(R.string.nsprofileview_isf_label) + "</h4>" + circadianPercentageProfilePlugin.baseIsfString()));
}
private class BasalEditDialog extends DialogFragment{
@ -307,7 +314,6 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
}
});
return view;
}

View file

@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.Config;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.ProfileInterface;
import info.nightscout.client.data.NSProfile;
@ -59,9 +60,7 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
@Override
public String getName() {
// TODO Adrian: stringify! (omitted to prevent merge conflicts)
return "CPP";
//return MainApp.instance().getString(R.string.simpleprofile);
return MainApp.instance().getString(R.string.circadian_percentage_profile);
}
@Override
@ -89,7 +88,7 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
this.fragmentVisible = fragmentVisible;
}
public void storeSettings() {
void storeSettings() {
if (Config.logPrefsChange)
log.debug("Storing settings");
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
@ -100,11 +99,11 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
editor.putString(SETTINGS_PREFIX + "car", car.toString());
editor.putString(SETTINGS_PREFIX + "targetlow", targetLow.toString());
editor.putString(SETTINGS_PREFIX + "targethigh", targetHigh.toString());
editor.putString(SETTINGS_PREFIX + "timeshift", timeshift+"");
editor.putString(SETTINGS_PREFIX + "percentage", percentage+"");
editor.putString(SETTINGS_PREFIX + "timeshift", timeshift + "");
editor.putString(SETTINGS_PREFIX + "percentage", percentage + "");
for (int i = 0; i<24; i++) {
for (int i = 0; i < 24; i++) {
editor.putString(SETTINGS_PREFIX + "basebasal" + i, DecimalFormatter.to2Decimal(basebasal[i]));
editor.putString(SETTINGS_PREFIX + "baseisf" + i, DecimalFormatter.to2Decimal(baseisf[i]));
editor.putString(SETTINGS_PREFIX + "baseic" + i, DecimalFormatter.to2Decimal(baseic[i]));
@ -113,12 +112,12 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
createConvertedProfile();
}
private void loadSettings() {
void loadSettings() {
if (Config.logPrefsChange)
log.debug("Loading stored settings");
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
if (settings.contains(SETTINGS_PREFIX+ "mgdl"))
if (settings.contains(SETTINGS_PREFIX + "mgdl"))
try {
mgdl = settings.getBoolean(SETTINGS_PREFIX + "mgdl", true);
} catch (Exception e) {
@ -176,7 +175,7 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
}
else timeshift = 0;
for (int i = 0; i<24; i++){
for (int i = 0; i < 24; i++) {
try {
basebasal[i] = SafeParse.stringToDouble(settings.getString(SETTINGS_PREFIX + "basebasal" + i, DecimalFormatter.to2Decimal(basebasal[i])));
} catch (Exception e) {
@ -197,7 +196,8 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
createConvertedProfile();
}
void createConvertedProfile() {
private void createConvertedProfile() {
JSONObject json = new JSONObject();
JSONObject store = new JSONObject();
JSONObject profile = new JSONObject();
@ -220,25 +220,25 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
json.put("store", store);
profile.put("dia", dia);
int offset = -(timeshift%24) + 24;
int offset = -(timeshift % 24) + 24;
JSONArray icArray = new JSONArray();
for (int i = 0; i<24; i++){
icArray.put(new JSONObject().put("timeAsSeconds", i*60*60).put("value", baseic[(offset+i)%24]*100d/percentage));
for (int i = 0; i < 24; i++) {
icArray.put(new JSONObject().put("timeAsSeconds", i * 60 * 60).put("value", baseic[(offset + i) % 24] * 100d / percentage));
}
profile.put("carbratio", icArray);
profile.put("carbs_hr", car);
JSONArray isfArray = new JSONArray();
for (int i = 0; i<24; i++){
isfArray.put(new JSONObject().put("timeAsSeconds", i*60*60).put("value", baseisf[(offset+i)%24]*100d/percentage));
for (int i = 0; i < 24; i++) {
isfArray.put(new JSONObject().put("timeAsSeconds", i * 60 * 60).put("value", baseisf[(offset + i) % 24] * 100d / percentage));
}
profile.put("sens", isfArray);
JSONArray basalArray = new JSONArray();
for (int i = 0; i<24; i++){
basalArray.put(new JSONObject().put("timeAsSeconds", i*60*60).put("value", basebasal[(offset+i)%24]*percentage/100d));
for (int i = 0; i < 24; i++) {
basalArray.put(new JSONObject().put("timeAsSeconds", i * 60 * 60).put("value", basebasal[(offset + i) % 24] * percentage / 100d));
}
profile.put("basal", basalArray);
@ -258,41 +258,47 @@ public class CircadianPercentageProfilePlugin implements PluginBase, ProfileInte
return convertedProfile;
}
public String basalString() {
String basalString() {
return profileString(basebasal, timeshift, percentage, true);
}
public String icString() {
String icString() {
return profileString(baseic, timeshift, percentage, false);
}
public String isfString() {
String isfString() {
return profileString(baseisf, timeshift, percentage, false);
}
public String baseIcString() {
String baseIcString() {
return profileString(baseic, 0, 100, false);
}
public String baseIsfString() {
String baseIsfString() {
return profileString(baseisf, 0, 100, false);
}
public String baseBasalString() {
return profileString(basebasal, 0, 100, true);
}
String baseBasalString() {return profileString(basebasal, 0, 100, true);}
private static String profileString(double[] values, int timeshift, int percentage, boolean inc){
timeshift = -(timeshift%24) + 24;
private static String profileString(double[] values, int timeshift, int percentage, boolean inc) {
timeshift = -(timeshift % 24) + 24;
StringBuilder sb = new StringBuilder();
sb.append("<b>"); sb.append(0); sb.append("h: "); sb.append("</b>");
sb.append(DecimalFormatter.to2Decimal(values[(timeshift+0)%24]*(inc?percentage/100d:100d/percentage)));
double prevVal = values[(timeshift+0)%24];
sb.append("<b>");
sb.append(0);
sb.append("h: ");
sb.append("</b>");
sb.append(DecimalFormatter.to2Decimal(values[(timeshift + 0) % 24] * (inc ? percentage / 100d : 100d / percentage)));
double prevVal = values[(timeshift + 0) % 24];
for (int i = 1; i < 24; i++) {
if(prevVal != values[(timeshift+i)%24]){
sb.append(", ");sb.append("<b>"); sb.append(i); sb.append("h: ");sb.append("</b>");
sb.append(DecimalFormatter.to2Decimal(values[(timeshift+i)%24]*(inc?percentage/100d:100d/percentage)));
prevVal = values[(timeshift+i)%24];
if (prevVal != values[(timeshift + i) % 24]) {
sb.append(", ");
sb.append("<b>");
sb.append(i);
sb.append("h: ");
sb.append("</b>");
sb.append(DecimalFormatter.to2Decimal(values[(timeshift + i) % 24] * (inc ? percentage / 100d : 100d / percentage)));
prevVal = values[(timeshift + i) % 24];
}
}
return sb.toString();

View file

@ -6,7 +6,6 @@
android:orientation="vertical"
android:padding="10dp">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -20,8 +19,6 @@
<!-- Insert elements programmatically -->
</LinearLayout>
</ScrollView>
<View
@ -33,12 +30,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal"
android:padding="10dp"
android:gravity="center_horizontal"
android:layout_gravity="center_horizontal">
android:orientation="horizontal"
android:padding="10dp">
<Button
android:id="@+id/cancel_action"
@ -47,7 +44,7 @@
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:padding="10dp"
android:text="CANCEL"
android:text="@string/cancel"
android:textSize="20sp" />
<Button
android:id="@+id/ok_button"
@ -56,11 +53,9 @@
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:padding="10dp"
android:text="OK"
android:text="@string/ok"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>

View file

@ -19,39 +19,37 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="6dp"
android:padding="6dp"
android:background="@color/cardColorBackground"
android:text="Profile View"
android:padding="6dp"
android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal">
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
android:background="@drawable/pillborder"
android:orientation="horizontal"
android:padding="5dp">
<ImageView
android:id="@+id/circadianpercentageprofile_percentageicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:src="@mipmap/ic_percentage"/>
android:src="@mipmap/ic_percentage"
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."/>
android:hint="@string/percentagefactor_hint"
android:inputType="number"/>
</LinearLayout>
@ -59,25 +57,24 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
android:background="@drawable/pillborder"
android:orientation="horizontal"
android:padding="5dp">
<ImageView
android:id="@+id/circadianpercentageprofile_timeicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:src="@mipmap/ic_time"/>
android:src="@mipmap/ic_time"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<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."/>
android:hint="@string/timeshift_hint"
android:inputType="number"/>
</LinearLayout>
</LinearLayout>
@ -87,101 +84,101 @@
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="SEND TO PUMP"
android:layout_gravity="center_horizontal"
android:text="@string/send_to_pump"
android:textColor="@color/colorProfileSwitchButton" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="6dp"
android:padding="6dp"
android:background="@color/cardColorBackground"
android:orientation="vertical"
android:padding="6dp"
android:textAppearance="?android:attr/textAppearanceSmall">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground"
android:orientation="horizontal"
android:textAppearance="?android:attr/textAppearanceSmall">
<TextView
android:id="@+id/circadianpercentageprofile_baseprofilebasal"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<ImageView
android:id="@+id/circadianpercentageprofile_basaledit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_edit"
android:layout_gravity="center_vertical"
android:layout_weight="0"
android:layout_gravity="center_vertical"/>
android:src="@mipmap/ic_edit"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"
android:paddingTop="5dp">
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAppearance="?android:attr/textAppearanceSmall">
<TextView
android:id="@+id/circadianpercentageprofile_baseprofileic"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<ImageView
android:id="@+id/circadianpercentageprofile_icedit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_edit"
android:layout_gravity="center_vertical"
android:layout_weight="0"
android:layout_gravity="center_vertical"/>
android:src="@mipmap/ic_edit"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"
android:paddingTop="5dp">
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAppearance="?android:attr/textAppearanceSmall">
<TextView
android:id="@+id/circadianpercentageprofile_baseprofileisf"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_weight="1"/>
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/cardColorBackground"
android:textAppearance="?android:attr/textAppearanceSmall"/>
<ImageView
android:id="@+id/circadianpercentageprofile_isfedit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_edit"
android:layout_gravity="center_vertical"
android:layout_weight="0"
android:layout_gravity="center_vertical"/>
android:src="@mipmap/ic_edit"/>
</LinearLayout>
@ -203,23 +200,23 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Units:"
android:text="@string/units"
android:textAppearance="?android:attr/textAppearanceMedium" />
<RadioButton
android:id="@+id/simpleprofile_mgdl"
android:id="@+id/circadianpercentageprofile_mgdl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="2"
android:text="mgdl" />
android:text="@string/mgdl" />
<RadioButton
android:id="@+id/simpleprofile_mmol"
android:id="@+id/circadianpercentageprofile_mmol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="3"
android:text="mmol" />
android:text="@string/mmol" />
</TableRow>
@ -230,11 +227,11 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="DIA:"
android:text="@string/dia"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/simpleprofile_dia"
android:id="@+id/circadianpercentageprofile_dia"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_column="2"
@ -248,11 +245,11 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Absorption rate:"
android:text="@string/absorption_rate"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/simpleprofile_car"
android:id="@+id/circadianpercentageprofile_car"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_column="2"
@ -266,25 +263,23 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Target range:"
android:text="@string/target_range"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/simpleprofile_targetlow"
android:id="@+id/circadianpercentageprofile_targetlow"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_column="2"
android:inputType="numberDecimal" />
<EditText
android:id="@+id/simpleprofile_targethigh"
android:id="@+id/circadianpercentageprofile_targethigh"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_column="2"
android:inputType="numberDecimal" />
</TableRow>
</TableLayout>
</LinearLayout>
</ScrollView>

View file

@ -2,10 +2,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cardColorBackground"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:gravity="center_horizontal">
android:textAppearance="?android:attr/textAppearanceSmall">
<TextView
android:id="@+id/basal_time_elem"
@ -18,14 +18,14 @@
android:id="@+id/basal_edittext_elem"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:layout_marginLeft="15dp"/>
android:layout_marginLeft="15dp"
android:inputType="numberDecimal"/>
<ImageView
android:id="@+id/basal_copyprev_elem"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@mipmap/ic_copyprev"
android:layout_marginLeft="15dp"/>
android:layout_marginLeft="15dp"
android:src="@mipmap/ic_copyprev"/>
</LinearLayout>

View file

@ -347,4 +347,18 @@
<string name="button1">Button 1</string>
<string name="button2">Button 2</string>
<string name="button3">Button 3</string>
<string name="percentagefactor_hint">Percentage factor by which the base profile will be multiplied.</string>
<string name="timeshift_hint">Time in hours by which the profile will be shifted round robin.</string>
<string name="send_to_pump">SEND TO PUMP</string>
<string name="units">Units:</string>
<string name="mgdl">mg/dl</string>
<string name="mmol">mmol/l</string>
<string name="dia">DIA:</string>
<string name="absorption_rate">Absorption rate:</string>
<string name="target_range">Target range:</string>
<string name="edit_base_basal">Edit Base-Basal:</string>
<string name="edit_base_isf">Edit Base-ISF:</string>
<string name="edit_base_ic">Edit Base-IC:</string>
<string name="base_profile_label">Base Profile:</string>
<string name="circadian_percentage_profile">CircadianPercentageProfile</string>
</resources>