Code example for Spinner

Methods: getItemAtPosition

0
	 
	public class MyOnItemSelectedListener implements OnItemSelectedListener{
	    public void onItemSelected(AdapterView<?> parent,
	        View view, int pos, long id) {
	      
	          fractal=spinner.getItemAtPosition(pos).toString();
	          if(fractal.equals("Sierpinski Triangle"))
	          { 
	        	  iterations.setHint("1-7");
	          } 
	          else if(fractal.equals("Sierpinski Carpet"))
	          { 
	        	  iterations.setHint("1-6");
	          } 
	          else if(fractal.equals("Mandelbrot Set"))
	          { 
	        	  iterations.setHint("1-30");
	          } 
	          else if(fractal.equals("Julia Set"))
	          { 
	        	  iterations.setHint("-1000-1000");