hide also the connection quality field. fix string formatting
This commit is contained in:
parent
b6d41e7d73
commit
24eecda1c0
|
@ -169,6 +169,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
}
|
||||
if (buildHelper.isEngineeringMode()) {
|
||||
bluetoothStatusBinding.deliveryStatus.visibility = View.VISIBLE
|
||||
bluetoothStatusBinding.connectionQuality.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,10 +241,10 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
}
|
||||
|
||||
val connectionSuccessPercentage = podStateManager.connectionSuccessRatio() * 100
|
||||
val successPercentageString = String.format("%.2f %", podStateManager.connectionSuccessRatio())
|
||||
val connectionQuality =
|
||||
val successPercentageString = String.format("%.2f %%", podStateManager.connectionSuccessRatio())
|
||||
val quality =
|
||||
"${podStateManager.successfulConnections}/${podStateManager.connectionAttempts} :: $successPercentageString"
|
||||
bluetoothStatusBinding.omnipodDashBluetoothConnectionQuality.text = connectionQuality
|
||||
bluetoothStatusBinding.omnipodDashBluetoothConnectionQuality.text = quality
|
||||
val connectionStatsColor = when {
|
||||
connectionSuccessPercentage > 90 ->
|
||||
Color.WHITE
|
||||
|
|
|
@ -79,9 +79,11 @@
|
|||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/connectionQuality"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -112,7 +114,6 @@
|
|||
android:gravity="start"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="{fa-bluetooth-b} "
|
||||
android:textSize="14sp"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
@ -153,7 +154,6 @@
|
|||
android:gravity="start"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="{fa-bluetooth-b} "
|
||||
android:textSize="14sp"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Reference in a new issue