Using a specific number of pixels to set the position will not scale very well.
To illustrate the problem of "Gdx.graphics.getWidth() - 100":
- If the width was 400, then subtracting 100 would move it 1/4th of the screen width.
- If the width was 800, then subtracting 100 would move it 1/8th of the screen width.
This is why your UI gets messed up because the button's relative position on the screen changes. To fix that, try setting the position based on a percentage of the screen size. Something like:
button1X = Gdx.graphics.getWidth() * 0.1;
button2X = Gdx.graphics.getWidth() * 0.5;
button3X = Gdx.graphics.getWidth() * 0.9;
These three buttons will always be positioned at 10%, 50%, and 90% of the screen width, so no mater what the screen size is they will stay in their relative positions.
Also, I did not take into account width of the button, so depending on how you want to position your buttons you may need to take that into account also.