I faced the ditto same problem while designing splash screen for my app (followed the same link that you mentioned above and a few others) , and a bit of googling got me my answer.
The solution is simple and does not involve coding. ie. you do not need to specify height and width in your xml. As for why this is happening, your image resolution is higher than as specified below.
SOLUTION :
You need to provide image of various resolutions that map to various screen sizes. Following is a list of minimum screen size for various displays as provided by Google (all in pixels) :-
For Android Mobile Devices
LDPI- 426 x 320
MDPI- 470 x 320
HDPI- 640 x 480
XHDPI- 960 x 720
For Android Tablet Devices
LDPI- 200 x 320
MDPI- 320 x 480
HDPI- 480 x 800
XHDPI- 720 x 1280
So all you need to do is resize your image for all sizes, load the images in Drawable according to their sizes (Ex: drawable-hdpi contains the hdpi image) and pass it to the background_splash.xml (you can keep the same name ofcourse). Rebuild the project and run it. Should be as per your specification.
Note: Code does not need to be changed at all. For image resizing, you can use Adobe Photoshop (I find it easier to work with).
According to preference, you may also use 9 Patch image so that the image's border can stretch to fit the size of the screen without affecting the static area of the image.
http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…