I didn’t do much today. I spent almost the whole day playing skyrim but right now I’ve been able to do some things.
I continued with the video tutorials of TheNewBoston. I created a menu for my app, which uses a special child class of activity called ListActivity. You create an array in order for the activity to show the menu. Then that array gets used by the setListAdapter method from the ListActivity class to provide the cursor for the menu. From there you define inside the method onListItemClick that when you click an item from the menu, it must take you to that activity.
[slideshow]
So I had to change the flow of activities as well. Now the launcher activity or the one that starts is the menu, then you can choose +- 1(or in the future other activities) and the title screen will appear first, followed by the actual activity. since I had to do that, I decided to refactor some class names and xml file names. What followed was a bunch of errors everywhere so I spent quite a while correcting them. But I couldn’t correct a peculiar one, eclipse told me that it couldn’t find R in R.layout. It was constantly trying to import android.R but that was not a class I needed. After a while I figured out that something was wrong in an xml file name I was trying to use for setContentView, I was using upper case which is not possible for xml files. At least I got to know the debugger better.
After that I worked a bit more on xml, discovered how beautiful android:padding and android:weightSum are.
Leave a Reply