Namespaces
Variants
Actions

Archived:Como verificar se o aparelho tem tela sensível ao toque com PySymbian

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.


Dados do artigo

Testado com
Aparelho(s): Nokia N95, Nokia 5800 XpressMusic

Compatibilidade
Plataforma(s): S60 3rd Edition, S60 5th Edition

Artigo
Palavras-chave: appuifw
Tradução:
Última alteração feita por hamishwillee em 07 May 2013


Contents

Introdução

Este trecho de código mostra como verificar se é possível usar eventos de toque ('touch screen') na aplicação, com Python.

Pre-condições

A API está disponível para S60 3rd Edition e S60 5th Edition a partir do PySymbian 1.9.3.

Código fonte

import appuifw
 
 
# O bloco try/except é usado para evitar que a aplicação voe caso a versão do Python seja anterior à 1.9.3
try:
if appuifw.touch_enabled():
appuifw.note(u"Eventos de toque podem ser usados")
else:
appuifw.note(u"Eventos de toque NÃO podem ser usados")
except:
appuifw.note(u"Funcionalide não disponível")

Pós-condições

Uma mensagem é exibida, dizendo se a funcionalidade está ou não disponível.

This page was last modified on 7 May 2013, at 14:05.
187 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved