A lot of people have followed the tutorial in Google for making Tab’s layout in Android. I followed the guide but soon got into strange errors..
Bumping my head against the keyboard of reason that I did not find where the errors where, that was the cause of the application to crash each time.
For those that still have problems, here is some change of the code that must be made:
When creating your activities in the manifest file (AndroidManifest.xml), it should looks like this afterwords:
The text says that only create ic_tab_artist.xml file, but you will need to create the once for both songs and albums. Therefore create ic_tab_songs.xml and ic_tab_albums.xml and dublicate the data from ic_tab_artists.xml into both these new files.
The third to last line under /res/layout/main has a typo, it should be a ; instead of an :
There is an error when calling mTabHost, it should be tabHost.
Then on the last line there is a fault, when using getIntent().
Change this to: