Last active
August 29, 2015 14:27
-
-
Save fatorx/ec0c4fcc23daaffc4e65 to your computer and use it in GitHub Desktop.
Pegar a view carregada por uma Activity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
View view = getWindow().getDecorView().findViewById(android.R.id.content); | |
/** | |
* Em alguns casos, é interessante ter acesso a view. Eu seto componentes fora da Activity, em outra classe, | |
* para me organizar melhor, e isso foi de grande ajuda (motivo da solução: usar o Butter Knife fora da activity) | |
* / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment