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

网站短链接怎么做网页版微信怎么登陆

网站短链接怎么做,网页版微信怎么登陆,网站正建设中,做款app多少钱最近处理一个问题,设备有方向键盘,做cit中的按键测试,发现按方向键第一次按键不能触发该键值,而是让屏幕第一个按钮获取焦点,然后再次按键,则其他正常。问题:进入界面第一次按键就要响应对应按键…


最近处理一个问题,设备有方向键盘,做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~

http://www.yayakq.cn/news/115090/

相关文章:

  • 忘了网站链接怎么做网站建设方案模板范文
  • 金耀网站建设阿里云iis放网站
  • 天津网站制作维护东莞规划局官方网站
  • 青岛网站推广优化网站软文制作
  • 网站倒计时怎么做四川省建设厅官方网站信息查询
  • 建立网站的注意事项深圳有哪些大公司
  • 做个网站一年要多少钱横沥仿做网站
  • 信息化建设网站范本网站建设外包服务
  • 公司做自己的网站网站源码建站视频教程
  • 网站后台上传的照片模糊网站建设装什么系统
  • 云南营销型网站建设企业网站推广的方法
  • 企业网站排名提升软件智能优化网站建设服务器维护内容
  • 东莞企石网站建设空间建设网站
  • 网站建立的意义国外做仿牌网站
  • 江西个人网站备案做论坛模板网站新增备案两次都未通过网站也打不开
  • 自适应网站欣赏定制网站设计
  • 服务器怎么放网站吗网站开发与设计实训心得两千字
  • 购物软件有哪些网站seo快速排名优化的软件
  • 黄山网站建设电话做网站营业执照经营范围怎么填写
  • 建设电商网站需要多少钱wordpress模块插件
  • 网站主机免费申请龙岩一中网站
  • wordpress图片优化插件衡水seo排名
  • 做虾网站该起啥名好杭州婚恋网站建设
  • 学做美食视频在哪个网站大创项目做英语网站
  • 在公司的小语种网站上首钢建设一公司网站
  • 专业的销售网站网站建设推广公司排名
  • 建材网站方案出口网站平台
  • 个人介绍网站模板做网站会什么
  • 海南网站建设哪里有毕设做网站类型
  • 专注七星彩网站开发出租公众号网站怎么做的