title: Extend spinner with same design
body: <p>I would like to extend the spinner class, but preserve the same look. If I just create a custom spinner class like (nothing special happening): </p>
  
  <pre><code>public class MySpinner extends Spinner {
  
      public MySpinner(Context context)
      { super(context); }
  
      public MySpinner(Context context, int mode)
      { super(context,mode); }
  
      public MySpinner(Context context, AttributeSet attrs)
      { super(context, attrs); }
  
      public MySpinner(Context context, AttributeSet attrs, int defStyle)
      { super(context, attrs, defStyle); }
  
      public MySpinner(Context context, AttributeSet attrs, int defStyleAttr, int mode)
      { super(context,attrs,defStyleAttr,mode); }
  }
  </code></pre>
  
  <p>with XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"   android:layout_width="match_parent"
      android:layout_height="match_parent"     android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:orientation="vertical"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"
      tools:showIn="@layout/activity_main" tools:context=".MainActivity"&gt;
  
      &lt;TextView android:text="Hello World!" android:layout_width="wrap_content"
      android:layout_height="wrap_content" /&gt;
  
      &lt;com.example.abc.testapplication.MySpinner android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/spinner1"/&gt;
      &lt;Spinner android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/spinner2"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and in the onCreate of my activity I have (also nothing special I believe):</p>
  
  <pre><code>MySpinner spinner1 = (MySpinner) findViewById(R.id.spinner1);
  Spinner spinner2 = (Spinner) findViewById(R.id.spinner2);
  String[] itemList = new String[]{ "item1", "item2", "item3" };
  ArrayAdapter&lt;String&gt; itemArray= new ArrayAdapter&lt;String&gt;(MainActivity.this,android.R.layout.simple_spinner_item, itemList);
  itemArray.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
  spinner1.setAdapter(itemArray);
  spinner2.setAdapter(itemArray);
  </code></pre>
  
  <p>then I end up with two different looking spinners:<a href="https://i.stack.imgur.com/adpFs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/adpFs.png" alt="first is custom spinner, second is default spinner"></a></p>
  
  <p>Also, when clicking on the first (custom) spinner, a light-blue transparent rectangle appears shortly (like when clicking on a listview). When clicking on the second (not custom) spinner, the small triangle shortly turns red.</p>
  
  <p>What am I missing to make these two spinners look the same?</p>
  
  <p>That's tested on Sony Xperia SP, Android 4.3, API 18.</p>