OK now I know that the question seems to has an obvious answer, but really what is wrong with setX and setY functions and why won't they just work as they supposed to be. I'm trying to move views dynamically while the app is running to certain positions.They worked fine on my testing device with mdp but everything changes when I use device with different density value.The Y axis always off by a constant value, and no it is not a padding or margin issue I even tried to divide it by context.getResources().getDisplayMetrics().density;
to take the densities differences into consideration but it didn't work either.
finally I used the answer in this post and it worked but I still have problems with other densities devices.
This is what it suggested:
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
//WRAP_CONTENT param can be FILL_PARENT
params.leftMargin = 206; //XCOORD
params.topMargin = 206; //YCOORD
childView.setLayoutParams(params);
so can someone tell me why this is happening? setX and setY supposed to make it easier...right? please if I'm just speaking none sense and you could solve this for me I'd appreciate it a lot, I latterly tried everything!