title: Select item from spinner to show edittext
body: <p>I am trying to show an EditText when a certain Item from a Spinner is selected. So far I have created the spinner and the EditText but I don't really know what my next step is.
  I don't want to display the selection in the EditText, I just want to display the EditText field. </p>
  
  <pre><code> @Override
  public void onCreate(Bundle savedInstanceState) 
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      final EditText editText = (EditText) findViewById(R.id.edit_text_box);
      editText.getText().toString();
  
  
  
  
  }
  
  
  public void addItemsOnSpinner()
  {
      spinner1 = (Spinner) findViewById(R.id.spinner);
      ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource
      (this, R.array.spinner_item, android.R.layout.simple_spinner_item);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      spinner1.setAdapter (adapter);
  
  }
  
  public void onItemSelected(AdapterView&lt;?&gt; spinner1, View view,int pos, long id)
  {
  
          editText.setText(spinner1.getSelectedItem());
  
  }
  </code></pre>
  
  <p>This is also what I have in my string array + wish to only display the edittext box when item2 is selected</p>
  
  <pre><code>&lt;string-array name="spinner_item"&gt;
      &lt;item&gt;Item 1&lt;/item&gt;
      &lt;item value="Item2"&gt;Item 2&lt;/item&gt;
      &lt;item&gt;Item 3&lt;/item&gt;
      &lt;item&gt;Item 4&lt;/item&gt;
  &lt;/string-array&gt;
  </code></pre>