title: spinner shows like dialog
body: <p>I am using the spinner and it opens like a dialog. I need spinner to be open like dropdown menu.</p>
  
  <p>Here is the xml file</p>
  
  <pre><code> &lt;Spinner
   android:id="@+id/sp_countrycode_issue_coupon"
   android:layout_width="60dp"
   android:layout_height="40dp"
   android:layout_gravity="center"
   android:layout_marginLeft="3dp"
   android:layout_weight="1"
   android:background="@drawable/img_small_box_green"
   android:dropDownSelector="@drawable/img_small_box_green"
   android:gravity="right|center"
   android:textAlignment="center" /&gt;
  </code></pre>
  
  <p>Here is the code</p>
  
  <pre><code>ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
              this, R.array.country_code,
              android.R.layout.simple_spinner_item);
  
  adapter.setDropDownViewResource(R.layout.spinner_textview);
  sp_country_code.setAdapter(adapter);
  </code></pre>
  
  <p>I posted my images bellow like my view and spinner display view. But I need the spinner to be display like the third image</p>
  
  <p><img src="https://i.stack.imgur.com/ikRG1.png" alt="Here is my layout">
  <img src="https://i.stack.imgur.com/lAPTr.png" alt="Spinner displays in this way">
  <img src="https://i.stack.imgur.com/fi416.png" alt="But I need in this format"></p>