This part will get the Level list by Mode from the Database and then will display them on the corresponding tabs.

GameSelect.java

We will edit the existing GameSelect.java file and we will add a CustomAdapter called LevelAdapter, which will have the level name, score, ratio and a star. For more information, check the comments and logs inside the code.

After that, we will modify the OnTabChangeListener and the createTabContent method to show the Level list when they are triggered.

Finally, we will add an OnItemClickListener on mListView, which will be responsible for selecting and starting the Level.

level_row.xml

This is our custom row, which will display the level name, level score, level ratio and level star.

strings.xml

Add the following string to your strings.xml file.

SVN Project:

PingPong Madness Tutorial – Part 07 SVN

APK:

PingPong Madness Tutorial – Part 07.apk

Tutorial: