title: How to registerForContextMenu from ArrayAdapter
body: <p>I'm displaying List of Message, using Activity that show ListView from Adaptar as show below.</p>
  
  <p>I need to register ContextMenu menu in the ImageView inside the below <code>DiscussArrayAdapter</code> class. </p>
  
  <p>if I just call <code>registerForContextMenu(arrowImage);</code> from <code>DiscussArrayAdapter</code> it will not accept it.</p>
  
  <p>also, I don't know where to override the method <code>onCreateContextMenu</code></p>
  
  <p>My messageActivity as follows:</p>
  
  <pre><code>public class MessagesActivity extends Activity  {
          private ListView listView = null;
  
          /** Called when the activity is first created. */
          private DiscussArrayAdapter adapter;
          private ListView lv;
  @Override
         public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
  
              setContentView(R.layout.activity_discuss);
  
              registerReceiver(mHandleMessageReceiver, new IntentFilter(
                              DISPLAY_MESSAGE_ACTION));
  
              adapter = new DiscussArrayAdapter(getApplicationContext(), R.layout.listitem_discuss);
  
              lv.setAdapter(adapter);
  </code></pre>
  
  <p>and I have <code>DiscussArrayAdapter</code> class:</p>
  
  <pre><code>public class DiscussArrayAdapter extends ArrayAdapter&lt;OneMessage&gt;{
  
      private /*TextView*/EditText msgTextView;
      private  TextView sender;
  
      private LinearLayout wrapper;
  
      private SqlHelper dbHelper = null;
      private Context context;
      @Override
      public void add(OneMessage object) {
  
          dbHelper.addNewMessage(object);
          super.add(object);
      }
  
      public DiscussArrayAdapter(Context context, int textViewResourceId) {
          super(context, textViewResourceId);
          this.context=context;
  
          if (dbHelper == null) {
              dbHelper = new SqlHelper(context);
  
          }
  
  
      }
  
      public int getCount() {
  
          return  dbHelper.getContactsCount();
      }
  
      public OneMessage getItem(int index) {
  
          return dbHelper.getOneComment(index+dbHelper.lastRawID());
      }
  
      public View getView(int position, View convertView, ViewGroup parent) {
          View row = convertView;
          if (row == null) {
              LayoutInflater inflater = (LayoutInflater) this.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              row = inflater.inflate(R.layout.listitem_discuss, parent, false);
          }
  
          wrapper = (LinearLayout) row.findViewById(R.id.wrapper);
  
          ImageView arrowImage = (ImageView) row.findViewById(R.id.aquaplayicon);
      //  this .registerForContextMenu(arrowImage);
          OneMessage coment = getItem(position);
  
          msgTextView =/*(TextView)*/(EditText) row.findViewById(R.id.comment);
  </code></pre>
  
  <p>I have omitted rest of code for brevity.  </p>