onCreateContextMenu
<p>I can seen to understand what I am doing wrong here.</p>

<pre><code>public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)menuInfo;
    Map&lt;String, String&gt; data = (Map&lt;String, String&gt;) getListView().getItemAtPosition(info.position);
    preferences = PreferenceManager.getDefaultSharedPreferences(this);
    String admin = preferences.getString("Admin", null);
    String user_ids = preferences.getString("userID", null);
    menu.setHeaderTitle("Options");
    menu.add(0, profile, 0, "Show Profile");
if (admin.equals("Admin")){ 
    menu.add(0, add, 0, "Add Friend");
    menu.add(0, pm, 0, "Send PM");
    menu.add(0, warn, 0, "Send Warning");       
    menu.add(0, edit, 0, "Edit Post");
    menu.add(0, delete, 0, "Delete Post");
    menu.add(0, block, 0, "Block User");
}else if (data.get("pid").equals(user_ids)){
    menu.add(0, edit, 0, "Edit Post");
}else{
    menu.add(0, add, 0, "Add Friend");
    menu.add(0, pm, 0, "Send PM");
    menu.add(0, warn, 0, "Send Warning");       
    menu.add(0, block, 0, "Block User");
}
 }
</code></pre>

<p>It errors out to </p>

<pre><code>            view.showContextMenu();
</code></pre>

<p>But if I comment out the IF ELSE statements it works. Confused.</p>
