In android , i am creating a button in relative layout.i want to know the x and y possition of button
button_open=(Button)findViewById(R.id.btn_alert);
button_x=button_open.getX();
button_y=button_open.getY();
but i get 0.0, 0.0 respectivelyt for the floating variables button_x,button_y.