title: Spinner not showing drop-down in Fragment
body: <p>I'm working with <code>Fragments</code> in my current app. I tried using a Spinner in one of the fragments, to sort the <code>listview</code> below it in a specific format. The <code>Adapter</code> is set correctly, but I'm unable to open the dropdown on touch to select the choices. How I know the adapter is set correctly, is that in the <code>AVD</code>, I'm able to navigate to it using the keyboard and open it. </p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>public class Upcoming_Reminders extends Fragment {
  
  
  private View view;
  
  private ProgressDialog progressDialog;
  private ListView listView;
  private String TAG = "Loggin";
  RemindersAdapter remindersAdapter;
  private Spinner mSortSpinner;
  private String[] test;
  
  public Upcoming_Reminders() {
      // Required empty public constructor
  }
  
  
  @Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
      mSortSpinner = (Spinner) view.findViewById(R.id.sort_spinner);
      ArrayAdapter&lt;CharSequence&gt; mSortAdapter = new ArrayAdapter&lt;CharSequence&gt;(getContext(), android.R.layout.simple_spinner_item, test);
      mSortAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      mSortSpinner.setAdapter(mSortAdapter);
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      view = inflater.inflate(R.layout.fragment_upcoming__reminders, container, false);
      test = getActivity().getResources().getStringArray(R.array.sort_by);
  
      listView = (ListView) view.findViewById(R.id.contracts_list);
  
      return view;
  }
  </code></pre>
  
  <p>I tried putting it in the <code>OnCreateView</code> method as well, below the view assignment. It still isn't clickable. </p>
  
  <p><strong>The XML</strong></p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context="com.onerooftechnologiesamc.Upcoming_Reminders"&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="horizontal"
      android:paddingTop="70dp"&gt;
  
      &lt;TextView
          android:id="@+id/te"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:gravity="bottom|end"
          android:text="@string/sort_by" /&gt;
  
      &lt;Spinner
          android:id="@+id/sort_spinner"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginEnd="10dp"
          android:layout_marginLeft="5dp"
          android:layout_marginRight="10dp"
          android:layout_weight="1"
          /&gt;
  &lt;/LinearLayout&gt;&lt;/FrameLayout&gt;
  </code></pre>
  
  <p>What could be the cause? I tried Googling a lot, haven't found someone with the exact same problem as me. </p>
  
  <p>Thank you</p>
  
  <p>Edit 1: The Resources file</p>
  
  <pre><code>&lt;resources&gt;
  &lt;array name="sort_by"&gt;
      &lt;item&gt;Option 1&lt;/item&gt;
      &lt;item&gt;Option 2&lt;/item&gt;
      &lt;item&gt;Option 3&lt;/item&gt;
      &lt;item&gt;Option 4&lt;/item&gt;
  &lt;/array&gt;&lt;/resources&gt;
  </code></pre>