Commit 8774febd authored by sync_forks@e's avatar sync_forks@e

Merge branch 'lineage-15.1' into v1-oreo

parents a6da083c ef1c4bf5
Pipeline #3092 passed with stage
in 14 minutes and 9 seconds
......@@ -17,13 +17,14 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/fingerprint_find_sensor_graphic_size"
android:layout_height="@dimen/fingerprint_find_sensor_graphic_size">
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/fingerprint_find_sensor_padding_top">
<ImageView
android:id="@+id/fingerprint_sensor_location"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/security_settings_fingerprint_enroll_find_sensor_content_description"
android:src="@drawable/fingerprint_sensor_location"
android:scaleType="centerInside"/>
......@@ -31,7 +32,7 @@
<ImageView
android:id="@+id/fingerprint_sensor_location_front_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/security_settings_fingerprint_enroll_find_sensor_content_description"
android:src="@drawable/fingerprint_sensor_location_front_overlay"
android:scaleType="centerInside"
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The LineageOS 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.
-->
<resources>
<!-- Fingerprint -->
<dimen name="fingerprint_find_sensor_padding_top">16dp</dimen>
</resources>
......@@ -28,6 +28,7 @@ import android.util.AttributeSet;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.widget.ImageView;
import com.android.settings.R;
import com.android.settings.Utils;
......@@ -53,6 +54,7 @@ public class FingerprintLocationAnimationView extends View implements
private float mPulseRadius;
private ValueAnimator mRadiusAnimator;
private ValueAnimator mAlphaAnimator;
private ImageView mOverlayImage;
public FingerprintLocationAnimationView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
......@@ -92,7 +94,11 @@ public class FingerprintLocationAnimationView extends View implements
}
private float getCenterY() {
return getHeight() * mFractionCenterY;
if (mOverlayImage == null) {
mOverlayImage = (ImageView) getRootView().findViewById(
R.id.fingerprint_sensor_location);
}
return mOverlayImage.getHeight() * mFractionCenterY;
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment