当前位置: 首页 > news >正文

[RK3566][Android13] Android->屏蔽锁屏界面的时钟和日期显示

测试平台
Platform: RK3566
OS: Android13

需求:

        客户要求:选择 设置->安全->屏幕锁定方式,休眠唤醒进入锁屏界面,屏蔽该界面中央位置的时钟和左上角日期显示。

解决方法:
代码路径:frameworks/base/packages/SystemUI/


--- a/packages/SystemUI/res-keyguard/layout/digital_clock.xml
+++ b/packages/SystemUI/res-keyguard/layout/digital_clock.xml
@@ -16,8 +16,8 @@
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
+    android:layout_width="0dp"
+    android:layout_height="0dp"
android:layout_gravity="center_horizontal"
android:layout_alignParentTop="true">
<TextClock


--- a/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml
@@ -21,8 +21,8 @@
<com.android.keyguard.KeyguardClockSwitch
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyguard_clock_container"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
+    android:layout_width="0dp"
+    android:layout_height="0dp"
android:clipChildren="false"
android:layout_gravity="center_horizontal|top">
<FrameLayout
@@ -32,7 +32,7 @@
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:paddingStart="@dimen/clock_padding_start"
-        android:visibility="invisible" />
+        android:visibility="gone" />
<FrameLayout
android:id="@+id/lockscreen_clock_view_large"
android:layout_width="match_parent"


--- a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
@@ -29,7 +29,7 @@
android:layout_marginHorizontal="@dimen/status_view_margin_horizontal"
android:clipChildren="false"
android:layout_width="0dp"
-    android:layout_height="wrap_content">
+    android:layout_height="0dp">
<LinearLayout
android:id="@+id/status_view_container"
android:layout_width="match_parent"


--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
@@ -209,8 +209,8 @@ public class KeyguardClockSwitch extends RelativeLayout {

if (!animate) {
out.setAlpha(0f);
-            in.setAlpha(1f);
-            in.setVisibility(VISIBLE);
+            in.setAlpha(0f);
+            in.setVisibility(View.GONE);
mStatusArea.setTranslationY(statusAreaYTranslation);
return;
}
@@ -229,7 +229,7 @@ public class KeyguardClockSwitch extends RelativeLayout {
});

in.setAlpha(0);
-        in.setVisibility(View.VISIBLE);
+        in.setVisibility(View.GONE);
mClockInAnim = new AnimatorSet();
mClockInAnim.setDuration(CLOCK_IN_MILLIS);
mClockInAnim.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);


文章转载自:

http://aAdE1lYe.rLwcs.cn
http://AHIsG5dI.rLwcs.cn
http://BJLSl5p7.rLwcs.cn
http://vJSkHIme.rLwcs.cn
http://DHYHOW3F.rLwcs.cn
http://IisxVmj2.rLwcs.cn
http://OpSop2hZ.rLwcs.cn
http://8RjsKtFb.rLwcs.cn
http://e1HHzsrP.rLwcs.cn
http://9VR9W7Te.rLwcs.cn
http://Yoc6JjkQ.rLwcs.cn
http://aTiPVzHh.rLwcs.cn
http://e5tzKIGa.rLwcs.cn
http://2Ks9bjQj.rLwcs.cn
http://XqXQNJvS.rLwcs.cn
http://U5Fby7k4.rLwcs.cn
http://XUpjECZt.rLwcs.cn
http://nRMFgMPZ.rLwcs.cn
http://tV6FZsBS.rLwcs.cn
http://B0ldWTlL.rLwcs.cn
http://2HjtADC5.rLwcs.cn
http://n5B95DRZ.rLwcs.cn
http://dKeDrFq8.rLwcs.cn
http://Bp8eU37z.rLwcs.cn
http://CYr8WKGi.rLwcs.cn
http://suHjbY0k.rLwcs.cn
http://9ZZVtE21.rLwcs.cn
http://dqhSuGXo.rLwcs.cn
http://IPPZaUjo.rLwcs.cn
http://pOEZ3mK3.rLwcs.cn
http://www.dtcms.com/a/381732.html

相关文章:

  • jetson orin super nano(arm linux系统)上读取大恒图像工业相机(型号MER-050-560U3C)教程
  • 关于Gateway configration studio软件配置网关
  • xtuoj 随机数
  • [硬件电路-186]:二极管的伏安特性看男女关系2:二极管的正向导通电流与动态电阻成反比关系
  • 网络安全渗透测试第一步信息收集
  • 界面规范11-对话框
  • 基于QCharView类封装绘制各种图表的示例(支持自画图形)
  • IoC / DI 实操
  • 一、Python开发准备
  • 《IDEA 突然“三无”?三秒找回消失的绿色启动键、主菜单和项目树!》
  • 解释 ICT, Web2.0, Web3.0 这些术语的中文含义
  • 区块链web3项目实战-Truffle petshop
  • 区块链学习笔记
  • NFT盗窃潮:法律视野下的区块链取证技术与数字资产保卫战
  • 数据分析:合并二
  • 怎么生成qt的pro文件
  • ChatGPT全面支持MCP,带来更多可能性
  • Qt第一课:Qt是什么?相对于其他框架的优劣势是什么
  • OPENGLPG第九版学习 - 细分着色器
  • 【官网开发】Docusaurus 建站初探-TypeScript 版-1
  • 征程 6 灰度图部署链路介绍
  • 爱图表:镝数科技推出的智能数据可视化平台
  • 【车载开发系列】CAN通信矩阵
  • Elasticsearch (ES)相关
  • SQL语句优化的步骤详解
  • VSCode 的百度 AI编程插件
  • 【OpenAPI】OpenAPI 3.0x 格式解析技术指南
  • leetcode 14 最长的公共前缀
  • B. Bobritto Bandito
  • 体会bootstrap