title: rootview.findViewById() is not working in fragment file
body: <pre><code>package com.example.mayank.sunshine;
  
  import android.support.v4.app.Fragment;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.List;
  
  /**
   * A placeholder fragment containing a simple view.
   */
  public class MainActivityFragment extends Fragment {
  
      private ArrayAdapter&lt;String&gt; mForecastAdapter;
  
      public MainActivityFragment() {
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          String[] forecastArray = {
              "Today - Sunny - 88/63",
              "Tomorrow - Foggy - 70/40",
              "Weds - Cloudy - 727/63",
              "Thurs - Asteroids - 75/65",
              "Fri - Heavy Rain - 65/56",
              "Sat - HELP TRAPPED IN WEATHERSTATION - 60/51",
              "Sun - Sunny - 80/68"
          };
  
          List&lt;String&gt; weekForecast = new ArrayList&lt;String&gt;(Arrays.asList(forecastArray));
  
          mForecastAdapter = new ArrayAdapter&lt;String&gt;(
              getActivity(),
              R.layout.list_item_forecast,
              R.id.list_item_forecast_textview,
              weekForecast);
  
          ListView listView = (ListView)rootview.findViewById(R.id.listview_forecast);
  
          listView.setAdapter(mForecastAdapter);
  
          return inflater.inflate(R.layout.fragment_main, container, false);
      }
  }
  </code></pre>
  
  <p>Running the project shows compilation error "cannot find symbol variable rootview". Do I have to import anything to run the code?</p>
  
  <p>P.S. I am using Android Studio 1.4 which, by deafult, builds a seperate java file for fragments.</p>