Skip to content

Commit

Permalink
Added info about the icon that displays heart rate reliability.
Browse files Browse the repository at this point in the history
  • Loading branch information
Warnicke committed May 17, 2019
1 parent 57ead6a commit 293876e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId 'com.chalmers.respiradar'
minSdkVersion 23
targetSdkVersion 28
versionCode 6
versionName '1.3.0'
versionCode 8
versionName '1.3.2'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
20 changes: 15 additions & 5 deletions app/src/main/java/com/chalmers/respiradar/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -683,35 +683,45 @@ public void onReceive(Context context, Intent intent) {
}
heartRateReliability = split[2];
switch (split[2]) { // determine the reliability of the measured heart rate
case "Outstanding":
case "ExceptionalHigh":
heartRateReliability = "Exceptional High";
heartButton.setImageResource(R.drawable.heart_blue);
if (!heartButton.isEnabled()) {
heartButton.setEnabled(true);
heartButton.setVisibility(View.VISIBLE);
}
break;
case "Perfect":
case "VeryHigh":
heartRateReliability = "Very High";
heartButton.setImageResource(R.drawable.heart_green);
if (!heartButton.isEnabled()) {
heartButton.setEnabled(true);
heartButton.setVisibility(View.VISIBLE);
}
break;
case "Good":
case "High":
heartButton.setImageResource(R.drawable.heart_red);
if (!heartButton.isEnabled()) {
heartButton.setEnabled(true);
heartButton.setVisibility(View.VISIBLE);
}
break;
case "Doubtful":
case "Medium":
heartButton.setImageResource(R.drawable.heart_red);
if (!heartButton.isEnabled()) {
heartButton.setEnabled(true);
heartButton.setVisibility(View.VISIBLE);
}
break;
case "Low":
heartButton.setImageResource(R.drawable.heart_gray);
if (!heartButton.isEnabled()) {
heartButton.setEnabled(true);
heartButton.setVisibility(View.VISIBLE);
}
break;
case "Bad":
case "VeryLow":
heartRateReliability = "Very Low";
heartButton.setImageResource(R.drawable.heart_dark_gray);
if (!heartButton.isEnabled()) {
heartButton.setEnabled(true);
Expand Down
20 changes: 19 additions & 1 deletion app/src/main/res/layout/dialog_main_information.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:text="@string/info_main3" />
android:text="@string/info_main3"
android:drawableEnd="@drawable/ic_bluetooth_black_24dp"
android:drawablePadding="8dp"/>

<View
android:id="@+id/divider3"
Expand Down Expand Up @@ -133,6 +135,22 @@
android:layout_marginBottom="12dp"
android:background="?android:attr/listDivider" />

<TextView
android:id="@+id/textView31"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/heart_icon_info_main"
android:drawableEnd="@drawable/heart_red"
android:drawablePadding="8dp"/>

<View
android:id="@+id/divider10"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:background="?android:attr/listDivider" />

<TextView
android:id="@+id/textView30"
android:layout_width="match_parent"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@
The values are plotted in the graphs. The graphs can be scrolled, zoomed and taped on to get the values.
The graphs can be reset with Reset Graphs in the options menu. To scroll the graphs to the end, press Scroll To End.
</string>
<string name="heart_icon_info_main">
A heart icon to the left of the displayed heart rate shows the reliability of the measured heart rate.
Tap on it to get more detailed information.
</string>
<string name="info_main7">
Rotate the phone to landscape to se a real time breathing amplitude graph, or just click Real Time Breathing in the options menu.
</string>
Expand Down

0 comments on commit 293876e

Please sign in to comment.