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

做企业网站赚钱吗软文自助发稿平台

做企业网站赚钱吗,软文自助发稿平台,怎么免费建立网站做推广,wordpress前后台空白最近处理一个问题,设备有方向键盘,做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.dinnco.com/news/45710.html

相关文章:

  • 珠海建网站首页排名关键词优化
  • 万网域名预定北京中文seo
  • 西安专业做网站的公司百度竞价推广方法
  • 办一个购物网站要多少钱优秀网站seo报价
  • 企业做app好还是网站好网络营销的六大特征
  • 学历提升的重要性余姚网站如何进行优化
  • 高端大气的网站制作陕西seo公司
  • 南昌如何做百度的网站seo流量增加软件
  • 个人 网站备案 幕布东莞seo优化seo关键词
  • 重庆网站设计制作价格谷歌搜索入口手机版
  • 让自己的网站收录官网排名优化
  • 网站开发西安中软推广优化网站排名
  • 哪个浏览器可以做网站seo建站优化推广
  • WordPress插件手动爱站seo工具包
  • wordpress 给文章添加幻灯武汉网络优化知名乐云seo
  • 高清素材图片的网站百度首页排名怎么做到
  • 做网站网页需要学些什么百度地址
  • 南京网站开发南京乐识赞网站seo方案模板
  • 网站建设衤金手指花总十四上海aso苹果关键词优化
  • php做的网站怎么入侵微信小程序官网
  • wordpress采集站广东互联网网络营销推广
  • 桥头镇做网站0元入驻的电商平台
  • 设计师接单的十个网站正规接单赚佣金的app
  • 典当行 网站百度官方网站登录
  • 网络公司是什么意思推广seo公司
  • 通州区网站制作网络公司排名
  • 手机网站服务器开封网络推广公司
  • 松原市住房和城乡建设厅网站网络推广的优势
  • 做面膜的网站百度代理查询
  • 重庆网站推广专员重庆网站设计