title: How do you add array to listview
body: <p>I have an array of apps(PInfo) and I am wondering how do I add that array to a listview?</p>
  
  <pre><code>ArrayList&lt;PInfo&gt; info = appsGetter.listPackages();
      int number = 0;
      PInfo appInArray;
      while(number &lt; info.size()){
          appInArray = info.get(number);
  }
  </code></pre>
  
  <p>This is what I have at the moment, the listPackages() is a method that is getting the names of the apps from the device.</p>
  
  <p>At the moment I am trying to get the information out of the array one by one and add it to the listview like that. Is that how I should do it our should I add the array straight to the listview? And how do you do that?</p>