Tutorial :Change Button position



Question:

I have a button in an AbsoluteLayout and I want to change the X and Y position on screen programmatically.

How do i it?


Solution:1

First of all you you need to find or add button on view.

And after that you need to set AbsoluteLayout like

btn.setLayoutParams(new LayoutParams(width, height, x, y))  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »