in the string.xml file add the code that makes the list for your spinner
<string name="country_prompt">Choose a country</string>
<string-array name="country_arrays">
<item>Malaysia</item>
<item>United States</item>
<item>Indonesia</item>
<item>France</item>
<item>Italy</item>
<item>Singapore</item>
<item>New Zealand</item>
<item>India</item>
</string-array>
in the main.xml in the <Spinner add this code
android:entries="@array/country_arrays" android:prompt="@string/country_prompt"
create the spinner variable in MainActivity
in onCreate set the variable to the xml spinner
when you need to get the selected item from the spinner use getSelectedItem().toString(); to read selected item;
private Spinner country_ ;
country_ = (Spinner)findViewById(R.id.spinner1);
country_ .getSelectedItem().toString();
in the .java file you can add items to the list by adding this code