0

For all of my apps, when you are entering String into the Text Fields and you turn the screen sideways, the entire view turns white. Here are some images to show it:

9:16 aspect ratio, vertical:

enter image description here

16:9 aspect ratio, horizontal:

enter image description here

Is this an easy fix or is there serious time commitment in order to make this word properly for landscape orientation as well?

Bill Agee
  • 3,516
  • 19
  • 17
Michael Yaworski
  • 13,049
  • 19
  • 64
  • 94

4 Answers4

2

put android:imeOptions="flagNoExtractUi" in the EditText XML properties

0

That's actually the way the keyboard works when you input text in landscape. I don't think there's any other way to change or get rid of the white background, but the TextView should still work the same.

Michael Yaworski
  • 13,049
  • 19
  • 64
  • 94
TheWizKid95
  • 711
  • 6
  • 16
0

See this post, you can try to override the UI full screen editing method with:

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {

    outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI;

    // etc.
}
Community
  • 1
  • 1
Nick
  • 9,160
  • 33
  • 102
  • 143
  • I just get an error when I put that. It tells me to remove the `@Override` statement and then when I do, it tell me that the method needs to `return` something or be cast as `void`, neither of which work. – Michael Yaworski Jul 29 '13 at 21:24
0

When a screen rotation takes place, the current activity is destroyed and recreated. This may be the cause of your issue.

Maybe this SO post will help...

https://stackoverflow.com/a/1673374/1246574

Also here's the documentation that gives details about how to handle activity life cycle, including when an activity is destroyed due to screen rotation...

http://developer.android.com/training/basics/activity-lifecycle/recreating.html

Community
  • 1
  • 1
Jim
  • 6,555
  • 12
  • 42
  • 71