Resize fingerprint added illustration to specs

Use FillContentLayout to make sure the illustration is according to
specs, between 124dp and 264dp, filling up the remaining size.

The landscape layout is also updated so that the illustration is
vertically centered instead of shifted downwards.

Test: Manual
Bug: 37668789
Change-Id: If17e509d4643d620c76ca4a5bc0120272c7c58bb
This commit is contained in:
Maurice Lam
2017-05-17 19:55:23 -07:00
parent 868ecae66d
commit 5ed96dc264
4 changed files with 43 additions and 35 deletions

View File

@@ -20,6 +20,7 @@
android:id="@+id/setup_wizard_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout="@layout/suw_glif_blank_template"
style="?attr/fingerprint_layout_theme">
<LinearLayout
@@ -28,18 +29,34 @@
android:layout_height="match_parent"
android:orientation="horizontal"
android:clipToPadding="false"
android:clipChildren="false"
android:paddingBottom="0dp">
android:clipChildren="false">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<ImageView
android:id="@+id/suw_layout_icon"
style="@style/SuwGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:contentDescription="@null"
android:src="@drawable/ic_fingerprint_header"/>
<TextView
android:id="@+id/suw_layout_title"
style="@style/SuwGlifHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"/>
<TextView
android:id="@+id/message"
style="@style/SuwDescription.Glif"
@@ -57,6 +74,11 @@
android:textColor="?android:attr/textColorSecondary"
android:visibility="gone" />
<Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -89,21 +111,20 @@
</LinearLayout>
<FrameLayout
<com.android.setupwizardlib.view.FillContentLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
android:layout_height="match_parent">
<ImageView
android:id="@+id/fingerprint_in_app_indicator"
android:layout_width="@dimen/fingerprint_in_app_indicator_size"
android:layout_height="@dimen/fingerprint_in_app_indicator_size"
android:layout_gravity="center_horizontal"
style="@style/SuwContentIllustration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@android:string/fingerprint_icon_content_description"
android:src="@drawable/fp_app_indicator" />
</FrameLayout>
</com.android.setupwizardlib.view.FillContentLayout>
</LinearLayout>

View File

@@ -50,29 +50,20 @@
android:textColor="?android:attr/textColorSecondary"
android:visibility="gone" />
<View
android:layout_height="24dp"
<com.android.setupwizardlib.view.FillContentLayout
android:layout_width="match_parent"
android:layout_weight="1"/>
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/fingerprint_in_app_indicator"
android:layout_height="0dp"
android:layout_width="wrap_content"
android:layout_weight="5"
android:adjustViewBounds="true"
android:minHeight="@dimen/fingerprint_in_app_indicator_min_size"
android:minWidth="@dimen/fingerprint_in_app_indicator_min_size"
android:maxHeight="@dimen/fingerprint_in_app_indicator_max_size"
android:maxWidth="@dimen/fingerprint_in_app_indicator_max_size"
android:layout_gravity="center_horizontal"
style="@style/SuwContentIllustration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@android:string/fingerprint_icon_content_description"
android:src="@drawable/fp_app_indicator" />
<View
android:layout_height="24dp"
android:layout_width="match_parent"
android:layout_weight="1"/>
</com.android.setupwizardlib.view.FillContentLayout>
</LinearLayout>

View File

@@ -17,7 +17,6 @@
<resources>
<dimen name="fingerprint_enrolling_content_margin_top">56dp</dimen>
<dimen name="fingerprint_in_app_indicator_size">176dp</dimen>
<dimen name="fingerprint_find_sensor_graphic_size">240dp</dimen>
<dimen name="support_escalation_card_padding_start">56dp</dimen>

View File

@@ -223,9 +223,6 @@
<dimen name="fingerprint_progress_bar_max_size">220dp</dimen>
<dimen name="fingerprint_progress_bar_min_size">120dp</dimen>
<dimen name="fingerprint_enrolling_content_margin_top">36dp</dimen>
<dimen name="fingerprint_in_app_indicator_size">124dp</dimen>
<dimen name="fingerprint_in_app_indicator_min_size">124dp</dimen>
<dimen name="fingerprint_in_app_indicator_max_size">264dp</dimen>
<dimen name="confirm_credentials_security_method_margin">48dp</dimen>
<dimen name="confirm_credentials_layout_width">@dimen/match_parent</dimen>