Android 默认把触摸屏show touches打开

weiqifa@weiqifa-Inspiron-3847:~/weiqifa/new_tm100/tm100$ git diff packages/apps/Settings/src/com/android/settings/DevelopmentSettings.java
diff --git a/packages/apps/Settings/src/com/android/settings/DevelopmentSettings.java b/packages/apps/Settings/src/com/android/settings/DevelopmentSettings.java
index 2ac79ce..b87d98b 100644
--- a/packages/apps/Settings/src/com/android/settings/DevelopmentSettings.java
+++ b/packages/apps/Settings/src/com/android/settings/DevelopmentSettings.java
@@ -321,6 +321,9 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
             mAllPrefs.add(hdcpChecking);
             removePreferenceForProduction(hdcpChecking);
         }
+       
+        Settings.System.putInt(getActivity().getContentResolver(),
+                Settings.System.SHOW_TOUCHES, 1);
     }
 
     private ListPreference addListPreference(String prefKey) {


Settings.System.putInt这个函数来设置,最后一个参数是0就是不选择,要不然就是选择复选框, 


我把这段代码加在了onCreate的函数里面,启动的时候就会调用。

你可能感兴趣的:(Android 默认把触摸屏show touches打开)