FStarting off from sample from http://developer.android.com/guide/topics/text/creating-input-method.html