diff --git a/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/sensors/SensorsFragment.java b/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/sensors/SensorsFragment.java index 69fb847..84a2251 100644 --- a/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/sensors/SensorsFragment.java +++ b/NucuHub.Android/app/src/main/java/dev/nuculabs/nucuhub/ui/sensors/SensorsFragment.java @@ -10,6 +10,7 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; +import com.google.android.material.chip.Chip; import dev.nuculabs.grpc.EnvironmentSensorData; import dev.nuculabs.grpc.EnvironmentSensorService; import dev.nuculabs.nucuhub.R; @@ -19,7 +20,7 @@ public class SensorsFragment extends Fragment { private EnvironmentSensorService environmentSensorService; // ui elements private ImageView sensorStatusImageView; - private TextView sensorStatusText; + private Chip sensorStatusText; private TextView temperatureText; private TextView humidityText; private TextView pressureText; @@ -34,7 +35,7 @@ public class SensorsFragment extends Fragment { pressureText = root.findViewById(R.id.envSensorPressureText); vocText = root.findViewById(R.id.envSensorVocText); sensorStatusImageView = root.findViewById(R.id.sensorStatusImageView); - sensorStatusText = root.findViewById(R.id.sensorStatusText); + sensorStatusText = root.findViewById(R.id.sensorStatusChip); environmentSensorService = new EnvironmentSensorService("192.168.0.100", 8000); diff --git a/NucuHub.Android/app/src/main/res/layout/fragment_environment_sensor.xml b/NucuHub.Android/app/src/main/res/layout/fragment_environment_sensor.xml index 69ada47..5b8d5eb 100644 --- a/NucuHub.Android/app/src/main/res/layout/fragment_environment_sensor.xml +++ b/NucuHub.Android/app/src/main/res/layout/fragment_environment_sensor.xml @@ -29,10 +29,12 @@ tools:srcCompat="@drawable/status_neutral" android:adjustViewBounds="true" android:scaleType="center" /> - + - + + + + - + android:layout_marginBottom="25dp" + > + + + @@ -126,18 +153,27 @@ android:contentDescription="@string/barometer_icon_desc" android:layout_marginStart="29dp" android:layout_marginTop="21dp"/> - + + + + - + + + + diff --git a/NucuHub.Android/app/src/main/res/values/strings.xml b/NucuHub.Android/app/src/main/res/values/strings.xml index e5a62c7..4f2a82c 100644 --- a/NucuHub.Android/app/src/main/res/values/strings.xml +++ b/NucuHub.Android/app/src/main/res/values/strings.xml @@ -15,4 +15,8 @@ temperature icon barometer icon voc icon + Rh% + Celsius + hPa + VOC Ω \ No newline at end of file diff --git a/NucuHub.Android/app/src/main/res/values/styles.xml b/NucuHub.Android/app/src/main/res/values/styles.xml index c1e0da2..db11353 100644 --- a/NucuHub.Android/app/src/main/res/values/styles.xml +++ b/NucuHub.Android/app/src/main/res/values/styles.xml @@ -1,6 +1,6 @@ -