title: ListView not being displayed within fragment?
body: <p>I have a fragment in which I call a function that is supposed to populate and display a listview defined in the fragment's xml, but for some reason none of the text is appearing in the listview. All of my logs are outputting correctly in the console, so I know that the optionlist is getting populated correctly. Here's my code. Any help would be greatly appreciated!!</p>
  
  <pre><code>public class PickEventTypeFragment extends Fragment {
  private static final String TAG = "DaniDebug";
  public static ArrayList&lt;HashMap&lt;String, String&gt;&gt; optionList;
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
  
      SharedPreferences preferences = this.getActivity().getPreferences(Activity.MODE_PRIVATE);
  
      final View view = inflater.inflate(R.layout.fragment_pick_event_type, container, false);
      displayListView(view);
      Log.d(TAG, "got here");
      return view;
  }
  
  private void displayListView(View view) {
  
      //makes a list of options for first string
      optionList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
      initList();
      Log.d(TAG, optionList.get(0).get("option"));
      Log.d(TAG, optionList.get(1).get("option"));
  
      //get the ListView component from the layout
      ListView lv = (ListView) view.findViewById(R.id.ETlistView);
  
      lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
      lv.setItemsCanFocus(false);
  
      //enable user to scroll
      lv.setFastScrollEnabled(true);
  
      final SimpleAdapter simpleAdapt = new SimpleAdapter(getActivity(), optionList, android.R.layout.simple_list_item_1, new String[]{"option"}, new int[]{android.R.id.text1});
  
      lv.setAdapter(simpleAdapt);
  
  }
  
  //method that adds options to the list
  private void initList(){
      Log.d(TAG, "init List executed");
      optionList.add(createOption("option", "Food"));
      optionList.add(createOption("option", "Pong"));
      optionList.add(createOption("option", "Study"));
      optionList.add(createOption("option", "Workout"));
      optionList.add(createOption("option", "Meetup"));
  
      Collections.sort(optionList, new Alphabatize("option"));
  
  }
  
  public static HashMap&lt;String, String&gt; createOption(String key, String name){
      HashMap&lt;String, String&gt; option = new HashMap&lt;String, String&gt;();
      option.put(key, name);
  
      return option;
  }
  
  }
  </code></pre>
  
  <p>And the xml file: </p>
  
  <pre><code>&lt;LinearLayout 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"
  android:orientation="vertical"
  tools:context="com.biggreenapps.needone.PickEventTypeFragment"&gt;
  
  &lt;TextView android:layout_width="match_parent" android:layout_height="match_parent"
      android:text="@string/hello_blank_fragment" /&gt;
  
  &lt;ListView
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/ETlistView"
      android:layout_alignParentRight="true"
      android:layout_alignParentEnd="true"
      android:choiceMode="multipleChoice" /&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>