title: Why isn't my onClick method being called from an inflated view in my custom fragment?
body: <p>I have a custom Fragment that inflates it's content from test.xml</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
      View v = inflater.inflate(R.layout.test, container, true);
      return v;
  }
  </code></pre>
  
  <p>Inside of test.xml, I have a toggle button defined like so:</p>
  
  <pre><code>&lt;ToggleButton 
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:onClick="update"
      /&gt;
  </code></pre>
  
  <p>When I click on the toggle button, I get the following error:</p>
  
  <pre><code>Could not find a method update(View) in the activity class 
  android.view.ContextThemeWrapper for onClick handler on view class 
  android.widget.ToggleButton
  </code></pre>
  
  <p>I have the following method defined in both the calling activity and the fragment, but neither is getting called:</p>
  
  <pre><code>public void update(View view) {
      Log.d(LOG_TAG, "starting update!");
  }
  </code></pre>
  
  <p>I'm confused. </p>