1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-01-13 03:07:32 +01:00

UM25: fixed formatting

This commit is contained in:
Daniel Dakhno 2020-10-10 17:02:08 +02:00 committed by Andreas Shimokawa
parent 0fecdf0e18
commit 6b4cec5996
2 changed files with 5 additions and 5 deletions

View File

@ -22,8 +22,8 @@ public class DataActivity extends AbstractGBActivity {
private enum ValueDisplay{
VOLTAGE("voltage", "%.3fV", R.id.um25_text_voltage, 1000),
CURRENT("current", "%.4fA", R.id.um25_text_current, 1000),
WATTAGE("wattage", "%.4fW", R.id.um25_text_wattage, 1000),
CURRENT("current", "%.4fA", R.id.um25_text_current, 10000),
WATTAGE("wattage", "%.3fW", R.id.um25_text_wattage, 1000),
;
private String variableName;
@ -60,6 +60,9 @@ public class DataActivity extends AbstractGBActivity {
super.onPause();
LocalBroadcastManager.getInstance(this)
.unregisterReceiver(measurementReceiver);
for(TextView view : valueViews.values()){
view.setText("-");
}
}
private void displayMeasurementData(MeasurementData data){

View File

@ -11,7 +11,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="-"
android:id="@+id/um25_text_voltage"
android:gravity="center_horizontal"
android:textSize="@dimen/um25_value_text_size"
@ -20,7 +19,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="-"
android:id="@+id/um25_text_current"
android:gravity="center_horizontal"
android:textSize="@dimen/um25_value_text_size"
@ -29,7 +27,6 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="-"
android:id="@+id/um25_text_wattage"
android:gravity="center_horizontal"
android:textSize="@dimen/um25_value_text_size"