title: How to call a function on click on menu option?
body: <p>I want to have on menu button click to call a function,
  that function will popup a window with place for input.
  I added to the activity_main.xml the following line</p>
  
  <pre><code>android:onClick="getURL"
  </code></pre>
  
  <p>and have defined a function in my mainActivity.java:</p>
  
  <pre><code>public void getURL(View view) {...}
  </code></pre>
  
  <p>however, when i load the app i get:</p>
  
  <pre><code>01-31 09:59:13.479: E/AndroidRuntime(761): FATAL EXCEPTION: main
  01-31 09:59:13.479: E/AndroidRuntime(761): android.view.InflateException: Couldn't resolve menu item onClick handler getURL in class com.example.remoteswitch.MainActivity
  </code></pre>
  
  <p>my menu settings looks like:</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
  &lt;item
      android:id="@+id/menu_settings"
      android:orderInCategory="100"
      android:showAsAction="never"
      android:title="@string/menu_settings"
      android:onClick="getURL"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>any ideas why it happens to me?</p>