title: ArrayAdapter not binding data to ListView
body: <p>I am trying learn Android and building a very basic ListView, the data set up using ArrayAdapter is not showing up. My <code>Activity</code> code is:</p>
  
  <p><strong>MainActivity Class(default no changes)</strong></p>
  
  <pre><code>`public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
  
          FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
          fab.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                          .setAction("Action", null).show();
              }
          });
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  }`
  
  
  **MainActivityFragment class**
  
      public class MainActivityFragment extends Fragment {
  
      private ListAdapter arrayAdapter;
  
      public MainActivityFragment() {
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          ArrayList&lt;String&gt; myEntries = new ArrayList&lt;String&gt;();
          myEntries.add("Unix");
          myEntries.add("Java");
          myEntries.add("Android");
  
          arrayAdapter = new ArrayAdapter&lt;String&gt;(getActivity(), R.layout.list_item_forecast, R.id.list_forecast_item_textview, myEntries);
  
  
          ListView listView = (ListView)inflater.inflate(R.layout.fragment_main, container, false).findViewById(R.id.list_view_forecast);
  
  listView.setAdapter(arrayAdapter);
  
          return inflater.inflate(R.layout.fragment_main, container, false);
      }
  }
  </code></pre>
  
  <p><strong>list_item_forecast.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content" android:layout_height="wrap_content"
  
      android:minHeight="?android:listPreferredItemHeight"
      android:gravity="center_vertical"
      android:text=""
      android:id="@+id/list_forecast_item_textview"&gt;
  
  &lt;/TextView&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>fragment_main.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" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin" tools:showIn="@layout/activity_main"
      tools:context=".MainActivityFragment"
      android:id="@+id/forecastFragment"&gt;
  
  
      &lt;ListView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/list_view_forecast" /&gt;
  
      &lt;include layout="@layout/list_item_forecast" /&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent" android:fitsSystemWindows="true"
      tools:context=".MainActivity"&gt;
  
      &lt;android.support.design.widget.AppBarLayout android:layout_height="wrap_content"
      android:layout_width="match_parent" android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
      &lt;android.support.v7.widget.Toolbar android:id="@+id/toolbar"
          android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
          android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;include layout="@layout/content_main" /&gt;
  
      &lt;android.support.design.widget.FloatingActionButton android:id="@+id/fab"
          android:layout_width="wrap_content" android:layout_height="wrap_content"
          android:layout_gravity="bottom|end"         android:layout_margin="@dimen/fab_margin"
          android:src="@android:drawable/ic_dialog_email" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>All my application code is as above.  I have tried tweaking the code and also tried <a href="https://stackoverflow.com/questions/18030992/list-view-in-fragment-not-working">this link</a> but cannot get this to work. Please help.</p>