rk3562 安卓14 -安卓15 锁屏图标显示异常

14

java 复制代码
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -384,6 +384,10 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
         mWidthPixels = bounds.right;
         mHeightPixels = bounds.bottom;
         mBottomPaddingPx = getResources().getDimensionPixelSize(R.dimen.lock_icon_margin_bottom);
+               if(mBottomPaddingPx > 80){
+               mBottomPaddingPx = 80;
+
+               }
         mDefaultPaddingPx =
                 getResources().getDimensionPixelSize(R.dimen.lock_icon_padding);
 
@@ -396,7 +400,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
 
     private void updateLockIconLocation() {
         final float scaleFactor = mAuthController.getScaleFactor();
-        final int scaledPadding = (int) (mDefaultPaddingPx * scaleFactor);
+//final int scaledPadding = (int) (mDefaultPaddingPx * scaleFactor);
+        final int scaledPadding = 21;
         if (mUdfpsSupported) {
             mView.setCenterLocation(mAuthController.getUdfpsLocation(),
                     mAuthController.getUdfpsRadius(), scaledPadding);

15

java 复制代码
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt
index b45eae7301b4..393856abd3c4 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt
@@ -144,8 +144,8 @@ object DeviceEntryIconViewBinder {
                 }
                 launch("$TAG#viewModel.burnInOffsets") {
                     viewModel.burnInOffsets.collect { burnInOffsets ->
-                        view.translationX = burnInOffsets.x.toFloat()
-                        view.translationY = burnInOffsets.y.toFloat()
+                        view.translationX = burnInOffsets.x.toFloat()*4
+                        view.translationY = burnInOffsets.y.toFloat()*4
                         view.aodFpDrawable.progress = burnInOffsets.progress
                     }
                 }
@@ -175,10 +175,10 @@ object DeviceEntryIconViewBinder {
                         fgIconView.imageTintList =
                             ColorStateList.valueOf(overrideColor?.toArgb() ?: viewModel.tint)
                         fgIconView.setPadding(
-                            viewModel.padding,
-                            viewModel.padding,
-                            viewModel.padding,
-                            viewModel.padding,
+                            0,
+                            0,
+                            0,
+                            0,
                         )
                     }
                 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/DeviceEntryIconView.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/DeviceEntryIconView.kt
index 1c6323594c70..2d5058e8bccd 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/DeviceEntryIconView.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/DeviceEntryIconView.kt
@@ -222,6 +222,7 @@ constructor(
     }
 
     private fun addLongpressHandlingView() {
+        android.util.Log.d("liujunjie22","=========== addLongpressHandlingView==============");
         addView(longPressHandlingView)
         val lp = longPressHandlingView.layoutParams as LayoutParams
         lp.height = ViewGroup.LayoutParams.MATCH_PARENT
@@ -230,22 +231,25 @@ constructor(
     }
 
     private fun addIconImageView() {
+        android.util.Log.d("liujunjie22","=========== addIconImageView==============");
         iconView.scaleType = ImageView.ScaleType.CENTER_CROP
         iconView.setImageDrawable(animatedIconDrawable)
         addView(iconView)
         val lp = iconView.layoutParams as LayoutParams
-        lp.height = ViewGroup.LayoutParams.MATCH_PARENT
-        lp.width = ViewGroup.LayoutParams.MATCH_PARENT
+        //lp.height = ViewGroup.LayoutParams.MATCH_PARENT
+        lp.height = 50;
+        lp.width = 50;
         lp.gravity = Gravity.CENTER
         iconView.layoutParams = lp
     }
 
     private fun addBgImageView() {
+        android.util.Log.d("liujunjie22","=========== addBgImageView==============");
         bgView.setImageDrawable(context.getDrawable(R.drawable.fingerprint_bg))
         addView(bgView)
         val lp = bgView.layoutParams as LayoutParams
-        lp.height = ViewGroup.LayoutParams.MATCH_PARENT
-        lp.width = ViewGroup.LayoutParams.MATCH_PARENT
+        lp.height = 50;
+        lp.width = 50;
         bgView.layoutParams = lp
     }
 
相关推荐
tangweiguo030519871 分钟前
Android BottomNavigationView 完全自定义指南:图标、文字颜色与选中状态
android
遥不可及zzz1 小时前
Android 应用程序包的 adb 命令
android·adb
无知的前端1 小时前
Flutter 一文精通Isolate,使用场景以及示例
android·flutter·性能优化
_一条咸鱼_1 小时前
Android Compose 入门之字符串与本地化深入剖析(五十三)
android
ModestCoder_2 小时前
将一个新的机器人模型导入最新版isaacLab进行训练(以unitree H1_2为例)
android·java·机器人
robin_suli3 小时前
Spring事务的传播机制
android·java·spring
鸿蒙布道师4 小时前
鸿蒙NEXT开发对象工具类(TS)
android·ios·华为·harmonyos·arkts·鸿蒙系统·huawei
Harrison_zhu5 小时前
Ubuntu18.04 编译 Android7.1代码报错
android
CYRUS STUDIO7 小时前
Unidbg Trace 反 OLLVM 控制流平坦化(fla)
android·汇编·算法·网络安全·逆向·ollvm
扫地的小何尚7 小时前
NVIDIA工业设施数字孪生中的机器人模拟
android·java·c++·链表·语言模型·机器人·gpu