I want to swap two button positions when we click on toggle button. I have tried a lot but haven’t got a success. So if anyone knows how to do this please suggest me.
Thanks all.
I want to swap two button positions when we click on toggle button. I
Share
You could try a sneaky workaround using
View.setVisibility(). Start with res/layout/main.xml:And now we have an
Activityto put this layout in:All that remains is for you to assign
onClick()methods to the four buttons.