how to handle android different device size

view story

http://stackoverflow.com – I know many persons have asked this question, but I really can't get a clear answer. I am new to android, and find it's hard to have my layout work well on all different size devices.Below is the problem:(I put the sprite image in drawable-hdpi folder). On mdpi device with resolution 320*480,the screen looks like this: on hdpi device with resolution 480*800, the screen looks like this: both images above looks good, but when on mdpi device with resolution 480*800, the screen is looks bad like this: Could you please tell me how to solve this problem? I can't understand why it's mdpi device (HowTos)