I think the button in some layout that takes care of positioning. If you modify layoutX this means during the next layout pass the Button is simply put back "where it belongs" by the parent layout.

If you want to move the Button, you should choose a different layout as parent or use the translateX property instead. translateX moves the Button relative to the position where the parent layout places it (layoutX).