title: Error when setError mesaage in spinner. How seterror spinner?
body: <p>This is XML spinner</p>
  
  <pre><code>&lt;android.support.v7.widget.AppCompatSpinner
                  android:id="@+id/spinnerNmKategori"
                  style="?android:attr/spinnerStyle"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:backgroundTint="@color/white"
                  android:entries="@array/nmKat"
                  android:spinnerMode="dialog" /&gt;
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>private void simpanPrd() {
      sKdPrd = kdprd.getText().toString();
      sNmPrd = nmprd.getText().toString();
      sNmKat = spinKategori.getSelectedItem().toString();
      if (sKdPrd.isEmpty()){
          kdprd.setError("Kode Produk tidak boleh kosong");
          kdprd.requestFocus();
      } else if (sNmPrd.isEmpty()){
          nmprd.setError("Nama Produk tidak boleh kosong");
          nmprd.requestFocus();
      } else if (sNmKat.equals("Pilih Kategori")){
          ((TextView)spinKategori.getSelectedView()).setError("Your Error msg Here");
      }
  
  }
  </code></pre>
  
  <p>When I click my button, and check spinner if not selected kategori. I want to set error like an <code>EditText</code> in the spinner. However when I run my app I always get an error. This is my error</p>
  
  <pre><code>02-19 17:56:58.834 16939-16939/com.example.steven.bellishopadmin E/AndroidRuntime: FATAL EXCEPTION: main
  Process: com.example.steven.bellishopadmin, PID: 16939
  java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TextView
      at com.example.steven.bellishopadmin.View.TambahProduk.simpanPrd(TambahProduk.java:178)
      at com.example.steven.bellishopadmin.View.TambahProduk.access$700(TambahProduk.java:33)
      at com.example.steven.bellishopadmin.View.TambahProduk$7$2.onClick(TambahProduk.java:152)
      at android.support.v7.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:135)
      at android.app.ActivityThread.main(ActivityThread.java:5264)
      at java.lang.reflect.Method.invoke(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:372)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:695)
  </code></pre>
  
  <p>How do I set an error on the spinner?</p>