LibGDX resizing window

So I’m making a game with LibGDX, and am pretty far into the development. I’m not using scene2d right now, and don’t plan on switching over because it seems like too much work for little gain (I will use scene2d for future projects). So right now all of my UI is done with BitmapFonts manually positioned around as text and buttons. I noticed that when I resize my window and change screens, the positioning of my UI gets messed up. I’m positioning everything relative to Gdx.graphics.getWidth() and Gdx.graphics.getHeight() (example: buttonX = Gdx.graphics.getWidth() - 100). So what is a good way to position my UI so that it can be resized and still retain the same layout, without tapping into scene2d?