title: Why is my custom spinner filling with my package name?
body: <p>I found <a href="https://stackoverflow.com/a/13878692/3165621">this workaround</a> for adding a hint to a dropdown spinner. It looked promising, but instead of getting my desired strings to show in the spinner, I'm getting something that looks like my package name (can't see the full name).<br>
  <img src="https://i.stack.imgur.com/pQrSA.png" alt="enter image description here"></p>
  
  <p>@IsaacCisneros created new SpinnerItem and MySpinnerAdapter classes. I implemented his new classes exactly. My implementation looks like this:</p>
  
  <pre><code>ArrayList&lt;SpinnerItem&gt; credValues = new ArrayList&lt;SpinnerItem&gt;();
           credValues.add(new SpinnerItem("3.0",false));
           credValues.add(new SpinnerItem("Credit", true));
  
           MySpinnerAdapter adapter_cred = new MySpinnerAdapter(this.getActivity(),
                   android.R.layout.simple_spinner_item, credValues);
           adapter_cred.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
           Spinner spinCred = (Spinner)rootView.findViewById(R.id.cred_spinner);
           spinCred.setAdapter(adapter_cred);
           spinCred.setSelection(credValues.size() - 1);
  </code></pre>
  
  <p>And his looks like this:</p>
  
  <pre><code>ArrayList&lt;SpinnerItem&gt; items = new ArrayList&lt;SpinnerItem&gt;();
      items.add(new SpinnerItem("Item 1", false));
      items.add(new SpinnerItem("Item 2", false));
      items.add(new SpinnerItem("HINT", true)); // Last item 
  
      MySpinnerAdapter adapter = new MySpinnerAdapter(this, android.R.layout.simple_spinner_item, items);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      spinner.setAdapter(adapter);
      spinner.setSelection(items.size() - 1);
  </code></pre>
  
  <p>So why is mine acting weird? The context for my code is the onCreateView of my AddItemFragment within my activity. What am I referencing wrong? Thanks!  </p>
  
  <hr>
  
  <p>EDIT: The adapter class code was requested...</p>
  
  <pre><code>class SpinnerItem {
      private final String text;
      private final boolean isHint;
  
      public SpinnerItem(String strItem, boolean flag) {
          this.isHint = flag;
          this.text = strItem;
      }
  
      public String getItemString() {
          return text;
      }
  
      public boolean isHint() {
          return isHint;
      }
  }
  
  class MySpinnerAdapter extends ArrayAdapter&lt;SpinnerItem&gt; {
      public MySpinnerAdapter(Context context, int resource, List&lt;SpinnerItem&gt; objects) {
          super(context, resource, objects);
      }
  
      @Override
      public int getCount() {
          return super.getCount() - 1; // This makes the trick: do not show last item
      }
  
      @Override
      public SpinnerItem getItem(int position) {
          return super.getItem(position);
      }
  
      @Override
      public long getItemId(int position) {
          return super.getItemId(position);
      }
  }
  </code></pre>