Attempt to make text in Omnipod wizards readable for all screen sizes

This commit is contained in:
Bart Sopers 2020-09-09 19:50:31 +02:00
parent bb7eed1045
commit 025f25fb27
3 changed files with 58 additions and 52 deletions

View file

@ -9,7 +9,7 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="vertical">
<ImageButton <ImageButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -18,7 +18,6 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:onClick="exitPressed"
app:srcCompat="@drawable/ic_exit_to_app" /> app:srcCompat="@drawable/ic_exit_to_app" />
<TextView <TextView
@ -33,16 +32,6 @@
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/sw_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:keepScreenOn="true"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="32sp"
tools:text="Title" />
<ScrollView <ScrollView
android:id="@+id/sw_scrollview" android:id="@+id/sw_scrollview"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -50,12 +39,28 @@
android:layout_weight="1"> android:layout_weight="1">
<LinearLayout <LinearLayout
android:id="@+id/sw_content_fields" android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal" android:orientation="vertical">
android:orientation="vertical"
android:padding="16dp" /> <TextView
android:id="@+id/sw_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:keepScreenOn="true"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="32sp"
tools:text="Title" />
<LinearLayout
android:id="@+id/sw_content_fields"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
android:padding="16dp" />
</LinearLayout>
</ScrollView> </ScrollView>
<LinearLayout <LinearLayout
@ -73,13 +78,12 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:onClick="showPreviousPage"
android:text="@string/omnipod_wizard_button_previous" android:text="@string/omnipod_wizard_button_previous"
android:textColor="#FFFFFF" /> android:textColor="#FFFFFF" />
<View <View
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
@ -87,7 +91,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:onClick="showNextPage"
android:text="@string/omnipod_wizard_button_next" android:text="@string/omnipod_wizard_button_next"
android:textColor="#FFFFFF" /> android:textColor="#FFFFFF" />
@ -96,7 +99,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:onClick="finishSetupWizard"
android:text="@string/omnipod_wizard_button_finish" android:text="@string/omnipod_wizard_button_finish"
android:textColor="#FFFFFF" /> android:textColor="#FFFFFF" />

View file

@ -4,31 +4,37 @@
<TextView style="@style/WizardPageTitle" /> <TextView style="@style/WizardPageTitle" />
<TextView
android:id="@+id/initAction_header"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
style="@style/WizardPagePodContent"
android:textSize="15sp"
android:text="@string/omnipod_init_pod_wizard_step2_action_header" />
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginLeft="70dp"
android:layout_marginRight="70dp"
android:layout_weight="1"> android:layout_weight="1">
<LinearLayout <LinearLayout
android:id="@+id/initAction_ItemsHolder" android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<TextView
android:id="@+id/initAction_header"
style="@style/WizardPagePodContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="20dp"
android:layout_marginRight="25dp"
android:layout_marginBottom="20dp"
android:text="@string/omnipod_init_pod_wizard_step2_action_header"
android:textSize="15sp" />
<LinearLayout
android:id="@+id/initAction_ItemsHolder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:layout_marginRight="70dp"
android:orientation="vertical"></LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
@ -40,41 +46,40 @@
<TextView <TextView
android:id="@+id/initAction_textErrorMessage" android:id="@+id/initAction_textErrorMessage"
android:layout_height="match_parent" style="@style/WizardPagePodContent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:textSize="15sp"
android:layout_weight="0.3" android:layout_weight="0.3"
style="@style/WizardPagePodContent" android:textSize="15sp"
android:visibility="gone" /> android:visibility="gone" />
<Button <Button
android:id="@+id/initAction_RetryButton" android:id="@+id/initAction_RetryButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.7"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="15dp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:layout_weight="0.7"
android:drawableTop="@drawable/ic_actions_refill" android:drawableTop="@drawable/ic_actions_refill"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
<ProgressBar <ProgressBar
android:id="@+id/initAction_progressBar" android:id="@+id/initAction_progressBar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginLeft="25dp" android:layout_marginLeft="25dp"
android:layout_marginRight="25dp" android:layout_marginRight="25dp" />
android:layout_height="80dp" />
<TextView <TextView
android:id="@+id/initAction_footer" android:id="@+id/initAction_footer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:textSize="15sp" android:layout_height="30dp"
android:layout_height="30dp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>

View file

@ -1,15 +1,16 @@
<?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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="20dp"> android:paddingStart="20dp"
android:paddingTop="10dp"
android:paddingEnd="20dp">
<TextView <TextView
android:id="@+id/omnipod_history_time" android:id="@+id/omnipod_history_time"
android:layout_width="88dp" android:layout_width="88dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="@string/omnipod_history_item_date" android:text="@string/omnipod_history_item_date"
android:textSize="12sp" /> android:textSize="12sp" />
@ -17,7 +18,6 @@
android:id="@+id/omnipod_history_source" android:id="@+id/omnipod_history_source"
android:layout_width="132dp" android:layout_width="132dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="@string/omnipod_history_item_source" android:text="@string/omnipod_history_item_source"
android:textSize="12sp" /> android:textSize="12sp" />
@ -25,7 +25,6 @@
android:id="@+id/omnipod_history_description" android:id="@+id/omnipod_history_description"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="@string/omnipod_history_item_description" android:text="@string/omnipod_history_item_description"
android:textSize="12sp" /> android:textSize="12sp" />