Align keyboard at bottom of screen if there's plenty of space (tablets). Use simpler logic (do as little as possible programatically, use XML to do heavy lifting).