Skip to content

Commit

Permalink
add uniform dimensions for TextView is sensor screens
Browse files Browse the repository at this point in the history
  • Loading branch information
marcnause committed Dec 16, 2024
1 parent 494c0d7 commit 34a6286
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 95 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/layout/sensor_ads1115.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@

<TextView
android:id="@+id/tv_sensor_ads1115"
android:layout_width="120dp"
android:layout_height="40dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="center_vertical"
android:background="@drawable/tv_border"
android:textColor="@color/black"
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout/sensor_bmp180.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/temperature"
android:textColor="@color/black"
Expand All @@ -80,7 +80,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/altitude"
android:textColor="@color/black"
Expand All @@ -89,7 +89,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/pressure"
android:textColor="@color/black"
Expand All @@ -106,8 +106,8 @@

<TextView
android:id="@+id/tv_sensor_bmp180_temp"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand All @@ -116,8 +116,8 @@

<TextView
android:id="@+id/tv_sensor_bmp180_altitude"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand All @@ -126,8 +126,8 @@

<TextView
android:id="@+id/tv_sensor_bmp180_pressure"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/sensor_ccs811.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/eCO2"
android:textColor="@color/black"
Expand All @@ -81,7 +81,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/eTVOC"
android:textColor="@color/black"
Expand All @@ -99,8 +99,8 @@

<TextView
android:id="@+id/tv_sensor_ccs811_eCO2"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand All @@ -109,8 +109,8 @@

<TextView
android:id="@+id/tv_sensor_ccs811_TVOC"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout/sensor_hmc5883l.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/bx"
android:textColor="@color/black"
Expand All @@ -80,7 +80,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/by"
android:textColor="@color/black"
Expand All @@ -89,7 +89,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/bz"
android:textColor="@color/black"
Expand All @@ -106,8 +106,8 @@

<TextView
android:id="@+id/tv_sensor_hmc5883l_bx"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand All @@ -116,8 +116,8 @@

<TextView
android:id="@+id/tv_sensor_hmc5883l_by"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand All @@ -126,8 +126,8 @@

<TextView
android:id="@+id/tv_sensor_hmc5883l_bz"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/sensor_mlx90614.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/object_temp"
android:textColor="@color/black"
Expand All @@ -81,7 +81,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/ambient_temp"
android:textColor="@color/black"
Expand All @@ -99,8 +99,8 @@

<TextView
android:id="@+id/tv_sensor_mlx90614_object_temp"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand All @@ -109,8 +109,8 @@

<TextView
android:id="@+id/tv_sensor_mlx90614_ambient_temp"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand Down
42 changes: 21 additions & 21 deletions app/src/main/res/layout/sensor_mpu925x.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:text="@string/ax"
android:textAlignment="textStart"
Expand All @@ -83,7 +83,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:text="@string/ay"
android:textAlignment="textStart"
Expand All @@ -93,7 +93,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:text="@string/az"
android:textAlignment="textStart"
Expand All @@ -103,7 +103,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:text="@string/temp"
android:textAlignment="textStart"
Expand All @@ -121,8 +121,8 @@

<TextView
android:id="@+id/tv_sensor_mpu925x_ax"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:background="@drawable/tv_border"
android:textAlignment="textStart"
Expand All @@ -132,8 +132,8 @@

<TextView
android:id="@+id/tv_sensor_mpu925x_ay"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:background="@drawable/tv_border"
android:textAlignment="textStart"
Expand All @@ -143,8 +143,8 @@

<TextView
android:id="@+id/tv_sensor_mpu925x_az"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:background="@drawable/tv_border"
android:textAlignment="textStart"
Expand All @@ -154,8 +154,8 @@

<TextView
android:id="@+id/tv_sensor_mpu925x_temp"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:background="@drawable/tv_border"
android:textAlignment="textStart"
Expand All @@ -173,7 +173,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:text="@string/gx"
android:textAlignment="textStart"
Expand All @@ -183,7 +183,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:text="@string/gy"
android:textAlignment="textStart"
Expand All @@ -193,7 +193,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:text="@string/gz"
android:textAlignment="textStart"
Expand All @@ -211,8 +211,8 @@

<TextView
android:id="@+id/tv_sensor_mpu925x_gx"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:background="@drawable/tv_border"
android:textAlignment="textStart"
Expand All @@ -222,8 +222,8 @@

<TextView
android:id="@+id/tv_sensor_mpu925x_gy"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:background="@drawable/tv_border"
android:textAlignment="textStart"
Expand All @@ -233,8 +233,8 @@

<TextView
android:id="@+id/tv_sensor_mpu925x_gz"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:layout_gravity="start"
android:background="@drawable/tv_border"
android:textAlignment="textStart"
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/sensor_sht21.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/temp"
android:textColor="@color/black"
Expand All @@ -81,7 +81,7 @@

<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_height="@dimen/tv_sensor_height"
android:gravity="center_vertical"
android:text="@string/humidity"
android:textColor="@color/black"
Expand All @@ -99,8 +99,8 @@

<TextView
android:id="@+id/tv_sensor_sht21_temp"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand All @@ -109,8 +109,8 @@

<TextView
android:id="@+id/tv_sensor_sht21_humidity"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_width="@dimen/tv_sensor_width"
android:layout_height="@dimen/tv_sensor_height"
android:background="@drawable/tv_border"
android:gravity="center"
android:textColor="@color/black"
Expand Down
Loading

0 comments on commit 34a6286

Please sign in to comment.