Of the top of my head (so could be typos and other errors).
Of the top of my head (so could be typos and other errors): public void onItemSelected(AdapterView parent, View view, int pos, long id) { if(pos == 0) { // Beginner Toast. MakeText(parent.getContext(), "Beginner = 0.5", Toast. LENGTH_LONG).show(); } else if(pos == 1) { // Advanced Toast.
MakeText(parent.getContext(), "Advanced = 1", Toast. LENGTH_LONG).show(); } else { // Pro Toast. MakeText(parent.getContext(), "Pro = 1.5", Toast.
LENGTH_LONG).show(); } } You could spruce it up a lot with a HashMap to hold key:value pairs for the different levels you are suggesting here, but if you only have three levels, then this should work fine.
Try this: import android.app. Activity; import android.view. *; import android.os.
Bundle; import android.widget. AdapterView; import android.widget.AdapterView. OnItemSelectedListener; import android.widget.
ArrayAdapter; import android.widget. Spinner; import android.widget. Toast; public class AlbumsActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.
OnCreate(savedInstanceState); setContentView(R.layout. Main); final Spinner spinner = (Spinner) findViewById(R.id. Spinner_experience); ArrayAdapter adapter = ArrayAdapter.
CreateFromResource( this, R.array. Experience_array, android.R.layout. Simple_spinner_item); adapter.
SetDropDownViewResource(android.R.layout. Simple_spinner_dropdown_item); spinner. SetAdapter(adapter); spinner.
SetOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView parentView, View selectedItemView, int position, long id) { Object test = spinner.getSelectedItem(); Toast. MakeText(AlbumsActivity. This, "The planet is " + spinner.
GetItemAtPosition(position).toString(), Toast. LENGTH_LONG).show(); } @Override public void onNothingSelected(AdapterView parentView) { // your code here } }); } }.
Try to replace Object test = spinner.getSelectedItem(); with String test = spinner.getSelectedItem().toString(); Also parent. GetItemAtPosition(pos).toString() will return the Id of the view inside the Spinner not the text. To get this text use: TextView TV=parent.
GetItemAtPosition(pos); and replace parent. GetItemAtPosition(pos).toString() with TV.getText().toString().
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.