Using Spinner Selection value in conditional statements
<pre><code>package com.RaffDev.RaffApp;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Toast;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener;


public class RaffAppActivity extends Activity implements View.OnClickListener{

/*Regular Variables*/
String copyright = "Raff App \n\nVersion: Alpha 0.0.1\n\n(c) Copyright Raff App contributors and others 2011. All rights reserverd";
MediaPlayer mp;
public String soundSelection;



/*Called at the beginning of the application*/
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    Spinner spinner = (Spinner) findViewById(R.id.spinner1);
    ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(this, R.array.soundEntries, android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);
    spinner.setOnItemSelectedListener(new MyItemSelectedListener());
}
public class MyItemSelectedListener implements OnItemSelectedListener{

    public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int pos, long id) {
        soundSelection = parent.getItemAtPosition(pos).toString();
    }

    public void onNothingSelected(AdapterView&lt;?&gt; parent) {
        // Do nothing.
    }


}


/*Button Functions*/
public void onClick(View v){}

public void infoClick(View v){

    Toast.makeText(this, soundSelection, Toast.LENGTH_LONG).show();
    }

public void pressPlay(View v){
    if(soundSelection=="Please Ms. Prettyface"){
        if(mp != null &amp;&amp; mp.isPlaying()) mp.reset();
            mp = MediaPlayer.create(getApplicationContext(), R.raw.pleaseprettyface);
            mp.start();
        }else if(soundSelection=="HE AIN'T DO DAT"){
            if(mp != null &amp;&amp; mp.isPlaying()) mp.reset();
            mp = MediaPlayer.create(getApplicationContext(), R.raw.heaintdodat);
            mp.start();
        }else if(soundSelection=="SHEEESH"){
            if(mp != null &amp;&amp; mp.isPlaying()) mp.reset();
            mp = MediaPlayer.create(getApplicationContext(), R.raw.heaintdodat);
            mp.start();
        }else if(soundSelection=="THE DOUSKY"){
            if(mp != null &amp;&amp; mp.isPlaying()) mp.reset();
            mp = MediaPlayer.create(getApplicationContext(), R.raw.heaintdodat);
            mp.start();
        }else if(soundSelection=="ñMouth"){
            if(mp != null &amp;&amp; mp.isPlaying()) mp.reset();
            mp = MediaPlayer.create(getApplicationContext(), R.raw.heaintdodat);
            mp.start();
        }
}
</code></pre>

<p>}       </p>
