title: performClick() and callOnClick() doing nothing
body: <p>I am adding voice commands to an already existing, and fully functioning app. The voice interaction seems to work fine. I am able to say the command, I am getting the correct result, and I am even getting the correct button, which click interaction I want to simulate by using the voice. </p>
  
  <p>My problem is that <code>performClick()</code> and <code>callOnClick()</code> seem to not even be called. Each button has its Listener (manual clicks work). </p>
  
  <p>As a side note: I am calling the click-methods outside of my activity. Is that a problem?</p>
  
  <p>How do I get these methods to really trigger the onClick's of my buttons?</p>
  
  <p>PS: Maybe some suggestions would be to use the functions direclty instead of using the click-event. The first point, why I don't want to do that, is that I want to avoid duplicate code or a code restructuring, and second, I would like to keep my voice recognition away from being wired too deep into the code by behave like a simple user (hence the programmatical clicking).</p>
  
  <p>EDIT:</p>
  
  <p>Basically I am not doing anything else than:</p>
  
  <p>From my main activity, I am calling my helper class:</p>
  
  <pre><code>util = new MainVoiceUtil(this, getLayoutInflater(), viewgroup);
  </code></pre>
  
  <p><code>viewgroup</code>here is unrelated to this topic. In <code>MainVoiceUtil</code> it goes:</p>
  
  <pre><code>public MainVoiceUtil(Context context, LayoutInflater inflater, Viewgroup viewgroup)
  {
     super(context);
     ...
  }
  </code></pre>
  
  <p><code>MainVoiceUtil</code> extends <code>VoiceUtil</code>, which contains a method <code>onResult</code>, which contains the <code>performClick</code>. <code>context</code> is set in the constructor of <code>VoiceUtil</code>. See:</p>
  
  <pre><code>@Override
  public void onResult(AIResponse result)
  {
     View button = ((Activity) context).findViewById(buttonId);
     button.performClick();
  }
  </code></pre>
  
  <p>Thanks to log outputs, I know that I have the right button. This means that I know that I am entering the <code>onResult</code>-method. All log outputs are shown, just this click does not seem to be executed. </p>