image.png
1.先找到图标ic_unlock.xml
2.更具图标找到
SystemUI$ grep "ic_unlock" * -Rn
src/com/android/keyguard/LockIconViewController.java:179: R.drawable.ic_unlock,
3.定位到控件
src/com/android/keyguard/LockIconView
4.定位到layout
<com.android.keyguard.LockIconView
android:id="@+id/lock_icon_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- Background protection -->
<ImageView
android:id="@+id/lock_icon_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fingerprint_bg"
android:visibility="invisible"/>
<ImageView
android:id="@+id/lock_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/lock_icon_padding"
android:layout_gravity="center"
android:scaleType="centerCrop"/>
<!-- Fingerprint -->
<!-- AOD dashed fingerprint icon with moving dashes -->
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lock_udfps_aod_fp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/lock_icon_padding"
android:layout_gravity="center"
android:scaleType="centerCrop"
systemui:lottie_autoPlay="false"
systemui:lottie_loop="true"
systemui:lottie_rawRes="@raw/udfps_aod_fp"/>
</com.android.keyguard.LockIconView>
修改内边距大小
<!-- Padding for the lock icon on the keyguard. In pixels - should not scale with display size. -->
<dimen name="lock_icon_padding">0px</dimen>
旋转图标方向
Index: src/com/android/keyguard/LockIconViewController.java
@@ -268,7 +268,7 @@
mShowAODFpIcon = mIsDozing && mUdfpsEnrolled && !mRunningFPS;
final CharSequence prevContentDescription = mView.getContentDescription();
- mView.setRotation(180);
+ mView.setRotation(0);
if (mShowLockIcon) {
mView.setImageDrawable(mLockIcon);
mView.setVisibility(View.VISIBLE);
image.png