I have an ImageButton and I would like to set its position programmatically to x and y.
How can I do this? I read something abaut setTop() and setLeft() but don’t know how to use it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
using this code you can position you item in absolute (x,y) coordinate in your view, but you need to use you main root layout AbsoluteLayout otherwise it throws error.
But AbsoluteLayout is depreciated in latest version so avoid that , try to use RelativeLayout