Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67df1262 authored by Maurice Lam's avatar Maurice Lam
Browse files

[Fingerprint] Make enroll progress bar scalable

Make the fingerprint enroll progress bar scalable by moving it to a
single FingerprintProgressBar view and make it fill the remaining
space.

- The background fingerprint icon was changed to include the padding
internally so it can be added as the background directly onto the
progress bar view.
- The icon in landscape mode is also fixed to use the fingerprint
icon rather than the lock icon.

Test: cd tests/robotests && mm
Bug: 32123370
Change-Id: Ia5cf37d92f0af7c1cf39287f5070c44f51d44878
parent 1ec79681
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@android:color/white"
        android:alpha="?android:attr/disabledAlpha" />
</selector>
+5 −5
Original line number Diff line number Diff line
@@ -17,14 +17,14 @@
<vector
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:name="enrollment_fingerprint_isolated"
    android:width="75dp"
    android:viewportWidth="75"
    android:width="88dp"
    android:height="88dp"
    android:viewportHeight="88" >
    android:viewportWidth="176"
    android:viewportHeight="176" >
    <group
        android:name="fingerprint_ridges_2"
        android:translateX="37.5835"
        android:translateY="43.66685" >
        android:translateX="88"
        android:translateY="87.66685" >
        <group
            android:name="ridge_5" >
            <path
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2016 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <item
        android:id="@+id/fingerprint_background"
        android:drawable="@drawable/fp_illustration_enrollment" />

    <item
        android:id="@+id/fingerprint_animation"
        android:drawable="@drawable/enrollment_fingerprint_isolated_animation" />

</layer-list>
+21 −17
Original line number Diff line number Diff line
@@ -16,8 +16,11 @@ Copyright (C) 2015 The Android Open Source Project
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="88.0dp"
        android:height="88.0dp"
        android:viewportWidth="88.0"
        android:viewportHeight="88.0">
        android:viewportWidth="176.0"
        android:viewportHeight="176.0">
    <group
        android:translateX="44"
        android:translateY="44">
        <path
            android:fillColor="#FF000000"
            android:pathData="M67.74,11.59c-0.41,0.0 -0.82,-0.1 -1.2,-0.31c-7.44,-4.06 -15.0,-6.04 -23.11,-6.04c-7.92,0.0 -14.67,1.85 -21.88,6.01c-1.2,0.69 -2.73,0.28 -3.42,-0.92s-0.28,-2.72 0.92,-3.41c7.9,-4.55 15.65,-6.68 24.37,-6.68c8.97,0.0 17.32,2.17 25.51,6.65c1.21,0.66 1.66,2.18 1.0,3.39C69.48,11.12 68.62,11.59 67.74,11.59z"/>
@@ -33,4 +36,5 @@ Copyright (C) 2015 The Android Open Source Project
        <path
            android:fillColor="#FF000000"
            android:pathData="M55.92,87.75c-0.23,0.0 -0.46,-0.03 -0.7,-0.1c-6.6,-1.91 -10.92,-4.49 -15.4,-9.2c-5.76,-6.06 -8.94,-14.13 -8.94,-22.72c0.0,-7.2 5.86,-13.05 13.05,-13.05c7.2,0.0 13.05,5.86 13.05,13.05c0.0,4.44 3.61,8.05 8.05,8.05s8.05,-3.61 8.05,-8.05c0.0,-16.08 -13.08,-29.16 -29.16,-29.16c-11.43,0.0 -21.86,6.73 -26.58,17.15c-1.57,3.48 -2.37,7.52 -2.37,12.01c0.0,3.36 0.28,8.62 2.71,15.49c0.46,1.3 -0.22,2.73 -1.52,3.19c-1.3,0.46 -2.73,-0.22 -3.19,-1.52c-2.02,-5.7 -3.0,-11.31 -3.0,-17.16c0.0,-5.21 0.95,-9.94 2.82,-14.07c5.52,-12.2 17.74,-20.09 31.13,-20.09c18.83,0.0 34.16,15.32 34.16,34.16c0.0,7.2 -5.86,13.05 -13.05,13.05S52.0,62.92 52.0,55.73c0.0,-4.44 -3.61,-8.05 -8.05,-8.05s-8.05,3.61 -8.05,8.05c0.0,7.3 2.69,14.15 7.56,19.28c3.86,4.06 7.43,6.18 13.17,7.84c1.33,0.38 2.09,1.77 1.71,3.1C58.01,87.04 57.01,87.75 55.92,87.75z"/>
    </group>
</vector>
+18 −14
Original line number Diff line number Diff line
@@ -17,23 +17,27 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@android:id/background">
        <shape
            android:innerRadius="?attr/fingerprint_ring_radius"
            android:innerRadiusRatio="2.2"
            android:shape="ring"
            android:thickness="@dimen/fingerprint_ring_thickness"
            android:useLevel="false">
            <solid android:color="@color/fingerprint_progress_ring_bg" />
            android:thickness="@dimen/ring_progress_bar_thickness"
            android:useLevel="false"
            android:tint="?android:colorControlNormal">
            <solid android:color="@color/white_disabled" />
        </shape>
    </item>
    <item android:id="@android:id/progress">
        <rotate
            android:fromDegrees="270"
            android:pivotX="50%"
            android:pivotY="50%"
            android:toDegrees="270">
            <shape
            android:innerRadius="?attr/fingerprint_ring_radius"
                android:innerRadiusRatio="2.2"
                android:shape="ring"
            android:thickness="@dimen/fingerprint_ring_thickness">
            <gradient
                android:startColor="@color/fingerprint_progress_ring"
                android:endColor="@color/fingerprint_progress_ring"
                android:angle="0"
            />
                android:thickness="@dimen/ring_progress_bar_thickness"
                android:tint="?android:attr/colorControlActivated">
                <solid android:color="@android:color/white" />
            </shape>
        </rotate>
    </item>
</layer-list>
Loading