Thursday, April 17, 2014

Soft keyboard input boxes blocking the top of the web page in a webview


One of my activity with webview opened a web page, but when you enter the page input box pops up when the content of the soft keyboard to input box, very convenient, the Internet to find some solutions such as plus android in the manifest file: windowSoftInputMode = "stateHidden | adjustResize phrase the question is set fullscreen phrase is a hidden system title bar now if the hidden system title bar phrase deleted no problem, if you add this Hide system title bar on top of android: windowSoftInputMode = "stateHidden | adjustResize this sentence will not work, and now I have to set this activity requires a full-screen, seeking expert answers troubled for a long time
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Their top, no one will do this problem
Reply:
Set full-screen, there are two ways, as follows:

Set in the code:
public void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);

/ / Set Untitled
requestWindowFeature (Window.FEATURE_NO_TITLE);
/ / Set fullscreen
getWindow (). setFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

setContentView (R.layout.main);
}


In the configuration settings in the manifest file

package = "com.andyidea"
android: versionCode = "1"
android: versionName = "1.0">



android: theme = "@ android: style / android.NoTitleBar.Fullscreen"
android: label = "@ string / app_name">








As for your soft keyboard that, take a look through the set fullscreen, use android: windowSoftInputMode = "stateHidden | adjustResize can achieve the effect you want
!
Reply:
Try
android: windowSoftInputMode = "adjustPan"
Reply:
Dude
2 floorThat use code written in full-screen certainly die I tried what you said that in the configuration file to write android: theme = "@ android: style / android.NoTitleBar.Fullscreen"
This error ah theme into the herd there is no @ android

Reply:
Jacking
Solving
Reply:
Bangding, but also more to this issue. . .
You try to add a layer of scrollView in WebView outside it? I added into the black, and you try it, if you resolve to say to me. . . I was out of the input box with the interface. . . Ing depressed
Reply:
Solve the problem outside the layout must be used with a linear layout methods can be upstairs but the premise must be linear layout
Reply:
LZ can share under the method set has failed
Reply:
reference to the 7th floor of replies:
solve the problem outside the layout must be used with a linear layout methods can be upstairs but the premise must be linear layout

I webView plus a linear layout but still does not work ah
Reply:
In it, big brother, the same problem ah. Seeking help ah,,,,,
Reply:
The official document is written so:
Window flag:. Hide all screen decorations (such as the status bar) while this window is displayed This allows the window to use the entire display space for itself - the status bar will be hidden when an app window with this flag set is on . the top layer A fullscreen window will ignore a value of SOFT_INPUT_ADJUST_RESIZE for the window's softInputMode field; the window will stay fullscreen and will not resize
.
http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html # FLAG_FULLSCREEN

No comments:

Post a Comment