all
I need to change the position of a ImageView dynamically and iam using the following code
int x=100,y=100;
RelativeLayout.LayoutParams mparam = new RelativeLayout.LayoutParams((int)(LayoutParams.FILL_PARENT),(int)(LayoutParams.FILL_PARENT));
mparam.topMargin=x;
mparam.leftMargin=y;
ball.setLayoutParams(mparam);
x+=100;
y+=100;
but i didnt get any change.
Is it possible? and How?
You can call setPadding on your View. So, in your code (which by the way you should put in a code block!), just add a call to this method: