title: Sound in raw from EditText Data Storage
body: <p>Excuse me, can you help me. I'm making an application for children learning. The application of writing the alphabet in the form of "EditText". I want this text into sound from /raw. I have A.mp3 - Z.mp3 from /raw</p>
  
  <pre><code>MediaPlayer mplayer;
  Button play;
  
  private final View.OnClickListener playButtonListener = new View.OnClickListener() {
  
      @Override
      public void onClick(View v) {
          // play
          if (mplayer != null) {
              mplayer.start();
  
          }
      }
      };
  
  
       .........
         .........
         .........
  
  
      play = (Button) findViewById(R.id.button1);
      play.setOnClickListener(playButtonListener);
      mplayer = MediaPlayer.create(this, R.raw.(txtToDisplay)); &lt;------- this is error
  
         }
           .........
            .........
           .........
      //prediction.name is data storage
         txtToDisplay = prediction.name;
          showText1.setText(txtToDisplay);
  </code></pre>
  
  <p>My data storage is "prediction.name" or txtToDisplay. Prediction.name is A,B,C,D,E,F,G,H ... ,Z. My sound in /raw A.mp3, B.mp3. C.mp3 ... ,Z.mp3</p>
  
  <p>This is full my java</p>
  
  <pre><code>package com.example.belajargesture;
  
  import java.util.ArrayList;
  import android.app.Activity;
  import android.gesture.Gesture;
  import android.gesture.GestureLibraries;
  import android.gesture.GestureLibrary;
  import android.gesture.GestureOverlayView;
  import android.gesture.Prediction;
  import android.gesture.GestureOverlayView.OnGesturePerformedListener;
  import android.media.MediaPlayer;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  
  
  public class MainActivity extends Activity implements
          OnGesturePerformedListener {
      private GestureLibrary mLibrary;
      EditText showText1;
      String txtToDisplay = "";
      //musik
      MediaPlayer mplayer;
      Button play;
      //musik
  
      //musik
      private final View.OnClickListener playButtonListener = new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // play
              if (mplayer != null) {
                  mplayer.start();
  
              }
          }
      };
      //musik
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          mLibrary = GestureLibraries.fromRawResource(this, R.raw.gestures);
          if (!mLibrary.load()) {
              finish();
          }
  
          GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
          gestures.addOnGesturePerformedListener(this);
  
          //musik
          play = (Button) findViewById(R.id.button1);
          play.setOnClickListener(playButtonListener);
          mplayer = MediaPlayer.create(this, R.raw.a);
          //musik
  
      }
  
      public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture) {
          ArrayList&lt;Prediction&gt; predictions = mLibrary.recognize(gesture);
          showText1 = (EditText) findViewById(R.id.editText1);
          // We want at least one prediction
          if (predictions.size() &gt; 0) {
              Prediction prediction = predictions.get(0);
              // We want at least some confidence in the result
              if (prediction.score &gt; 1.0) {
                  // Show the spell
                  txtToDisplay = prediction.name;
                  showText1.setText(txtToDisplay);
  
              }
  
          }
      }
  
  }
  </code></pre>