Skip to content

Commit d72d03c

Browse files
committed
2 parents 72e226a + 854a828 commit d72d03c

File tree

6 files changed

+37
-16
lines changed

6 files changed

+37
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
xDrip+ is an unofficial and independent Android app which works as data hub and processor between many different devices.
2222

23-
It supports wireless connections to G4, G5, G6, G7, Medtrum A6, Libre via NFC and Bluetooth, 630G, 640G, 670G pumps, CareSens Air and Eversense CGM via companion apps. Bluetooth Glucose Meters such as the Contour Next One, AccuChek Guide, Verio Flex & Diamond Mini as well as devices like the Pendiq 2.0 Insulin Pen.
23+
It supports wireless connections to G6, G7, Medtrum A6, Libre via NFC and Bluetooth, 630G, 640G, 670G pumps, CareSens Air and Eversense CGM via companion apps. Bluetooth Glucose Meters such as the Contour Next One, AccuChek Guide, Verio Flex & Diamond Mini as well as devices like the Pendiq 2.0 Insulin Pen.
2424

2525
Heart-rate and step counter data is processed from Android Wear, Garmin, Fitbit and Pebble smart-watches and watch-faces for those that show glucose values and graphs.
2626

27-
On some Android Wear watches, it is possible for the G5 or G6 to talk directly to the watch so it can display values even when out of range of the phone.
27+
On some Android Wear watches, it is possible for the G6 to talk directly to the watch so it can display values even when out of range of the phone.
2828

2929
The app contains sophisticated charting, customization and data entry features as well as a predictive simulation model.
3030

app/src/main/java/com/eveningoutpost/dexdrip/AlertList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public void run() {
191191
if (!isFinishing()) {
192192
new AlertDialog.Builder(AlertList.this)
193193
.setTitle("Warning !")
194-
.setMessage("No active Low Alert exists, without this there will be no alert on low glucose! Please add or enable a low alert.")
194+
.setMessage("No low alert is active. You won’t be notified of low glucose—please add or enable one.")
195195
.setCancelable(false)
196196
.setPositiveButton(
197197
"Ok",

app/src/main/java/com/eveningoutpost/dexdrip/EditAlertActivity.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,15 +390,15 @@ private boolean verifyThreshold(double threshold, boolean allDay, int startTime,
390390
List<AlertType> highAlerts = AlertType.getAll(true);
391391

392392
if(threshold < MIN_ALERT || threshold > MAX_ALERT) {
393-
Toast.makeText(getApplicationContext(), "threshold has to be between " +unitsConvert2Disp(doMgdl, MIN_ALERT) + " and " + unitsConvert2Disp(doMgdl, MAX_ALERT),Toast.LENGTH_LONG).show();
393+
Toast.makeText(getApplicationContext(), "Threshold must be between " +unitsConvert2Disp(doMgdl, MIN_ALERT) + " and " + unitsConvert2Disp(doMgdl, MAX_ALERT) + ".", Toast.LENGTH_LONG).show();
394394
return false;
395395
}
396396
// We want to make sure that for each threashold there is only one alert. Otherwise, which file should we play.
397397
for (AlertType lowAlert : lowAlerts) {
398398
if(lowAlert.threshold == threshold && overlapping(lowAlert, allDay, startTime, endTime) && lowAlert.active) {
399399
if(uuid == null || ! uuid.equals(lowAlert.uuid)){ //new alert or not myself
400400
Toast.makeText(getApplicationContext(),
401-
"Each alert should have it's own threshold. Please choose another threshold.",Toast.LENGTH_LONG).show();
401+
"Each alert needs a unique threshold. Please choose a different one.",Toast.LENGTH_LONG).show();
402402
return false;
403403
}
404404
}
@@ -407,7 +407,7 @@ private boolean verifyThreshold(double threshold, boolean allDay, int startTime,
407407
if(highAlert.threshold == threshold && overlapping(highAlert, allDay, startTime, endTime) && highAlert.active) {
408408
if(uuid == null || ! uuid.equals(highAlert.uuid)){ //new alert or not myself
409409
Toast.makeText(getApplicationContext(),
410-
"Each alert should have it's own threshold. Please choose another threshold.",Toast.LENGTH_LONG).show();
410+
"Each alert needs a unique threshold. Please choose a different one.",Toast.LENGTH_LONG).show();
411411
return false;
412412
}
413413
}
@@ -418,7 +418,7 @@ private boolean verifyThreshold(double threshold, boolean allDay, int startTime,
418418
for (AlertType lowAlert : lowAlerts) {
419419
if(threshold < lowAlert.threshold && overlapping(lowAlert, allDay, startTime, endTime) && lowAlert.active) {
420420
Toast.makeText(getApplicationContext(),
421-
"High alert threshold has to be higher than all low alerts. Please choose another threshold.",Toast.LENGTH_LONG).show();
421+
"High alerts must be set above all low alerts. Please adjust the threshold.",Toast.LENGTH_LONG).show();
422422
return false;
423423
}
424424
}
@@ -427,7 +427,7 @@ private boolean verifyThreshold(double threshold, boolean allDay, int startTime,
427427
for (AlertType highAlert : highAlerts) {
428428
if(threshold > highAlert.threshold && overlapping(highAlert, allDay, startTime, endTime) && highAlert.active) {
429429
Toast.makeText(getApplicationContext(),
430-
"Low alert threshold has to be lower than all high alerts. Please choose another threshold.",Toast.LENGTH_LONG).show();
430+
"Low alerts must be set below all high alerts. Please adjust the threshold.",Toast.LENGTH_LONG).show();
431431
return false;
432432
}
433433
}
@@ -536,7 +536,7 @@ public void onClick(View v) {
536536
allDay = true;
537537
}
538538
if (timeStart == timeEnd && (allDay==false)) {
539-
Toast.makeText(getApplicationContext(), "start time and end time of alert can not be equal",Toast.LENGTH_LONG).show();
539+
Toast.makeText(getApplicationContext(), "Alert start and end times cannot be equal.", Toast.LENGTH_LONG).show();
540540
return;
541541
}
542542
boolean disabled = checkboxDisabled.isChecked();
@@ -592,7 +592,7 @@ public void onClick(View v) {
592592
buttonalertMp3.setOnClickListener(new View.OnClickListener() {
593593
public void onClick(View v) {
594594
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
595-
builder.setTitle("What type of Alert?")
595+
builder.setTitle("What type of sound?")
596596
.setItems(R.array.alertType, new DialogInterface.OnClickListener() {
597597
public void onClick(DialogInterface dialog, int which) {
598598
if (which == 0) {
@@ -928,7 +928,7 @@ public void testAlert() {
928928
allDay = true;
929929
}
930930
if (timeStart == timeEnd && (!allDay)) {
931-
Toast.makeText(getApplicationContext(), "start time and end time of alert can not be equal",Toast.LENGTH_LONG).show();
931+
Toast.makeText(getApplicationContext(), "Alert start and end times cannot be equal.", Toast.LENGTH_LONG).show();
932932
return;
933933
}
934934
if(!verifyThreshold(threshold, allDay, timeStart, timeEnd)) {

app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/BgGraphBuilder.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,17 @@ private double bgScale() {
271271

272272

273273
static public boolean isXLargeTablet(Context context) {
274-
return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
274+
if (Pref.getBooleanDefaultFalse("enlarge_fonts_on_large_screens")) {
275+
return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
276+
}
277+
return false;
275278
}
276279

277280
static public boolean isLargeTablet(Context context) {
278-
return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
281+
if (Pref.getBooleanDefaultFalse("enlarge_fonts_on_large_screens")) {
282+
return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;
283+
}
284+
return false;
279285
}
280286

281287
public static double mmolConvert(double mgdl) {

app/src/main/res/values/strings.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@
250250
<string name="pref_was_greater_than_max">%1$s was set to a value greater than maximum allowed. It has been changed to maximum.</string>
251251
<string name="setting_pref_to_min">Set to min</string>
252252
<string name="pref_was_less_than_min">%1$s was set to a value less than minimum allowed. It has been changed to minimum.</string>
253-
<string name="extrapolate_data_to_try_to_predict_lows">Extrapolate data to try to predict lows</string>
254-
<string name="alarm_at_forecasted_low_mins">Alarm at Forecasted Low mins</string>
253+
<string name="extrapolate_data_to_try_to_predict_lows">Considering the current value and trend, calculate what the next few readings will be if the trend persists (extrapolate). This ignores insulin or carbs on board.</string>
254+
<string name="alarm_at_forecasted_low_mins">Time threshold [min]</string>
255255
<string name="title_forecast_low_threshold">Threshold</string>
256256
<string name="other_xdrip_plus_alerts">Other xDrip+ alerts</string>
257257
<string name="xdrip_plus_display_settings">xDrip+ Display Settings</string>
@@ -339,6 +339,10 @@
339339
<string name="pebble_and_android_wear_options">Options for different Watches</string>
340340
<string name="customize_colours">Customize Colors</string>
341341
<string name="xdrip_plus_color_settings">xDrip+ Color Settings</string>
342+
<string name="summary_font_settings">Customize Fonts</string>
343+
<string name="title_font_settings">Font Settings</string>
344+
<string name="summary_enlarge_fonts_on_large_screens">Automatically enlarge the font size on large screens, such as tablets</string>
345+
<string name="title_enlarge_fonts_on_large_screens">Enlarge fonts on larger displays</string>
342346
<string name="glucose_values_and_lines">Glucose Values and Lines</string>
343347
<string name="high_glucose_values">High Glucose Values</string>
344348
<string name="in_range_glucose_values">In-range Glucose Values</string>
@@ -454,7 +458,7 @@
454458
<string name="persistent_high_sound">Alert Sound</string>
455459
<string name="forecast_lows">Forecast Lows</string>
456460
<string name="raise_alarm_on_forecast_low">Raise alarm on Forecast Low</string>
457-
<string name="notify_when_predicted_low_time_reaches_threshold">Notify when predicted low time reaches threshold</string>
461+
<string name="notify_when_predicted_low_time_reaches_threshold">Notify when forecasted low time reaches time threshold</string>
458462
<string name="predicted_low_sound">Alert Sound</string>
459463
<string name="choose_sound_used_for_predicted_low_alarm">Choose the sound used for the alarm.</string>
460464
<string name="notify_when_parakeet_device_stops_checking_in">Notify when Parakeet device stops checking in</string>

app/src/main/res/xml/xdrip_plus_prefs.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,17 @@
309309
</PreferenceCategory>
310310
</PreferenceScreen>
311311

312+
<PreferenceScreen
313+
android:key="xdrip_font_settings"
314+
android:summary="@string/summary_font_settings"
315+
android:title="@string/title_font_settings">
316+
<CheckBoxPreference
317+
android:defaultValue="true"
318+
android:key="enlarge_fonts_on_large_screens"
319+
android:summary="@string/summary_enlarge_fonts_on_large_screens"
320+
android:title="@string/title_enlarge_fonts_on_large_screens" />
321+
</PreferenceScreen>
322+
312323
<SwitchPreference
313324
android:defaultValue="false"
314325
android:key="force_english"

0 commit comments

Comments
 (0)