title: Android - How do I launch a separate screen with information based on the selected ListView choice?
body: <p>I have a list view which is displaying a list of all installed applications on the device. I am having trouble finding a way to launch a separate screen with information on based on the selected item in the list view. </p>
  
  <p>For example: Clicking on 'Facebook' in the list view will open a screen with information I have typed about Facebook.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>public class ListApplications extends Activity {
  
  private ListView lView;
   private ArrayList results = new ArrayList();
  
  @Override
   public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.list_applications);
  
    lView = (ListView) findViewById(R.id.listview);
    PackageManager pm = this.getPackageManager();
  
    Intent intent = new Intent(Intent.ACTION_MAIN, null);
    intent.addCategory(Intent.CATEGORY_LAUNCHER);
  
    List&lt;ResolveInfo&gt; list = pm.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED);
  
    for (ResolveInfo rInfo : list) {
     results.add(rInfo.activityInfo.applicationInfo.loadLabel(pm).toString());
     Log.w("Installed Applications", rInfo.activityInfo.applicationInfo.loadLabel(pm).toString());
    } 
  
   lView.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, results)); 
   }
  </code></pre>