I think that this code should be in an other activity just to explain that the framework also can do that, so I suggest to move this code to a new activity in the examples project.