I am creating a currency converter and I want to create a button that switches or swaps values. I appreciate the support.
Advertisement
Answer
It is just simple ImageButton
You can set this button using following code :
<ImageButton android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/home" /> <!--Add Your Icon Here In Drawable-->
After that, Just set simple View.OnClickListener()
findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //Handle Your Click Here } });