These can be imported as an existing project into your eclipse workspace.
You can find the project files in the ANDROID_SDK\samples\android-XX\SoftKeyboard
folder (where XX is a certain api level).
To import them inside eclipse, go to File -> New -> Other -> Android Project
. Then select create project from existing source
and select the folder above as the location. Pick the appropriate API level below if none is selected and press finish. And thats it, you got yourself a shiny new android project that you can run like every other one.
Keep in mind that all api samples come preinstalled in every emulator. So if you want to test this in a emulator, you have to uninstall the preinstalled version first. Either run adb uninstall com.example.android.softkeyboard
from the command line of your OS or uninstall the examples via Preferences -> Applications
in the emulator itself.
The different versions in the folder are for the different API levels (What is an API level?) of android. That just means they are written to support that api level and above. Depending on what has changed between the versions, there might be no difference at all between the files.