title: Open ContextMenu on single click
body: <p>I am trying to add a context menu to a linear layout and open it on single click. The linear layout, in turn, contains a textview so that the listener can be invoked when user clicks anywhere on the layout.</p>
  
  <p>Setting onClick listener to linear layout.</p>
  
  <pre><code>linearLayout.setOnClickListener(this);
  </code></pre>
  
  <p>And the onClick method:</p>
  
  <pre><code>public void onClick(View view) {
      openContextMenu(view);
      //view.showContextMenu(); // didn't work as well
  }
  </code></pre>
  
  <p>the above method should trigger the following</p>
  
  <pre><code>public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo){            
       super.onCreateContextMenu(menu, view, menuInfo);  
       menu.setHeaderTitle("Title");
       menu.add(0, id, 0, "Item 1");
  }
  </code></pre>
  
  <p>However, this seems to be not working. From other community posts in here, this is the solution I could possibly find. I wonder if I miss something.</p>
  
  <p>Any thoughts?</p>
  
  <p>Thanks in advance!</p>