There really is a fantastic shmancy function in java that you should use.
ArrayList has an instance method called
indexOf(Object o)
(http://docs.oracle.com/javase/6/docs/api/java/util/ArrayList.html)
You can call it _categories as follows:
_categories.indexOf("camels")
I have no Android programming experience, but this will work for a standard Java application.
Good luck.
klyngbaek Dec 08 '11 at 23:15 2011-12-08 23:15
source share