Skip to content
Advertisement

How to make this kind of button? [closed]

I am creating a currency converter and I want to create a button that switches or swaps values. I appreciate the support.

enter image description here

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
            }
        });
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement