title: Android: Custom Spinner Layout
body: <p>I am trying to make a fully custom spinner. I am running into difficulties with making the layout that pops up when you press on it. Here is my code for my adapter:</p>
  
  <pre><code>    ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
              this, R.array.my_array, R.layout.spinnertext);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      spinner.setAdapter(adapter);
  </code></pre>
  
  <p>From what I have read in the documentation, the layout used apears to be set by the line:</p>
  
  <pre><code>    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  </code></pre>
  
  <p>Although every time I change it to a new layout that I make, it makes the app fail when I try and use the spinner. I have tried to look for what "android.R.simple_spinner_dropdown_item" looks like so as to figure out if I am maybe missing anything.</p>
  
  <p>All of my layouts I have tried have been linear or relative layouts, with only a textView.</p>
  
  <p>How can I make a custom layout pop up when the spinner is selected?</p>