Saltar para conteúdo


Foto
- - - - -

como tirar screenshots dentro da propria app


  • Por favor inicie sessão para responder
Não há respostas a este tópico.

#1 FernandoMiguel

FernandoMiguel

    Mestre de Android

  • Former Staff
  • PipPipPipPipPipPip
  • 9430 mensagens

Mensagem publicada 18 October 2010 - 10:11

If you want to take a screenshot of your own application, you can do this in the code of any of your Activity() classes:...screenshot(getWindow().peekDecorView());... private Bitmap screenshot(View view) { view.setDrawingCacheEnabled(true); Bitmap bitmap = view.getDrawingCache(); view.setDrawingCacheEnabled(false); return bitmap; }There is some side effects with dialogs, but it can solve the problem in 90% of the cases.
  • Mattode gosta disto