How to create a listview with 2 columns showing all installed android apps and the permissions along with it?
<p>I'm pretty newbie to Android development (2 days old).</p>

<p>I intend to create an app that list all the currently installed applications in the device and a column beside each of those results showing the permissions granted. I understand that conventionally a listView has 1 column , how do I make another column ?</p>

<p>I'm open to other ideas as well (like perhaps another intent when i click the installed application name ?)</p>

<p>Below is my code thus far which shows all installed applications :</p>

<pre><code>import android.app.Activity;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextSwitcher;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;


public class PopAnalysis extends Activity{
    ListView appList;
    private TextSwitcher mSwitcher;
    TextView myText;
    private ArrayList results = new ArrayList();
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.popupanalysis);
        appList = (ListView)findViewById(R.id.listViewApp);
        PackageManager pm = this.getPackageManager();
        Intent intent = new Intent(Intent.ACTION_MAIN,null);
        intent.addCategory(Intent.CATEGORY_LAUNCHER);
        ArrayList&lt;ResolveInfo&gt; list = (ArrayList&lt;ResolveInfo&gt;) pm.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED);
        for (ResolveInfo rInfo : list) {
            results.add(rInfo.activityInfo.applicationInfo.loadLabel(pm).toString());
            System.out.println(rInfo.activityInfo.applicationInfo.loadLabel(pm).toString());
        }
        appList.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, results));
        appList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                int itemposition = position;
                String value = (String) appList.getItemAtPosition(position);

            }
        });
    }
}
</code></pre>

<p>Following are my XML codes :</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent"&gt;



     &lt;ListView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/listViewApp"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_marginTop="56dp" /&gt;

        &lt;TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="Large Text"
            android:id="@+id/textViewAnalysis"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true" /&gt;
        &lt;TextView
            android:id="@+id/list_item_appname"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="2"
            android:textAppearance="@android:style/TextAppearance.Medium" /&gt;

        &lt;TextView
            android:id="@+id/list_item_apppermissions"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1" /&gt;
    &lt;/RelativeLayout&gt;
</code></pre>