Android Search dialog in landscape orientation - android

I'm using an android search dialog in my app, and it works fine in Portrait orientation. But as soon as you flip to landscape orientation the searchpage xml appears to be covered by a large white dialog box. If you do a search, the box is still there, and you hit the back button on the device or emulator, the large white box slides away and there are your search results. It seems like somehere in the code a layout width is set to fill_parent or something. I've looked around for a solution and someone suggested adding android:imeOptions="flagNoExtractUi" to seachable.xml in the xml folder, but that doesn't seem to have any effect.
I've discovered that it's the onSearchRequested(); method that is throwing up that white box that fills the screen. And it also may have something to do with the fact that the software keyboard isn't called when in landscape, vertical orientation.

You could create your own Dialog in the form of an Activity. You do that like this:
<activity
android:theme="#android:style/Theme.Dialog"
android:configChanges="keyboardHidden|orientation|screenSize"
android:name="ExampleActivity" >
</activity>
This Activity can of course be arranged any way you like via the XML. This way, you can gracefully handle the change from portrait to landscape.
Note: You only need the "screenSize" attribute if you are using ICS (14+).

Related

Get Android softkeyboard height _without_ "adjustResize"

I have an animation between two fragments. The second fragment will bring up a keyboard. As the keyboard will cover parts of the screen, I manually need to but a spacer view in there to adjust my view. Using android:windowSoftInputMode="adjustResize" will result in my transition-animation to be super laggy. Using adjustNothing on the other hand will make it smooth.
So is there any way to get the keyboard height without using adjustResize?
EDIT:
My question is different to f.e. Is there any way in android to get the height of virtual keyboard of device as I can't add adjustResize

How FaceBook is managing and removing the margins in landscape and keyboard open mode

I wonder and not getting how facebook manages to fit the layout on all screen sizes by removing the padding or margins as shown below in landscape mode and open keyboard mode.
If anyone has implemented the same or getting the logic behind it please let me know.
If you place the elements inside a ScrollView, they will automatically move up when the keyboard is open. You must also have android:windowSoftInputMode="adjustResize" in your AndroidManifest.xml file for the appropriate Activity.

Screen flashes white on EditText focus

My application has many different screens, but only screens with EditText's on them have this bug.
The page loads at a normal speed but once the user clicks in an EditText, The enitre screen flashes white except for the ActionBar for a noticable amount of time (maybe a quarter to half a second) and then goes back to what it is supposed to look like (the background is gray not white). This only happens on the first EditText focus after the activity starts so once the screen flashes once, it won't do it again unless the activity is reloaded.
Here is the relevant part of the manifest:
<activity
android:name="com.bottegasol.com.android.migym.View.Views.FeedbackActivity"
android:label="#string/title_activity_feedback"
android:logo="#android:color/transparent"
android:screenOrientation="portrait"
android:theme="#style/Theme.Example"
android:uiOptions="splitActionBarWhenNarrow" >
</activity>
There is nothing in it related to the SoftKeyboard resizing or anything like that. And the code contains no focus or keyboard change listeners.
I got this bug on a Motorola Razor Maxx and an HTC One X both running Jellybean. My emulator running api 10 didn't get this problem. Does anyone have any idea of where to start hunting for this? I couldn't find anyone else with this issue.

How to keep the UI views' sizes the same when the keyboard appears?

Please look at the attached screenshot, i have a fragment in the left appears over an exiting activity, but when the keyboard appears you can notice the components in the right activity layout are compressed . how can I design the layout of the activity to only scrolled up NOT compressed when the keyboard appears.
I've tried baboo post android:windowSoftInputMode="adjustPan": but I got the following results:
But as you see the screens are cut from the bottom ?!
You need to adjust android:windowSoftInputMode in the activity in which fragment is present
try using
android:windowSoftInputMode="adjustPan"
in you Manifest

How can I cause editing of EditText to happen in full screen mode?

As shown in the landscape images here: http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html .
I don't necessarily need to do the fullscreen thing, but my issue is that the EditText is below the soft keyboard and I cant figure out how to get the whole thing to display above it. Its a note field, and fills whatever open space there is from the end of my other fields to the bottom of the screen. Currently when I select the note, the screen moves up just enough to see the top of the note field, but this is not good enough. I want the top of the note field to move up to the top of the screen, to maximize what the user sees while they are editing the field.
My softInputMode in the manifest is adjustPan, but changing these settings has not done anything for me.
You need to add a ScrollView around the view to make it slide and change adjustPan to adjustResize (adjustPan is normally not recommended) to the activity on the manifest.

Categories

Resources