[android-developers] Re: Help with strings/arrays

2011-02-08 Thread Sarwar Erfan
Here is a simple solution: Add a method which takes the level number integer. Then, depending on the value of the level number, call the appropriate level function. When level N is pressed, you call level(N) class YourClassHavingLevelMethods { public static void level(int x) {

[android-developers] Re: Help with strings/arrays

2011-02-08 Thread JAlexoid (Aleksandr Panzin)
A) Use reflection B) There is this thing called polymorphism. Setup your array as LevelHandler[] handlers = new LevelHandler[]{new Level0Handler(), new Level1Handler(),...} On 8 фев, 07:15, brian purgert brianpurge...@gmail.com wrote: this should be simple for you guys but i,ve always been