So in my App, when the keyboard appears, the whole layout is resized to fit above it, which is exactly what I want except for the background image, I want it to stay the same size.
After some research, I saw a solution was to set the background programmatically (not using an ImageView in the XML):
getWindow().setBackgroundDrawableResource(R.drawable.background);
Which works to some extent, as it dosn't get resized when the keyboard appears, but the image is stretched to fit the screen's ratio. I found another solution to combine using xml resources:
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/background"
android:tileMode="repeat">
</bitmap>
Using this, the drawable stays the right ratio but isn't scaled down to the size of the screen (tried using the gravity attribute but it didn't do anything).