I'm brand new at this, but was just reading about this in "The Busy Coders Guide..."
You can force Pan or Resize in you layout activity using: <activity android:name=".IMEDemo2" android:label="@string/app_name" android:windowSoftInputMode="adjustResize"> or I presume "adjustPan" Kenny A. Chaffin KAC Website Design - http://www.kacweb.com Art: http://www.kacweb.com/pencil.html Photo Gallery: http://www.kacweb.com/cgibin/emAlbum.cgi "Strive on with Awareness" - Siddhartha Gautama -----Original Message----- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Mathias Lin Sent: Monday, September 06, 2010 6:49 AM To: Android Developers Subject: [android-developers] How does Android determine whether to move the layout up when showing the softkeyboard? How does Android determine whether to move the layout up when showing the softkeyboard? Note: I am aware that the activity property android:windowSoftInputMode="adjustResize|adjustResize| adjustUnspecified" exists, as described here http://developer.android.com/guide/topics/manifest/activity-element.html#wso ft , but in my case it doesn't seem to have any effect. This is my problem: I have two activities, pretty much the same layout, but the first one is using a ListView that holds a list of buttons. The second activity holds a scrollview with buttons. The rest is the same, same number of buttons, same height of elements, etc. (All elements fit on the screen, so actually the user doesn't need to scroll in the scrollview or listview.) Please see my screenshot to get an idea: http://i.imgur.com/UNXPz.png Now, when I press the search button to open the search input bar, in my first activity, the entire layouts gets moved up. While on the second activity, the layout is not being moved up but the softkeyboard just displays on top of it. This is actually how I want it to behave. How can I achieve the same with my activity that's using the ListView? In my manifest, initially I didn't specify any android:windowSoftInputMode attribute, but even if I do, it doesn't make any difference; I tried all three values (adjustPan, adjustResize, adjustUndefined, without any difference). This is my layout: http://i.imgur.com/UNXPz.png (I'm not posting any code here for now, I'm more interested generally how it's been exactly determined whether Android moves the layout up or just displays they softkeyboard right on top of the existing layout without moving it.) I couldn't find a specific logic that's been followed. When I reduce the number of buttons, when I even wrap the listView in a ScrollView (just for the sake of trying to see what's happening), the layout just won't stay fix. On the other hand then, I have activities in my app that contain only one large ListView, and on that one the layout also remains fixed. First I thought it's related to ListViews, but it seems not to. btw: nowhere in my manifest am I explicitly specifying the windowSoftInputMode attribute. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en