Android: Setting variables from other classes
<p>I have been trying to find a way to set variables for one class <em>while</em> in another class withous changing intents. Maybe I'm searching the wrong things, maybe I'm over complicating this, I don't know.</p>

<p>Basically, what I am doing at the moment is getting the listView item that is selected, checking its index value, and chaning a variable or two(from a different class) based on the choice. </p>

<pre><code>public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id){
            theGame settings = null;
            switch(position){
                case 0:
                    settings.baseWave = 10;
                    settings.baseRate = 5;
                    break;
                case 1:
                    settings.baseWave = 20;
                    settings.baseRate = 10;
                    break;
                case 2:
                    settings.baseWave = 30;
                    settings.baseRate = 15;
                    break;
            }
        }
</code></pre>

<p>"theGame" is my outside class and "baseWave" and "baseRate" are the corrisponding varriables. Obviously, what I am doing here is not working for me. Im fairly new at all of this so be gentle.</p>

<p>Thank you for any help you can offer, it is much appreciated :)</p>

<p>~TG</p>
