validationtools中按键测试选项光标移除
最近处理一个问题,设备有方向键盘,做cit中的按键测试,发现按方向键第一次按键不能触发该键值,而是让屏幕第一个按钮获取焦点,然后再次按键,则其他正常。问题:进入界面第一次按键就要响应对应按键逻辑,不需要焦点。该问题查找了很久,最后找到了答案!
布局中的按键测试布局中按钮是button或imagebutton。这布局进入时,初次会相应方向键(原理未知),解决方案:设置所有按钮clickable=false(防止触屏幕激发),主要的是将所有按钮设置
enable=false(imagebutton在xml中设置无效,需要在代码中设置)
修改如下
Date: Wed Aug 28 18:38:33 2024 +0800处理按键测试按钮获取焦点问题Change-Id: I6f317fec43c213761573fb793bc057fd14da71aediff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8e8eb03..23abed9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -87,7 +87,7 @@<dataandroid:host="83789"android:scheme="unisoc_secret_code" />
- </intent-filter>
+ </intent-filter> </receiver><receiverandroid:name="com.sprd.validationtools.PhaseCheckBroadcastReceiver"
diff --git a/res/layout/key_test.xml b/res/layout/key_test.xml
index 53eba2e..16f2164 100644
--- a/res/layout/key_test.xml
+++ b/res/layout/key_test.xml
@@ -3,12 +3,6 @@android:layout_width="fill_parent"android:layout_height="fill_parent"android:orientation="vertical" >
- <Button
- android:id="@+id/focus_button"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:clickable="false" >
- </Button><LinearLayoutandroid:layout_width="fill_parent"
@@ -21,6 +15,7 @@android:layout_height="wrap_content"android:layout_weight="1" android:clickable="false"
+ android:enabled="false" android:src="@drawable/voice_up" /> <ImageButton
@@ -28,6 +23,7 @@ android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1"
+ android:enabled="false" android:clickable="false" android:src="@drawable/voice_down" /> <ImageButton
@@ -36,6 +32,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false" android:src="@drawable/power_off" /> </LinearLayout>
@@ -69,6 +66,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false" android:gravity="center" android:text="CALL" /> @@ -78,6 +76,8 @@ android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center"
+ android:enabled="false"
+ android:clickable="false" android:src="@drawable/menu" android:visibility="visible" /> @@ -87,6 +87,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false" android:src="@drawable/camera" /> <ImageButton android:id="@+id/home_button"
@@ -95,6 +96,7 @@ android:layout_weight="1" android:clickable="false" android:gravity="center"
+ android:enabled="false" android:src="@drawable/home" /> </LinearLayout>
@@ -110,6 +112,9 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false"
+
+ android:text="PTT" /> <Button
@@ -118,6 +123,8 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false"
+ android:text="SOS" /> <ImageButton android:id="@+id/back_button"
@@ -125,6 +132,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false" android:gravity="center" android:src="@drawable/back" android:visibility="visible" />
@@ -134,6 +142,7 @@ android:layout_weight="1" android:layout_height="wrap_content" android:clickable="false"
+ android:enabled="false" android:gravity="center" android:text="Fn" android:visibility="visible" />
@@ -150,6 +159,9 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false"
+
+ android:text="VIDEO" /> <Button
@@ -158,6 +170,8 @@ android:layout_height="wrap_content" android:layout_weight="1" android:clickable="false"
+ android:enabled="false"
+ android:text="LIGHT" /> </LinearLayout>
@@ -181,6 +195,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false"
+ android:focusable="false"
+ android:enabled="false"
+ android:focusableInTouchMode="false" android:src="@drawable/up" /> <LinearLayout
@@ -199,6 +216,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false"
+ android:enabled="false"
+ android:focusable="false"
+ android:focusableInTouchMode="false" android:src="@drawable/left" /> <ImageButton
@@ -206,6 +226,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false"
+ android:focusable="false"
+ android:enabled="false"
+ android:focusableInTouchMode="false" android:src="@drawable/center" /> <ImageButton
@@ -213,6 +236,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false"
+ android:focusable="false"
+ android:enabled="false"
+ android:focusableInTouchMode="false" android:src="@drawable/right" /> </LinearLayout> @@ -227,6 +253,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="false"
+ android:focusable="false"
+ android:enabled="false"
+ android:focusableInTouchMode="false" android:src="@drawable/down" /> </LinearLayout> </LinearLayout>
@@ -249,6 +278,7 @@ android:layout_width="180dip" android:layout_height="wrap_content" android:clickable="false"
+ android:enabled="false" android:text="@string/ai_key_test" /> </LinearLayout> </LinearLayout>
diff --git a/src/com/sprd/validationtools/itemstest/audio/PhoneLoopBackTest.java b/src/com/sprd/validationtools/itemstest/audio/PhoneLoopBackTest.java
index d45d9b8..7b8696c 100644
--- a/src/com/sprd/validationtools/itemstest/audio/PhoneLoopBackTest.java
+++ b/src/com/sprd/validationtools/itemstest/audio/PhoneLoopBackTest.java
@@ -83,17 +83,21 @@ public class PhoneLoopBackTest extends BaseActivity { mRadioSpeaker.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
+ Log.d(TAG, "mRadioSpeaker click---");
+ switchLoopback(LOOPBACK_SPEAKER); } }); mRadioReceiver.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
+ Log.d(TAG, "mRadioReceiver click---"); switchLoopback(LOOPBACK_RECEIVER); } }); mRadioEarpiece.setOnClickListener(new View.OnClickListener() { public void onClick(View v) {
+ Log.d(TAG, "mRadioEarpiece click---"); switchLoopback(LOOPBACK_MIC_EARPIECE); } });
diff --git a/src/com/sprd/validationtools/itemstest/keypad/KeyTestActivity.java b/src/com/sprd/validationtools/itemstest/keypad/KeyTestActivity.java
index 0139c4e..06f5bd1 100644
--- a/src/com/sprd/validationtools/itemstest/keypad/KeyTestActivity.java
+++ b/src/com/sprd/validationtools/itemstest/keypad/KeyTestActivity.java
@@ -19,6 +19,7 @@ import android.widget.Button; import android.widget.GridLayout; import android.widget.ImageButton; import android.widget.Toast;
+import android.view.WindowManager; import com.sprd.validationtools.BaseActivity; import com.sprd.validationtools.Const;
@@ -118,13 +119,20 @@ public class KeyTestActivity extends BaseActivity { setContentView(R.layout.key_test); setTitle(R.string.key_test); mHomeButton = (ImageButton) findViewById(R.id.home_button);
+ mHomeButton.setEnabled(false); // mMenuButton = (ImageButton) findViewById(R.id.menu_button); mCallButton = (Button) findViewById(R.id.call_button); mVolumeUpButton = (ImageButton) findViewById(R.id.volume_up_button); mVolumeDownButton = (ImageButton) findViewById(R.id.volume_down_button); mCameraButton = (ImageButton) findViewById(R.id.camera_button);
+ mVolumeUpButton.setEnabled(false);
+ mVolumeDownButton.setEnabled(false);
+ mCameraButton.setEnabled(false);
+ mPowerButton = (ImageButton) findViewById(R.id.power_button);
+ mPowerButton.setEnabled(false);
+ mPTTButton = (Button)findViewById(R.id.ptt_button); mSOSButton = (Button)findViewById(R.id.sos_button); @@ -154,10 +162,9 @@ public class KeyTestActivity extends BaseActivity { mVideoButton.setVisibility(View.GONE); mCallButton.setVisibility(View.GONE); - findViewById(R.id.focus_button).requestFocus();
- mFnButton = (Button)findViewById(R.id.fn_button); mMenuButton = (ImageButton)findViewById(R.id.menu_button);
+ mMenuButton.setEnabled(false); mUpButton = (ImageButton)findViewById(R.id.up_button); mDownButton = (ImageButton)findViewById(R.id.down_button);
@@ -165,7 +172,14 @@ public class KeyTestActivity extends BaseActivity { mRightButton = (ImageButton)findViewById(R.id.right_button); mCenterButton = (ImageButton)findViewById(R.id.center_button); mBackButton = (ImageButton)findViewById(R.id.back_button);
-
+ mUpButton.setEnabled(false);
+ mDownButton.setEnabled(false);
+ mLeftButton.setEnabled(false);
+ mRightButton.setEnabled(false);
+ mCenterButton.setEnabled(false);
+ mBackButton.setEnabled(false);
+
+ // mVolumeUpButton.requestFocus(); initSupport(); } }
over~
相关文章:
validationtools中按键测试选项光标移除
最近处理一个问题,设备有方向键盘,做cit中的按键测试,发现按方向键第一次按键不能触发该键值,而是让屏幕第一个按钮获取焦点,然后再次按键,则其他正常。问题:进入界面第一次按键就要响应对应按键…...
【Hot100算法刷题集】哈希-02-字母异位词分组(含排序构造键、自定义键、自定义哈希函数法)
🏠关于专栏:专栏用于记录LeetCode中Hot100专题的所有题目 🎯每日努力一点点,技术变化看得见 题目转载 题目描述 🔒link->题目跳转链接 给你一个字符串数组,请你将 字母异位词 组合在一起。可以按任意顺…...
用华为智驾,开启MPV的下半场
作者 |老缅 编辑 |德新 8月28日,岚图正式对外公布了全球首款搭载华为乾崑智驾和鸿蒙座舱的MPV——全新岚图梦想家。 新车定位「全景豪华科技旗舰MPV」,全系标配四驱,分为四驱鲲鹏版和四驱乾崑版。 其中岚图逍遥座舱和鲲鹏智驾构成的鲲鹏版…...
发烧时眼睛胀痛的多种原因
发烧时眼睛胀痛的多种原因 发烧时眼睛胀痛可能由多种原因引起,主要包括以下几个方面: 上呼吸道感染: 发烧通常由上呼吸道感染引起,如感冒等。这些疾病多由病毒或细菌感染导致,如流感病毒、副流感病毒、腺病毒等。当机…...
用ACF和PACF计算出一堆数据的周期个数以及周期时长,数据分析python
具体步骤 1使用ACF和PACF:可以通过查看ACF图中的周期性峰值,找到数据中的周期性。如果ACF图在某个滞后期处出现显著的正相关峰值,并且这种模式在多个滞后周期中重复出现,这就是周期性信号的特征。而PACF则可以帮助确定延迟的直接影…...
生活方式对人健康影响非常大 第三篇
身体健康因素中 生活方式占到60% 赶紧去调整自己哪错了 上游的生活方式管理 是药三分毒 药物会影响身体肝肾功能,代谢 所以你要去找上游到底是我哪错了 短板越多 个健康状态越差 饮食管理是生活方式管理中难度最大的 原则1:与基因相对应相平衡 只吃素 会导致大脑萎…...
ubuntu22.04 qemu 安装windows on arm虚拟机
ubuntu22.04 qemu 安装windows on arm虚拟机 iso: https://uupdump.net/ https://massgrave.dev/windows_arm_links vivo driver: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.262-2/ qemu sudo apt update sudo a…...
前端框架的演变与选择
目录 前端框架的演变与选择 1. 什么是前端框架? 2. 前端框架的演变 2.1 早期的Web开发 2.2 JavaScript库的兴起 2.3 MVC架构的引入 3. 现代前端框架概览 3.1 React 3.2 Vue.js 3.3 Angular 4. 其他值得关注的前端框架 4.1 Svelte 4.2 Ember.js 5. 如何…...
Oracle(109)如何管理用户密码策略?
管理用户密码策略是确保数据库安全性的重要措施之一。通过定义和实施密码策略,可以确保用户使用强密码,并定期更新密码,以防止未经授权的访问。以下是如何在 MySQL 和 PostgreSQL 中详细配置和管理用户密码策略的步骤和代码示例。 MySQL 用户…...
【重学MySQL】十三、基本的 select 语句
【重学MySQL】十三、基本的 select 语句 基本结构示例检索所有列检索特定列带有条件的检索dual 列的别名基本的列别名使用别名在表达式中的使用别名在聚合函数中的应用 distinct基本用法注意事项示例 空值参与运算数学运算字符串连接比较运算逻辑运算处理NULL的函数 着重号为什…...
vue3.5新特性整理
本文章介绍vue3.5更新的几个新特性 1.vue中watch中深度监听更新的层级 在之前deep 属性是一个boolean值 我们要监听对象的变化需要使用deep: true 在vue3.5之后 deep 也可以是一个number 表示对象要监听的层级数量 这个功能还是比较实用的 因为层级过深的时候我们可能需要监听…...
RK3588 系列之3—rknn使用过程中遇到的bug
RK3588 系列之3—rknn使用过程中遇到的bug 1.librockchip_mpp.so: file format not recognized; treating as linker scrip2.Could not find a package configuration file provided by "OpenCV" with any of the following names参考文献 1.librockchip_…...
Java中的强引用、软引用、弱引用和虚引用于JVM的垃圾回收机制
参考资料 https://juejin.cn/post/7123853933801373733 在 Java 中,引用类型分为四种:强引用(Strong Reference)、软引用(Soft Reference)、弱引用(Weak Reference)和虚引用…...
网络协议的基础知识
前言 本文将详细介绍IP地址、端口号、协议、协议分层、封装、分用、客户端、服务器、请求、响应以及两台主机之间的网络通信流程等网络原理知识。 一、IP 地址 概念 IP地址主要用于标识网络中的主机和其他网络设备(如路由器)的位置。 类似于快递中的…...
Java高级Day37-UDP网络编程
109.netstat指令 netstat -an 可以查看当前主机网络情况,包括端口监听情况和网络连接情况 netstat -an|more 可以分页显示 要求在dos控制台下执行 说明: LISTENING表示某个端口在监听 如果有一个外部程序(客户端)连接到该端口…...
如何利用ChatGPT提升学术论文讨论部分的撰写质量和效率
大家好,感谢关注。我是七哥,一个在高校里不务正业,折腾学术科研AI实操的学术人。关于使用ChatGPT等AI学术科研的相关问题可以和作者七哥(yida985)交流,多多交流,相互成就,共同进步,为大家带来最酷最有效的智能AI学术科研写作攻略。经过数月爆肝,终于完成学术AI使用教…...
谷歌seo网址如何快速被收录?
想让你的网站快速被搜索引擎收录,可以采取几种不同的策略。首先,确保你的网站内容丰富、有价值,搜索引擎更喜欢收录内容质量高的网站。同时,增强网站的外链建设,做好这些站内优化,接下来就是通过谷歌搜索控…...
自动驾驶---什么是Frenet坐标系?
1 背景 为什么提出Frenet坐标系?Frenet坐标系的提出主要是为了解决自动驾驶系统在路径规划的问题,它基于以下几个原因: 符合人类的驾驶习惯: 人类驾驶员在驾驶过程中,通常不会关心自己距离起点的横向和纵向距离&#x…...
如何编写Linux PCI设备驱动器 之一
如何编写Linux PCI设备驱动器 之一 PCI寻址PCI驱动器使用的APIpci_register_driver()pci_driver结构pci_device_id结构 如何查找PCI设备存取PCI配置空间读配置空间APIs写配置空间APIswhere的常量值共用部分类型0类型1 PCI总线通过使用比ISA更高的时钟速率来实现更好的性能&…...
梯度弥散问题及解决方法
梯度弥散问题及解决方法 简要阐述梯度弥散发生的原因以及现象针对不同发生原因有什么解决方案1. 使用ReLU及其变体激活函数2. 权重初始化3. 批量归一化(Batch Normalization)4. 残差连接(Residual Connections)5. 梯度裁剪(Gradient Clipping)简要阐述梯度弥散发生的原因…...
XCTF-web-easyupload
试了试php,php7,pht,phtml等,都没有用 尝试.user.ini 抓包修改将.user.ini修改为jpg图片 在上传一个123.jpg 用蚁剑连接,得到flag...
【入坑系列】TiDB 强制索引在不同库下不生效问题
文章目录 背景SQL 优化情况线上SQL运行情况分析怀疑1:执行计划绑定问题?尝试:SHOW WARNINGS 查看警告探索 TiDB 的 USE_INDEX 写法Hint 不生效问题排查解决参考背景 项目中使用 TiDB 数据库,并对 SQL 进行优化了,添加了强制索引。 UAT 环境已经生效,但 PROD 环境强制索…...
(二)TensorRT-LLM | 模型导出(v0.20.0rc3)
0. 概述 上一节 对安装和使用有个基本介绍。根据这个 issue 的描述,后续 TensorRT-LLM 团队可能更专注于更新和维护 pytorch backend。但 tensorrt backend 作为先前一直开发的工作,其中包含了大量可以学习的地方。本文主要看看它导出模型的部分&#x…...
连锁超市冷库节能解决方案:如何实现超市降本增效
在连锁超市冷库运营中,高能耗、设备损耗快、人工管理低效等问题长期困扰企业。御控冷库节能解决方案通过智能控制化霜、按需化霜、实时监控、故障诊断、自动预警、远程控制开关六大核心技术,实现年省电费15%-60%,且不改动原有装备、安装快捷、…...
如何在看板中有效管理突发紧急任务
在看板中有效管理突发紧急任务需要:设立专门的紧急任务通道、重新调整任务优先级、保持适度的WIP(Work-in-Progress)弹性、优化任务处理流程、提高团队应对突发情况的敏捷性。其中,设立专门的紧急任务通道尤为重要,这能…...
C# 类和继承(抽象类)
抽象类 抽象类是指设计为被继承的类。抽象类只能被用作其他类的基类。 不能创建抽象类的实例。抽象类使用abstract修饰符声明。 抽象类可以包含抽象成员或普通的非抽象成员。抽象类的成员可以是抽象成员和普通带 实现的成员的任意组合。抽象类自己可以派生自另一个抽象类。例…...
ardupilot 开发环境eclipse 中import 缺少C++
目录 文章目录 目录摘要1.修复过程摘要 本节主要解决ardupilot 开发环境eclipse 中import 缺少C++,无法导入ardupilot代码,会引起查看不方便的问题。如下图所示 1.修复过程 0.安装ubuntu 软件中自带的eclipse 1.打开eclipse—Help—install new software 2.在 Work with中…...
《C++ 模板》
目录 函数模板 类模板 非类型模板参数 模板特化 函数模板特化 类模板的特化 模板,就像一个模具,里面可以将不同类型的材料做成一个形状,其分为函数模板和类模板。 函数模板 函数模板可以简化函数重载的代码。格式:templa…...
uniapp 开发ios, xcode 提交app store connect 和 testflight内测
uniapp 中配置 配置manifest 文档:manifest.json 应用配置 | uni-app官网 hbuilderx中本地打包 下载IOS最新SDK 开发环境 | uni小程序SDK hbulderx 版本号:4.66 对应的sdk版本 4.66 两者必须一致 本地打包的资源导入到SDK 导入资源 | uni小程序SDK …...
抽象类和接口(全)
一、抽象类 1.概念:如果⼀个类中没有包含⾜够的信息来描绘⼀个具体的对象,这样的类就是抽象类。 像是没有实际⼯作的⽅法,我们可以把它设计成⼀个抽象⽅法,包含抽象⽅法的类我们称为抽象类。 2.语法 在Java中,⼀个类如果被 abs…...
