I got a problem since several days now and tried out almost everything. I'd really appreciate any help:
I'm implementing a small mp3-player to get into Android development. This player supplies the user with two different playback screens (different layouts etc.). Hence, I developed a class called PlaybackActivity which provides all necessary methods for music playback and retrieving metadata and 2 other classes, one for each playback mode. Those classes inherit from PlaybackActivity and define their layout in their own onCreate-Method.
So far, so good. Everything, also the playback, works fine. But: When one track finishes (in the PlaybackActivity), there's a need to set the view elements of its child class to the new metadata. Unfortunately, I've got no idea how-to do so.
One of the things I tried: Declaring PlaybackActivity as abstract class with a method "setMetadata()", then implementing this method in its child classes. Then I call this method in the parent class and in eclipse debug, it correctly jumps into the implemented version of its child class. There, I tried to retrieve the views by findViewById - but: they're null! When I do a setContentView(Layout) before, they're initialised, but I don't see any changes in the output. It's as if I'm dealing with 2 activities, but I don't know why.
Thank you very much for your ideas!