title: Not sure how to reference stringArray in main thread
body: <p>As you can see I've been chopping and altering snippets of code I've found all over the place, and it's taken ages! </p>
  
  <p>I'm stuck on the context menu which isn't capturing the touch selection when an item is selected, and eclipse is showing an error which I'm not sure how to correct. </p>
  
  <p>I'm not sure how to reference the array list in the main thread, I know how to do it if it's an array from a string, but not on main thread.</p>
  
  <p>The line with <strong><em>*</em></strong> is the one that gives the error.</p>
  
  <p>Just wondering if someone could take a peek at it?</p>
  
  <pre><code>import java.util.ArrayList;
  import android.app.ListActivity;
  import android.media.MediaPlayer;
  import android.os.Bundle;
  import android.view.ContextMenu;
  import android.view.ContextMenu.ContextMenuInfo;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.AdapterView.AdapterContextMenuInfo;
  import android.widget.ListView;
  import android.widget.Toast;
  public class MainActivity extends ListActivity {
  private ArrayList&lt;Sound&gt; mSounds = null;
  private SoundAdapter mAdapter = null;
  static MediaPlayer mMediaPlayer = null;
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  registerForContextMenu(getListView());
  this.getListView().setSelector(R.drawable.selector);
  mSounds = new ArrayList&lt;Sound&gt;();
  mSounds.add(s);
  s = new Sound();
  s.setDescription("Echoex");
  s.setSoundResourceId(R.raw.echoex);
  mSounds.add(s);
  s = new Sound();
  s.setDescription("Edge");
  s.setSoundResourceId(R.raw.edge);
  mSounds.add(s);
  s = new Sound();
  s.setDescription("Enterprise");
  s.setSoundResourceId(R.raw.enterprise);
  mSounds.add(s);
  s = new Sound();
  s.setDescription("Envy");
  s.setSoundResourceId(R.raw.envy);
  mSounds.add(s);
  s = new Sound();
  s.setDescription("Etcher");
  s.setSoundResourceId(R.raw.etcher);
  mSounds.add(s);
  mAdapter = new SoundAdapter(this, R.layout.list_row, mSounds);
  setListAdapter(mAdapter);
  }
  @Override
  public void onListItemClick(ListView parent, View v, int position, long id){
  Sound s = (Sound) mSounds.get(position);
  MediaPlayer mp = MediaPlayer.create(this, s.getSoundResourceId());
  mp.start();
  
  }@Override
  public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
      super.onCreateContextMenu(menu, v, menuInfo);
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.context_menu, menu);
    }
  @Override
  public boolean onContextItemSelected(MenuItem item) {
      AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
      ********String[] names = getResources().getString(R.array.mSounds);
      switch(item.getItemId()) {
      case R.id.setasnotification:
            Toast.makeText(this, "Applying " + getResources().getString(R.string.setas) +
                        " context menu option for " + names[(int)info.id],
                        Toast.LENGTH_SHORT).show();
            return true;
      default:
            return super.onContextItemSelected(item);
      }
  }}
  </code></pre>
  
  <p>Sound.java:</p>
  
  <pre><code>public class Sound {
  private String mDescription = "";
  private int mSoundResourceId = -1;
  private int mIconResourceId = -1;
  public void setDescription(String description) { mDescription = description; }
  public String getDescription() { return mDescription; }
  public void setSoundResourceId(int id) { mSoundResourceId = id; }
  public int getSoundResourceId() { return mSoundResourceId; }
  public void setIconResourceId(int id) { mIconResourceId = id; }
  public int getIconResourceId() { return mIconResourceId; }
  }
  </code></pre>