title: Button not responding to first click
body: <p>I am developing an android application and have a button which launches another activity. The button does not respond to the first click ,but respond to subsequent touches. The xml for the relevant button </p>
  
  <pre><code>&lt;Button
      android:id="@+id/bonePArenaplay"
      android:layout_width="160dp"
      android:layout_height="90dp"
      android:layout_alignLeft="@+id/bmainleaderboard"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="200dp"
      android:background="@drawable/arenabtnback"
      android:focusable="false"
      android:focusableInTouchMode="false"
      android:gravity="center|bottom"
      android:padding="10dp"
      android:shadowColor="@android:color/white"
      android:shadowRadius="25"
      android:text="Play"
      android:textColor="@android:color/white"
      android:textSize="20sp" /&gt;
  </code></pre>
  
  <p>The Java Code :-</p>
  
  <pre><code>public class MainActivity extends FragmentActivity implements OnClickListener
       {
  
      protected void onCreate(Bundle savedInstanceState) {
      ....
  
      bonePArenaplay = (Button) findViewById(R.id.bonePArenaplay);
  
      bonePArenaplay.setOnClickListener(this);
        .....
       }      
  
  @Override
  public void onClick(View arg0) {
      // TODO Auto-generated method stub
      Animation anim2 = AnimationUtils.loadAnimation(this, R.anim.clickanim);
      Log.d("clicked", "called");
      switch (arg0.getId()) {
  
      case R.id.bonePArenaplay:
  
          bonePArenaplay.setAnimation(anim2);
          bonePArenaplay.startAnimation(anim2);
          Intent i = new Intent(this, GenreActivity.class);
          i.putExtra("Mode", 1);
          startActivity(i);
          break;
       ....
  </code></pre>
  
  <p>I am trying for an answer for over a week now and have looked at every answer on stackoverflow but all in vain </p>
  
  <p>And this issue is replicated in every button in my application. Every Activity does not respond to first touch but does respond to subsequent touches. Any help is appreciated.</p>
  
  <p>Some Solutions i have tried:-</p>
  
  <p>1 The setonclicklistener is in oncreate</p>
  
  <p>2 I have tried setting ontouchlistener to call onclicklistener still no effect </p>