Determining if the keyboard is showing is not possible apparently.
You might want to disable it alltogether with the windowSoftInputMode
xml tag in your manifest: http://developer.android.com/reference/android/R.attr.html#windowSoftInputMode. Or you can have a look on how to remove focus to hide the keyboard: Hide soft keyboard on activity without any keyboard operations.
Neither will exactly solve your problem. I remember reading a blogpost strongly advising not to use tabs at the bottom, rather than the top of the screen, for UI clarity reasons. I recommend you to follow up on that.