title: Cannot resolve constructor ArrayAdapter
body: <p>I am getting a <strong>Cannot resolve constructor ArrayAdapter</strong> in my <code>OnCreateView</code> method with the <code>listAdapter</code> I am trying to list text data in my tabs and here is my main activity. Any help will be appreciated I am still a noobie in <code>Java</code>.</p>
  <pre><code>public class MainActivity extends ActionBarActivity {
  
      private Toolbar toolbar;
      private ViewPager mPager;
      private SlidingTabLayout mTabs;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          toolbar = (Toolbar) findViewById(R.id.app_bar);
          setSupportActionBar(toolbar);
  
          mPager= (ViewPager) findViewById(R.id.viewPager);
          mTabs=(SlidingTabLayout) findViewById(R.id.tabs);
          mPager.setAdapter(new MyPagerAdapter(getSupportFragmentManager()));
          mTabs.setDistributeEvenly(true);
          mTabs.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
          mTabs.setSelectedIndicatorColors(getResources().getColor(R.color.colorAccent));
          mTabs.setViewPager(mPager);
      }
  
      @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);
      }
  
      class MyPagerAdapter extends FragmentPagerAdapter {
  
          String[] tabs;
  
          public MyPagerAdapter(FragmentManager fm) {
              super(fm);
              tabs=getResources().getStringArray(R.array.tabs);
          }
  
          @Override
          public Fragment getItem(int position) {
  
              MyFragment myFragment=MyFragment.getInstance(position);
              return myFragment;
          }
  
          @Override
          public CharSequence getPageTitle(int position) {
              return tabs[position];
          }
  
          @Override
          public int getCount() {
              return 5;
          }
      }
  
      public static class MyFragment extends Fragment {
  
          private TextView textView;
          private ListView mainListView;
          private ArrayAdapter&lt;String&gt; listAdapter ;
  
          public static MyFragment getInstance(int position){
  
              MyFragment myFragment=new MyFragment();
              Bundle  args=new Bundle();
              args.putInt(&quot;position&quot;, position);
              myFragment.setArguments(args);
              return myFragment;
          }
  
          @Override
  
          public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  
              View layout=inflater.inflate(R.layout.fragment_my, container, false);
  
              mainListView=(ListView) layout.findViewById(R.id.position);
  
              String[] planets = new String[] { &quot;Mercury&quot;, &quot;Venus&quot;, &quot;Earth&quot;, &quot;Mars&quot;,
                      &quot;Jupiter&quot;, &quot;Saturn&quot;, &quot;Uranus&quot;, &quot;Neptune&quot;};
              ArrayList&lt;String&gt; planetList = new ArrayList&lt;String&gt;();
              planetList.addAll( Arrays.asList(planets) );
  
              listAdapter = new ArrayAdapter&lt;String&gt;(this, R.layout.simplerow, planetList);
              mainListView.setAdapter( listAdapter );
              return layout;
          }
      }
  }
  </code></pre>