For a simple example, let's say I want to optimize my application's interface layout for whether the phone is in portrait or landscape mode. I simply make two copies of the layout definition and place them in specially-named resource folders, like such:
res/
layout/
main.xml # basic layout
layout-port/
main.xml # optimized for portrait mode
layout-land/
main.xml # optimized for landscape mode
Then all my application needs to do to load the layout is: setContentView.(R.layout.main);
Android then takes care of loading the appropriate layout element on the fly based on the device's capabilities and state. All I have to do is include optimized versions of the layout for whatever I think in important.This capability not only covers screen orientation, but screen resolution, screen DPI, touch versus stylus input, hardware or software keyboard, and more [1]. And it all comes basically for "free" because my actual code doesn't have to know about any of it; it just asks for the base resource, and Android does all the selection for me.
So yes, running on lots of devices is part of Android's plan, and they've been working from day 1 to mitigate all of the problems inherent with targeting a divergent platform, and it works. So yes, Android will "scale" to any number of devices, and it's trivial for developers to stay on top of everything if they use the SDK the way it was designed.
[1] http://developer.android.com/guide/topics/resources/resource...