title: Setting text to name of sound file
body: <p>I have an app which plays a random sound from my raw folder on the clicking of a button. It works fine, but my attempt to set the text on the button as the next file name fails. Am I far off?
  Also, how would I play through the files in order rather than randomly? Thanks, please be gentle.</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      Button sound = (Button) findViewById(R.id.button1);
      sound.setOnClickListener(new View.OnClickListener() {
  
          final int[] btns = new int[]{R.raw.sound1, R.raw.sound2, R.raw.sound3, R.raw.sound4, R.raw.sound5, R.raw.sound6, R.raw.sound7, R.raw.sound8, R.raw.sound9, R.raw.sound10, R.raw.sound11, R.raw.sound12, R.raw.sound13, R.raw.sound14, R.raw.sound15, R.raw.sound16, R.raw.sound17, R.raw.sound18, R.raw.sound19, R.raw.sound20, R.raw.sound21, R.raw.sound22, R.raw.sound23, R.raw.sound24, R.raw.sound25, R.raw.sound26, R.raw.sound27, R.raw.sound28, R.raw.sound29, R.raw.sound30, R.raw.sound31, R.raw.sound32, R.raw.sound33, R.raw.sound34, R.raw.sound35, R.raw.sound36, R.raw.sound37, R.raw.sound38, R.raw.sound39, R.raw.sound40, R.raw.sound41, R.raw.sound42, R.raw.sound43, R.raw.sound44, R.raw.sound45, R.raw.sound46, R.raw.sound47, R.raw.sound48, R.raw.sound49, R.raw.sound50 };
  
          private Random rnd = new Random();
  
          @Override
          public void onClick(View v) {
              ((Button) v).setText(rnd);
              int sndToPlay = rnd.nextInt(btns.length);
              final MediaPlayer mp = MediaPlayer.createMainActivity.this, btns[sndToPlay]);
              mp.start();
          }
      );
  }
  </code></pre>