Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/NightscoutFoundation/xDrip
Browse files Browse the repository at this point in the history
…into jamorhamvoice
  • Loading branch information
jamorham committed Feb 20, 2019
2 parents 0598c4c + 30569a8 commit 3a99dd1
Show file tree
Hide file tree
Showing 34 changed files with 511 additions and 265 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<activity
android:name=".NoteSearch"
android:configChanges="orientation|screenSize"
android:label="Note Search" />
android:label="@string/note_search" />

<receiver android:name=".AutoStart">
<intent-filter>
Expand Down
26 changes: 10 additions & 16 deletions app/src/main/java/com/eveningoutpost/dexdrip/NoteSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ public class NoteSearch extends ListActivityWithMenu {
private Cursor dbCursor;

private static final String TAG = "NoteSearch";
//Strings TODO: move to strings.xml (omitted during dev to avoid merge conflicts)
private static final String LOAD_MORE = "load more";
private static final String SEARCHING = "searching...";
private static final String COLLECTING = "collecting...";
private static final String CARBS = "carbs";
private static final String INSULIN = "insulin";
private static final String NOTHING = "nothing found";

private long last_keypress_time = -1;
private static final long KEY_PAUSE = 500; // latency we use to initiate searches

Expand Down Expand Up @@ -170,7 +164,7 @@ private void doAll(boolean from_interactive) {

if (from_interactive) hideKeyboard();
resultListAdapter.clear();
if (from_interactive) JoH.static_toast_short(COLLECTING);
if (from_interactive) JoH.static_toast_short(getString(R.string.collecting));

SQLiteDatabase db = Cache.openDatabase();

Expand All @@ -195,12 +189,12 @@ private void doAll(boolean from_interactive) {
}

if (i == 0){
if (from_interactive) JoH.static_toast_short(NOTHING);
if (from_interactive) JoH.static_toast_short(getString(R.string.nothing_found));
}
if (dbCursor.isAfterLast()) {
dbCursor.close();
} else {
SearchResult result = new SearchResult(0, LOAD_MORE, 0, 0, null);
SearchResult result = new SearchResult(0, getString(R.string.load_more), 0, 0, null);
result.setLoadMoreActionFlag();
resultListAdapter.addSingle(result);
}
Expand All @@ -225,7 +219,7 @@ private void doSearch(boolean from_interactive) {


resultListAdapter.clear();
if (from_interactive) JoH.static_toast_short(SEARCHING);
if (from_interactive) JoH.static_toast_short(getString(R.string.searching));

SQLiteDatabase db = Cache.openDatabase();

Expand Down Expand Up @@ -254,12 +248,12 @@ private void doSearch(boolean from_interactive) {
}

if (i == 0 && from_interactive){
JoH.static_toast_short(NOTHING);
JoH.static_toast_short(getString(R.string.nothing_found));
}
if (dbCursor.isAfterLast()) {
dbCursor.close();
} else {
SearchResult result = new SearchResult(0, LOAD_MORE, 0, 0, null);
SearchResult result = new SearchResult(0, getString(R.string.load_more), 0, 0, null);
result.setLoadMoreActionFlag();
resultListAdapter.addSingle(result);
}
Expand Down Expand Up @@ -397,7 +391,7 @@ private void loadMore() {
if (dbCursor.isAfterLast()) {
dbCursor.close();
} else {
SearchResult result = new SearchResult(0, LOAD_MORE, 0, 0, null);
SearchResult result = new SearchResult(0, getString(R.string.load_more), 0, 0, null);
result.setLoadMoreActionFlag();
resultListAdapter.addSingle(result);
}
Expand Down Expand Up @@ -503,10 +497,10 @@ public SearchResult(long timestamp, String note, double carbs, double insulin, S
this.uuid = uuid;
this.otherTreatments = "";
if (carbs != 0) {
otherTreatments += CARBS + ": " + carbs;
otherTreatments += getString(R.string.carbs) + ": " + carbs;
}
if (insulin != 0) {
otherTreatments += " " + INSULIN + ": " + insulin;
otherTreatments += " " + getString(R.string.insulin) + ": " + insulin;
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_agreement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:text="Important Warning!"
android:text="@string/important_warning"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@android:color/holo_red_light"
android:textStyle="bold" />
Expand Down Expand Up @@ -58,7 +58,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:text="I AGREE" />
android:text="@string/i_agree" />

</LinearLayout>
</ScrollView>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_calibration_check_in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.eveningoutpost.dexdrip.CalibrationCheckInActivity">

<TextView android:text="Plug in your dexcom reciever then hit this button and cross your fingers!" android:layout_width="wrap_content"
<TextView android:text="@string/plug_in_your_dexcom_reciever" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/check_in_text" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Check in Dexcom calibrations"
android:text="@string/check_in_dexcom_calibrations"
android:id="@+id/check_in_calibrations"
android:layout_centerHorizontal="true"
android:layout_marginTop="53dp" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_calibration_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/CalibrationGraphHeader"
android:text="calibration graph (no calibration)"
android:text="@string/calibration_graph_no_calibration"
android:layout_centerHorizontal="true" />

<TextView
Expand All @@ -41,7 +41,7 @@
android:layout_below="@+id/CalibrationGraphHeader"
android:layout_centerHorizontal="true"
android:id="@+id/calibrationPluginHeader"
android:text="calibration plugin header"
android:text="@string/calibration_plugin_header"
android:textColor="@color/yellow100" />
</RelativeLayout>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_display_qrcode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
android:layout_marginTop="28dp"
android:layout_weight="1"
android:onClick="desertSyncSettings"
android:text="Set up Desert Sync follower" />
android:text="@string/set_up_desert_sync_follower" />

<Button
android:id="@+id/button"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_errors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Auto refresh"
android:text="@string/auto_refresh"
android:id="@+id/autorefresh"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_event_log.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="@{(v) -> viewModel.scrollToTop()}"
android:text="Top"
android:text="@string/top"
app:invisibleIfFalse="@{viewModel.showScrollToTop}" />

</LinearLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
android:gravity="left|top"
android:paddingEnd="10dp"
android:paddingStart="10dp"
android:text="Alerts"
android:text="@string/alerts"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#C30909" />

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_mtp_configure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:id="@+id/textView26"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Please connect your device via USB OTG cable."
android:text="@string/connect_device_usb_otg"
android:layout_marginBottom="20dp"
android:textAppearance="@style/CustomTitle"
android:textColor="@color/yellow100" />
Expand All @@ -42,7 +42,7 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Connection Status:"
android:text="@string/connection_status"
android:textAlignment="center"

android:textSize="18sp"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_new_sensor_location.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:text="In the future xDrip would like to send anonymous sensor data to the developers to improve the calibration algorithm... If you decide to opt-in, you will be asked to confirm before each data transfer. Data will never be sent without your permission. To help us understand and fine-tune the calibration we would like to know where this sensor has been placed. Press the back button to cancel."
android:text="@string/description_sensor_location"
android:textSize="15sp"/>


Expand Down Expand Up @@ -69,7 +69,7 @@
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save sensor location"
android:text="@string/save_sensor_location"
android:id="@+id/saveSensorLocation"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
Expand All @@ -78,7 +78,7 @@
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="cancel"
android:text="@string/cancel"
android:id="@+id/saveSensorLocationCancel"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_notesearch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:id="@+id/searchTextField"
android:textSize="18sp"
android:maxLines="1"
android:hint="search phrase"
android:hint="@string/search_phrase"
android:inputType="textAutoComplete"
android:imeOptions="actionSearch"
android:singleLine="true"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_start_new_sensor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Do not hit start sensor unless the sensor is already embedded and the transmitter is connected.\n\n"
android:text="@string/do_not_hit_start_long"
android:id="@+id/textView"
android:layout_above="@+id/startNewSensor"
android:layout_toStartOf="@+id/startNewSensor"
Expand All @@ -39,7 +39,7 @@
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start Sensor"
android:text="@string/start_sensor"
android:id="@+id/startNewSensor"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/activity_system_status.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
android:id="@+id/textViewLabelVersionName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Version: "
android:text="@string/version"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
Expand Down Expand Up @@ -87,7 +87,7 @@
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bluetooth Device: "
android:text="@string/bluetooth_device"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
Expand All @@ -112,7 +112,7 @@
android:layout_gravity="center_vertical"
android:paddingTop="10dp"

android:text="@string/connection_status"
android:text="@string/connection_status_long"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
Expand All @@ -134,7 +134,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sensor Start: "
android:text="@string/sensor_start"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
Expand All @@ -156,7 +156,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Transmitter Battery: "
android:text="@string/transmitter_battery_status"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Use internal downloader"
android:text="@string/use_internal_downloader"
android:id="@+id/internaldownloadercheckBox"
android:layout_gravity="center_horizontal"
android:checked="true"
Expand All @@ -107,7 +107,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="progress"
android:text="@string/progress"
android:id="@+id/progresstext"
android:layout_marginTop="10dp"
android:layout_alignBottom="@+id/progressBar"
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/activity_usb_connected.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.eveningoutpost.dexdrip.UsbConnectedActivity">

<TextView android:text="Usb Device was not recognized" android:layout_width="wrap_content"
<TextView
android:text="@string/usb_device_was_not_recognized"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

</RelativeLayout>
10 changes: 5 additions & 5 deletions app/src/main/res/layout/dialog_invite_follower.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Followers Name:"
android:text="@string/followers_name"
android:labelFor="@+id/followerNameField"/>
<EditText
android:layout_width="0dp"
Expand All @@ -28,7 +28,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Your display name:"
android:text="@string/your_display_name"
android:labelFor="@+id/followerDisplayNameField"/>
<EditText
android:layout_width="0dp"
Expand All @@ -43,7 +43,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Followers Email:"
android:text="@string/followers_email"
android:labelFor="@+id/followerEmailField"/>
<EditText
android:layout_width="0dp"
Expand All @@ -59,13 +59,13 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Cancel"
android:text="@string/cancel"
android:id="@+id/cancelButton"/>
<Button
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Send Invite"
android:text="@string/send_invite"
android:id="@+id/saveButton"/>
</LinearLayout>
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_follower.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Delete"
android:text="@string/delete"
android:id="@+id/deleteFollower"
android:gravity="center_vertical|center_horizontal"
android:layout_gravity="center"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/prefs_example_chart_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
style="@android:style/TextAppearance.DeviceDefault.SearchResult.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title" />
android:text="@string/title" />

<TextView
android:id="@android:id/summary"
style="@android:style/TextAppearance.DeviceDefault.SearchResult.Subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Summary" />
android:text="@string/summary" />

<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/example_linechart"
Expand Down
Loading

0 comments on commit 3a99dd1

Please sign in to comment.