Turn an ArrayList into an Array
In Java and Android, Arrays have a fixed length. Coming from Perl and PHP where arrays can grow and shrink without needing to be redefined, this concept presented challenges while defining arrays. Enter the ArrayList. Unlike Java's and Android's Arrays, whose size doesn't change, you can add or remove elements in an ArrayList dynamically.
However, several of the methods I'm using require Arrays and not ArrayLists. You may also want to convert an ArrayList to an Array because some operations can be faster with an Array. Fortunately, there's a simple call that will convert an ArrayList to an Array, here's how:
Weekend Learning Android
Last weekend I decided to sit down and learn to program for Android. If you're familiar with C or C++ and object-oriented programming, Android development should be a breeze. I, however, knew nothing of any of these. Fortunately, Dan is an excellent teacher and, while I don't have much experience with "real" programming languages, I often write Perl and PHP at work so I have some very basic understanding of the concepts. Getting into the habit of using strict in Perl (a pragma that makes you delcare your variables in the scope you'll be using it) has been helpful because you have to declare EVERYTHING in Java (the primary language Android SDK uses).
I came across a couple issues installing the SDK and getting Eclipse running for Android, which I'll post later for those seeking help, but the process mildly time consuming and relatively painless.