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
     }
 
相关推荐
ANYOUZHEN2 小时前
bugku shell
android
南宫码农5 小时前
我的电视 - Android原生电视直播软件 完整使用教程
android·开发语言·windows·电视盒子
道亦无名5 小时前
音频数据特征值提取 方法和步骤
android·音视频
Lancker6 小时前
定制侠 一个国产纯血鸿蒙APP的诞生过程
android·华为·智能手机·鸿蒙·国产操作系统·纯血鸿蒙·华为鸿蒙
2601_949809597 小时前
flutter_for_openharmony家庭相册app实战+通知设置实现
android·javascript·flutter
液态不合群8 小时前
【面试题】MySQL 中 count(*)、count(1) 和 count(字段名) 有什么区别?
android·数据库·mysql
雪球Snowball9 小时前
【Android关键流程】资源加载
android
2501_915918419 小时前
常见 iOS 抓包工具的使用,从代理抓包、设备抓包到数据流抓包
android·ios·小程序·https·uni-app·iphone·webview
墨月白11 小时前
[QT]QProcess的相关使用
android·开发语言·qt
enbug11 小时前
编译安卓内核:以坚果R1、魔趣MK100(Android 10)系统为例
android·linux