android

Android Application Drawer: dealing with configuration changes

We have gone a long way with the Application Drawer pattern on Android but there is always stuff to cover. On the previous posts we covered how to create a very simple and and then a more complicated one.

This time I want to show you how to deal with configuration changes and the application drawer.

A “configuration change” is an event that will destroy and recreate the Activity object. This means the views and variables of this object will be cleared. Following the samples we have been discussing, this means your Application bar state will be affected since we change how it behaves depending on the type of fragment we are in (a root fragment with the hamburger, or a sub section fragment that uses a back arrow instead).

Continue reading “Android Application Drawer: dealing with configuration changes”

Advertisements
android

Android Tutorial: Drawer and Fragment navigation made easy(ier….)

Hey, this time I want to write a bit about the Drawer design pattern in Android. If you have played with this I’m sure you have faced one or more issues regarding navigation (and the fragment’s back stack). I believe this tend to happen because we are used to let Android navigate those view stacks but when you transition to fragment transactions you are forced to pay attention to this.

You will find the code for this blog post here:

https://github.com/aarcoraci/fragment-navigation-simple

Note: this article has a “part 2” that improves on this code. You should still go through this post first.

Part 2:  Android Drawer and Fragment Navigation. A more “real life” scenario

Continue reading “Android Tutorial: Drawer and Fragment navigation made easy(ier….)”