Im new to android..please guide me..
I want to set image to act as button..
How to implement this in xml and in class file?
I now the code to set button in xml and class file like this..
<Button android:id="@+id/nxt_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_below="@+id/rdtxt" android:layout_marginRight="22dp" android:layout_marginTop="34dp" android:text="Next" />
Button nextBtn = (Button) findViewById(R.id.nxt_btn);
I want practice.png this image want to act as button..I have put this image into drawables..
Now how to implement this by code…please guide me…
Thank a lot…
In xml you can add:
And in Activity: