2011-04-07 10 views

Respuesta

15

Si necesita multitouch, incluyen:

<uses-feature android:name="android.hardware.touchscreen.multitouch" /> 

en su manifest. Su aplicación no aparecerá en la lista de Market para dispositivos que carecen de multitouch.

Si desea admitir condicionalmente multitouch, use PackageManager y hasSystemFeature() para ver si android.hardware.touchscreen.multitouch está disponible.

+2

¿Qué tan común es actualmente que un androide no admita multitáctil? –

+0

@SSHEsto: Google TV no. También hay diferentes niveles de multitouch (por ejemplo, "jazzhands" para admitir 10 toques simultáneos), para aquellas aplicaciones con necesidades específicas (por ejemplo, simuladores de teclado de piano). – CommonsWare

+0

¡Gracias por la respuesta! Tu respuesta me ayudó mucho –

9

Un ejemplo rápido:

boolean multi = 
getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH); 
1
public final String SUPPORT = "Supported"; 
public final String NOT_SUPPORT = "None"; 

if (getPackageManager().hasSystemFeature(
       PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH)) { 
      aDisplayInfo.multiTouch = SUPPORT; 
     } else { 
      aDisplayInfo.multiTouch = NOT_SUPPORT; 
     } 
Cuestiones relacionadas