How to access position variable in onItemSelected()
<p>In the following example, How would one access "position" variable from elsewhere (outside the parent class) : </p>

<p>void onItemSelected(AdapterView parent, View view, int position, long id) {
        Country country = (Country) parent.getAdapter().getItem(position);
        spinner2.setAdapter(new ArrayAdapter(country.getStates());
     }</p>

<p>Thanks.</p>
