Android: how can i tell if the soft keyboard is showing or not?
        Posted  
        
            by 
                binnyb
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by binnyb
        
        
        
        Published on 2010-08-25T18:08:03Z
        Indexed on 
            2011/01/17
            5:53 UTC
        
        
        Read the original article
        Hit count: 280
        
android
Heres the dilemma: I am showing a screen with 3 input fields and 2 buttons inside of a tab(there are 3 tabs total, and they are on the bottom of the screen). the 2 buttons are set to the bottom left and right of the screen, right above the tabs. when i click on an input field, the tabs and buttons are all pushed up on top of the keyboard.
i desire to only push the buttons up, and leave the tabs where they originally are, on the bottom. i am thinking of setting the visibility of the tabs to GONE once i determine that the soft keyboard is showing, and visibility to VISIBLE once the soft keyboard is gone.
is there some kind of listener for the soft keyboard, or maybe the input field? maybe some tricky use of OnFocusChangeListener for the edit text?  How can i determine whether the keyboard is visible or not?
© Stack Overflow or respective owner