title: My onClick method only works 80% of the time
body: <p>I have a weird setup of <code>fragments</code> and <code>editText</code> views, and basically I need the fragment to be removed everytime a specific <code>editText</code> view is <code>clicked</code>. </p>
  
  <p>This works, but only about 80% of the time. </p>
  
  <p>The other 20% of the time where it fails, if you click it again, it 100% hides. </p>
  
  <p>It's as if the first time you hit it, it doesn't have enough time to react and hide the fragment before the keyboard pops out.</p>
  
  <p>My xml  has Clickable set to true and onClick set to hide.</p>
  
  <p>My java is here:</p>
  
  <pre><code>public void hide(View view) {
  
          FragmentTransaction transaction = getSupportFragmentManager()
                  .beginTransaction();
  
          try {
              transaction.remove(timerFragment);
              transaction.commit();
          } catch (Exception e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
      }
  </code></pre>
  
  <p>Any ideas?</p>