title: Opening a floating menu (context menu) in Android?
body: <p>I created a new menu, named drmenu.xml. It works correctly when i press menu button, but I need to open a context menu when the user press the button.
  The below code the button just show a toast.</p>
  
  <p>this is my xml layout:</p>
  
  <pre><code> &lt;LinearLayout
          android:id="@+id/MenuCall"
          android:layout_width="90dip"
          android:layout_height="match_parent"
          android:gravity="right|center_vertical" &gt;
          &lt;ImageView
              android:id="@+id/MenuCall"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/imageiew6" /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and this is my java code:</p>
  
  <pre><code>    final LinearLayout callback_var = (LinearLayout) findViewById(R.id.MenuCall);
      registerForContextMenu(callback_var);
      callback_var.setOnClickListener(new android.view.View.OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
              // TODO Auto-generated method stub
              Toast.makeText(getApplicationContext(), "this is repeated",      Toast.LENGTH_LONG).show();
              openContextMenu(callback_var);
          }
  </code></pre>