title: getview not getting called
body: <p>This is the main activity calling list adapter the app crashes everytime since getview is never called therefore the list is never loaded.</p>
  
  <p><strong>MainActivity</strong></p>
  
  <pre><code>public class MainActivity extends FragmentActivity {
  
      ViewPager mViewPager;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
          // Create the adapter that will return a fragment for each of the three
          // primary sections of the app.
          mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
  
          // Set up the ViewPager with the sections adapter.
          mViewPager = (ViewPager) findViewById(R.id.pager);
          mViewPager.setAdapter(mSectionsPagerAdapter);
  
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  
  
  /**
   * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
   * one of the sections/tabs/pages.
   */
  </code></pre>
  
  <p><strong>SectionsPagerAdapter</strong></p>
  
  <pre><code>public class SectionsPagerAdapter extends FragmentPagerAdapter {
          public SectionsPagerAdapter(FragmentManager fm) {
              super(fm);
          }
          @Override
          public Fragment getItem(int position) {
              // getItem is called to instantiate the fragment for the given page.
              // Return a DummySectionFragment (defined as a static inner class
              // below) with the page number as its lone argument.
              Fragment fragment = new DummySectionFragment();
              Bundle args = new Bundle();
              args.putInt(DummySectionFragment.ARG_SECTION_NUMBER, position + 1);
              fragment.setArguments(args);
              return fragment;
          }
          @Override
          public int getCount() {
              // Show 3 total pages.
              return 3;
          }
          @Override
          public CharSequence getPageTitle(int position) {
              Locale l = Locale.getDefault();
              switch (position) {
                  case 0:
                      return getString(R.string.title_section1).toUpperCase(l);
                  case 1:
                      return getString(R.string.title_section2).toUpperCase(l);
                  case 2:
                      return getString(R.string.title_section3).toUpperCase(l);
              }
              return null;
          }
      }
  </code></pre>
  
  <p>/**
   * A dummy fragment representing a section of the app, but that simply
   * displays dummy text.
   */</p>
  
  <p><strong>DummySectionFragment</strong></p>
  
  <pre><code>public static class DummySectionFragment extends Fragment {
      /**
       * The fragment argument representing the section number for this
       * fragment.
       */
      public static final String ARG_SECTION_NUMBER = "section_number";
  
      public DummySectionFragment() {
      }
  
      @Override
       public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_main_dummy, container, false);
         //itcItems = (ListView)rootView.findViewById(R.id.streamList);
          //itcItems.setAdapter(adapter);
  
  
  
  
          return rootView;
      }
      @Override
      public void onActivityCreated(Bundle savedInstanceState) {
          MyAsyncTask task = new MyAsyncTask(getActivity());
          task.execute("http://findaway.in/card/restlist.xml");
          super.onActivityCreated(savedInstanceState);
      }
  }
  
  
  static class MyAsyncTask extends AsyncTask&lt;String, Void, List&lt;Data&gt; &gt; {
  
      Activity mContext;
      //Response response;
     public  MyAsyncTask(Activity context) {
  
       this.mContext=context;
      }
      protected List&lt;Data&gt; doInBackground(String... urls) {
  
          // Debug the task thread name
          Log.d("ITCRssReader", "inside");
  
          try {
              // Create RSS reader
              RssReader rssReader = new RssReader(urls[0]);
              Log.d("ITCRssReader", "inside1");
              // Parse RSS, get items
              //Log.d("ITCRssReader", rssReader.getItems().get(3).getName());
              return rssReader.getItems();
  
          } catch (Exception e) {
              Log.e("ITCRssReader", "error");
          }
  
          return null;
      }
      protected void onPostExecute(List&lt;Data&gt; result) {
          Log.d("RESULT", result.get(3).getName());
          // Get a ListView from main view
         ListView itcItems = (ListView)mContext.findViewById(R.id.streamList);
         ListAdapter la = new ListAdapter(mContext,R.layout.fragment_main_dummy, result);             
          // Create a list adapter
          itcItems.setAdapter(la);
      }
  }
  }`
  </code></pre>
  
  <p>this is my code for adapter
  "Log.d("list",obj.getName())" never gets called
  <strong>ListAdapter</strong></p>
  
  <pre><code>public class ListAdapter extends ArrayAdapter&lt;Data&gt;    {
      Context context;
      // List values
      List&lt;Data&gt; foodList;
      public ListAdapter(Context context, int resource , List&lt;Data&gt; result) {
      super(context, resource, result);
      //Log.d("RESULT2", result.get(3).getName());
      this.context = context;
      this.foodList = result;
      Log.d("RESULT2", foodList.get(3).getName());
      }
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
        //View rowView=convertView;
       // ImageHolder holder = null;
  
        Data obj = foodList.get(position);
        Log.d("list",obj.getName());
  
        LayoutInflater inflater = (LayoutInflater)this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View rowView = inflater.inflate(R.layout.fragment_main_dummy,parent,false);
        TextView n = (TextView)rowView.findViewById(R.id.name);
        TextView d = (TextView)rowView.findViewById(R.id.discount);
        TextView l = (TextView)rowView.findViewById(R.id.Type);
        n.setText(obj.getName());
        d.setText(obj.getDiscount());
        l.setText(obj.getLocation());
  
  
            return rowView;
  
         }
  
  
  }
  </code></pre>