-
This
onKeyDown(int, KeyEvent)callback method will be called anytime a button is pressed while in the Activity. The condition inside uses theKeyEventto check whether the key pressed is the BACK button and whether theWebViewis actually capable of navigating back (if it has a history). If both are true, then thegoBack()method is called, which will navigate back one step in theWebViewhistory.Returningtrueindicates that the event has been handled. If this condition is not met, then the event is sent back to the system.Run the application again. You'll now be able to follow links and navigate back through the page history.
Use o shouldOverrideUrlLoading do WebViewClient.Thiago--2012/2/27 Leonardo Compiler <leo.compiler@gmail.com>
Basicamente você quer capturar os eventos (FILTRADOS tipo links clicados ) em um componente webview ??Legal !! Já pensei nisto !Em 27 de fevereiro de 2012 16:36, Renan Henrique Pereira de Lima <renan.lima90@gmail.com> escreveu:
Olá a todos,Gostaria de saber se é possível, numa WebView, gerenciar os links da página como se fossem botões. Exemplo: na minha página, tenho uma figura que representa um link. Ao clicar neste link, poderia trabalhar com esse evento como se estivesse utilizando um OnClickListener? Observem que não quero UTILIZAR o OnClickListener, quero trabalhar de forma semelhante apenas.Alguma idéia se isso é possível?Grande abraço,Renan
Thiago Rosa






0 comentários:
Postar um comentário