Hi!
I am having trouble finding the API call to obtain information about
whether the keyboard is revealed or not.
When I am in portrait mode (keyboard hidden), and I slide the screen
out (to reveal the keyboard), the following line is printed:
I/WindowManager( 51): Input configuration changed: { scale=1.0
imsi=0/0 locale=en_US touch=3 key=2/1 nav=3 orien=2 }
When I am in landscape mode (keyboard revealed), and I slide the
screen in (to hide the keyboard), the following line is printed:
I/WindowManager( 51): Input configuration changed: { scale=1.0
imsi=0/0 locale=en_US touch=3 key=2/2 nav=3 orien=1 }
Notice the "orien" values, 1 and 2. 1 seems to correspond to portrait
mode, while 2 seems to correspond to landscape mode.
My question is... how can I obtain the "orien" value?
The reason for this is that I want to show or hide particular UI
elements based on whether the keyboard is showing or not.
I understand that one way (perhaps the superior way) is to have
independent res/layout xml files; however I would still like to be
able to control certain elements based on the "orien" value. Is there
an input configuration change listener? How have you determined this
input configuration state?
Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---