Tip about the Handling Configuration Changes in a Relationship between Activities and Fragments

I've sometimes posted about configuration changes, screen rotations and etc, but now I will write about a mistake that I made at the beginning when this handling involves Activity and Fragments. Let's take as example a simple Activity with a Fragment. We have to handle the configuration changes of the activity and the fragment and … Continue lendo Tip about the Handling Configuration Changes in a Relationship between Activities and Fragments

Can not perform this action after onSaveInstanceState

I've faced this problem sometimes but I've never written about it. It's very interesting because it proves that the Android avoid at all costs lose the state of the activity. This error commonly happens when you try to commit a fragment transaction after the onSaveInstanceState() be called, in other words, when you do it in … Continue lendo Can not perform this action after onSaveInstanceState

O método onPause() do Ciclo de Vida de uma Activity

Ainda lendo o livro que comentei no meu último post, um trecho me lembrou de um ponto muito importante sobre o método onPause() que faz parte do ciclo de vida de uma Activity e que muita das vezes não damos o devido valor. "É importante saber que onPause() é sua última oportunidade para limpar e … Continue lendo O método onPause() do Ciclo de Vida de uma Activity