A Few More Things To Note
When using lists it is important to know what the underlying data source looks like. For example, an array of strings (like the one we used in episode #7) is easy to use but on the other hand it is also an immutable object and thus cannot be used if you want to be able to remove items from the list. Therefore you have to either use a different data source or you have to convert your existing array to a mutable object. In this tutorial I will show you how to convert the array from episode #7 to an ArrayList, that can then be used as a new data source for our list.
The Tutorial
If you have a question, criticism or any kind of suggestion, please feel free to leave a comment below. I alway appreciate feedback.
You can find the project files for this tutorial here: Episode #9 Project Files (.zip)
- Episode #6 – Notification & Long Clicks
- Episode #10 – Intents: An Introduction
- Episode #7 – Using Basic Lists
- Quick Tip #2 – Sorting Lists
- Episode #8 – The Alert Dialog
- Episode #11 – Intents: Multi Activity Applications
- Episode #3 – Using Buttons
- Episode #5 – Using Radio Buttons
- Episode #2 – Create A New Project And Run It
- Episode #4 – Checkboxes & Complex Layouts

Comments
joshua
11/01/2009 – 4:48 amGreat Stuff.
do you plan to develop more?
Mathias Reisch
11/01/2009 – 1:51 pm@joshua: Thank you very much! And yes, there will definitely be more tutorials coming up.
KC
03/05/2010 – 12:09 pmExcellent job! All very clear except: Why Toast.makeText has to use getApplicationContext() instead of context in AlertDialog.Builder() ?
Thx for the video!
John
03/31/2010 – 8:10 pmGreat Mathias! the people ask for new tutorials!!!!!
Hannes
05/28/2010 – 12:21 amjust for the record, as in addition to the context variable that is stored to access the instance of episode9.class, you can refference the ‘this’ from inside the inner scope by typing episode9.this. method or variable
at least i thought you could do so. but the appointed way of refferencing these variables is the most common and maybe the best practice, i don’t know, what do you think?
pranay
06/06/2010 – 7:51 amits really great and useful , could you please give a tutorial on using databases in android?
Mathias Reisch
06/06/2010 – 4:02 pmYo will be happy to hear that an introduction to using databases with Android is coming up next.
Stefan
07/14/2010 – 2:20 pmGreat tutorials!
I wonder if you will make a tutorial on how to parse XML?!
Mathias Reisch
07/14/2010 – 9:57 pmHi Stefan,
parsing XML is not really related to Android development but I might slip in some sort of quick tip on how to parse XML with Java.
vinay
07/28/2010 – 7:47 amvery helpful..
thank you so much..
Joseph
08/04/2010 – 7:45 pmHi Math! Another great turial. Everything is clear except Context.
Does the context after initialization
” private final Context context = this; ”
contain the same value as
getApplicationContext() method returns?
Why don’t you just use variable context when creating toast in the 8th minute of this tutorial?
Thanks
Jake
08/20/2010 – 7:03 pmWhat would I do to go from one list and be able to click on a subject then for it to forward to another list or actual data? I cannot find anywhere to do this. Thanks
Mathias Reisch
08/20/2010 – 10:38 pmHi Jake,
you should take a look at ‘Intents’ (covered in episode #10 and #11).
Greetings,
Mathias
Sanket
09/17/2010 – 5:45 amAwesome tutorials… I m loving it… Wonderful explanation..
sabine
09/23/2010 – 12:57 amFirst of all thanks Mathias for these great tutorials. Those are really a good way to start.
shree
12/21/2010 – 1:41 amEpisode #7 – Using Basic Lists & 8 are only half videos. ls upload full videos na.
Chris
01/18/2011 – 1:49 pmHi Mathias,
thank you for these great tutorials!
I have one question about this tutorial.
If I have multiple items of the same name in the list, always the first entry is been removed from the adapter.
The adapter.remove() function seems not to check the equality of the string object but of the string itself.
I tried playing around by removing the item from the ArrayList but the adapter seems to with a clone of this list and not the list itself.
Is there a workaround
Thank you!
PS: If you’re answering via mail, you can answer in german.
Oleksandr
01/18/2011 – 3:02 pmThanks, pal. Your tutorials accelerate study. Thanks from Ukraine.
Tu Cao Huu
02/04/2011 – 5:17 pmThanks a lot!
Sairam
02/05/2011 – 12:13 amhi mathias,I would love to see some tutorials on sensors. especially related accelerometer..
Hammad
02/18/2011 – 3:09 pmGreat Lecture ,,put some more in depth lecture like that ,,, regards HK.
Sunny
02/18/2011 – 11:53 pmHello Mathias, I became a fan of your videos !!!
I wanted to share an idea with you to make the tutorials more interactive and effective learning.
gil
02/21/2011 – 7:53 pmthx alot hope to see some more tuts in the future
Nguyen Hoang Nam
02/27/2011 – 5:51 pmIt’s great.
Thank you so much!
me
03/19/2011 – 2:28 amHello,
Thank You for tutorials I like them all in this site.
I want to ask simple question..
How to make clickable and linked to another list?
Nishant
05/17/2011 – 9:26 pmi can not gaet this video.it’s showing me ‘the video is unavailable’