Thursday, July 9, 2015

android: ImageButton Not clickable - AndroidStudio

This Work fine to me.
Use This in Xml
 <ImageButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/imageButton"
        android:layout_marginBottom="48dp"
        android:onClick="AddInfo"
        android:background="@mipmap/ea_logo"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true" />
Use This in Activity Class
  public void AddInfo(View view) {

///// Use Your Own code /////////

}

No comments:

Post a Comment