Improve statuslight alligning and spacing

This commit is contained in:
Andries Smit 2022-01-31 13:20:00 +01:00
parent e1e7b4a7a8
commit 29d5c5f76a

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/status_lights" android:id="@+id/status_lights"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -15,14 +16,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:focusable="true"> android:focusable="true"
android:gravity="center_horizontal">
<ImageView <ImageView
android:id="@+id/cannula_or_patch" android:layout_width="38dp"
android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:contentDescription="@string/statuslights_cannula_age" android:contentDescription="@string/statuslights_cannula_age"
android:scaleType="centerInside"
android:scaleX="2" android:scaleX="2"
android:scaleY="2" android:scaleY="2"
app:srcCompat="@drawable/ic_cp_age_cannula" /> app:srcCompat="@drawable/ic_cp_age_cannula" />
@ -31,9 +31,8 @@
android:id="@+id/cannula_age" android:id="@+id/cannula_age"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="1dp" android:lines="1"
android:paddingEnd="2dp" tools:text="1d12h" />
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@ -41,59 +40,55 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_weight="1" android:layout_weight="1"
android:focusable="true"> android:focusable="true"
android:gravity="center_horizontal">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="26dp"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:contentDescription="@string/a11y_insulin_label" android:contentDescription="@string/a11y_insulin_label"
android:gravity="center_vertical" android:scaleX="1.7"
android:scaleType="centerInside" android:scaleY="1.7"
android:scaleX="1.8"
android:scaleY="1.8"
app:srcCompat="@drawable/ic_cp_age_insulin" /> app:srcCompat="@drawable/ic_cp_age_insulin" />
<TextView <TextView
android:id="@+id/insulin_age" android:id="@+id/insulin_age"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:gravity="center_vertical" android:lines="1"
android:paddingStart="1dp" tools:text="12h" />
android:paddingEnd="2dp"
android:textSize="14sp" />
<TextView <TextView
android:id="@+id/reservoir_level" android:id="@+id/reservoir_level"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:lines="1"
android:textSize="14sp" /> android:paddingStart="2dp"
tools:text="50+U" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_weight="1" android:layout_weight="1"
android:focusable="true"> android:focusable="true"
android:gravity="center_horizontal">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="28dp"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:contentDescription="@string/careportal_sensor_label" android:contentDescription="@string/careportal_sensor_label"
android:gravity="center_vertical" android:scaleX="1.6"
android:scaleType="centerInside" android:scaleY="1.6"
android:scaleX="2"
android:scaleY="2"
app:srcCompat="@drawable/ic_cp_age_sensor" /> app:srcCompat="@drawable/ic_cp_age_sensor" />
<TextView <TextView
android:id="@+id/sensor_age" android:id="@+id/sensor_age"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:lines="1"
android:paddingStart="1dp" tools:text="1d12h" />
android:paddingEnd="2dp"
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@ -101,34 +96,31 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_weight="1" android:layout_weight="1"
android:focusable="true"> android:focusable="true"
android:gravity="center_horizontal">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="32dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/battery_label" android:contentDescription="@string/battery_label"
android:scaleType="centerInside" android:scaleX="1.8"
android:scaleX="2" android:scaleY="1.8"
android:scaleY="2"
app:srcCompat="@drawable/ic_cp_age_battery" /> app:srcCompat="@drawable/ic_cp_age_battery" />
<TextView <TextView
android:id="@+id/pb_age" android:id="@+id/pb_age"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:gravity="center_vertical" android:lines="1"
android:paddingStart="1dp" tools:text="-" />
android:paddingEnd="1dp"
android:textSize="14sp" />
<TextView <TextView
android:id="@+id/battery_level" android:id="@+id/battery_level"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:gravity="center_vertical" android:lines="1"
android:paddingStart="1dp" android:paddingStart="2dp"
android:paddingEnd="2dp" tools:text="100%" />
android:textSize="14sp" />
</LinearLayout> </LinearLayout>