Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Ação quando aparecer o teclado

Não lembro :( E não tenho mais o cõdigo.
Mas provavelmente, sim, pois lembro que eu usava o GlobalLayoutListener :)

Em 4 de maio de 2015 17:41, Everton Machado <evertonrm89@gmail.com> escreveu:
Voces implementaram dessa forma Douglas e jade???

final
 View activityRootView = findViewById(R.id.activityRoot);
activityRootView.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
    @Override
    public void onGlobalLayout() {
        int heightDiff = activityRootView.getRootView().getHeight() - activityRootView.getHeight();
        if (heightDiff > 100) { // if more than 100 pixels, its probably a keyboard...
            //... do something here
        }
     }
});

Em segunda-feira, 4 de maio de 2015 07:28:00 UTC-3, Douglas Drumond escreveu:
Não diretamente. Vc pode escutar onGlobalLayoutListener, ver a diferença de altura na variação do layout e "chutar" que foi teclado aparecendo.


2015-05-04 2:23 GMT-03:00 Everton Machado <evert...@gmail.com>:
Ola
Gostaria de saber se tem como pegar o evento de quando aparece o teclado, pois tenho uma tela onde tenho dois fragments, um com os dados e outro com o botão salvar e cancelar, gostaria de esconder o fragment dos botões quando aparecer o teclado!!

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Em segunda-feira, 4 de maio de 2015 07:28:00 UTC-3, Douglas Drumond escreveu:
Não diretamente. Vc pode escutar onGlobalLayoutListener, ver a diferença de altura na variação do layout e "chutar" que foi teclado aparecendo.


2015-05-04 2:23 GMT-03:00 Everton Machado <evert...@gmail.com>:
Ola
Gostaria de saber se tem como pegar o evento de quando aparece o teclado, pois tenho uma tela onde tenho dois fragments, um com os dados e outro com o botão salvar e cancelar, gostaria de esconder o fragment dos botões quando aparecer o teclado!!

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jade Moreira da Costa

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário