How to open dialog from listview
<p>I have found a problem while opening dialog on click of listView..the code i have return is given below please check it if there is any error there..</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {


        super.onCreate(savedInstanceState); 
        setContentView(R.layout.my_info);
        ListView lv2;
        String lv_arr1[]={"Language:NotSpecified"};
        lv2=(ListView)findViewById(R.id.listViewInfo1);
        lv2.setAdapter(new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1 , lv_arr1));

        ListView lvInfo1;
        ListViewInfo adapter;
        String lvTitle[]={"online"};
        String lvDesc[]={"Change Status"};
        adapter = new ListViewInfo(this, lvTitle,lvDesc);
        lvInfo1=(ListView)findViewById(R.id.listViewInfo2);
        lvInfo1.setAdapter(adapter);
        lvInfo1.setOnItemClickListener(this);

    }

 public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int position, long id) 
 {

        final CharSequence[] items = {"Online", "Away", "Do not distrub","Invisible","Offline"};

        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Change Status");
        builder.setItems(items, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int item) {
                Toast.makeText(getApplicationContext(), items[item], Toast.LENGTH_SHORT).show();
            }
        });

}
</code></pre>
