I have a draggable popup window fragment. I need to get the x and y coordinates of that fragment in onSaveInstanceState(). I got the width and height of the fragment by using getView().getWidth() and getView().getHeight(). But if i use getView().getX() or getView().getY() giving 0.0. Is there any chance to get the coordinates?