Android: handle onItemClick() in listView-based app
<p>I'm new to Android. I'm working on a listView-based app: you have a main menu, when you click an item, a new activity starts with another menu; when you click again, a new activity starts with the content you selected. Since I've quite a lot of menu items, I've to create a listener which handles all possible cases, so I've something similar:</p>

<pre><code>    @Override public void onItemClick(AdapterView&lt;?&gt; listAdapter, View v, int position, long id) {              
       String text = ((TextView)v).getText().toString();
       //main menu
       if (text.equals(K.getStringById(K.ID_MAIN_THEORY))) {
          ...
       } else if (text.equals(K.getStringById(K.ID_MAIN_EXERCISE))) {
          ...
       }
       else if (text.equals(K.getStringById(K.ID_MAIN_TABLES))) {
          ...
       }
       //here other menus' items: lots of items
       ...
       //back item
       else if (text.equals(K.getStringById(K.ID_BACK))) {
          activity.finish();
       }

       Intent i = new Intent(...);
       startActivity(i);
    }
* K is a class that holds ids' references
</code></pre>

<p>There's a way I can avoid hard-coding listener behavior?</p>

<p>** PS: the lists' TextViews don't render properly: text appears light grey, not black! O.o</p>
