2013年9月22日星期日

[Android] Soft keyboard blocking webview input box in the top pages of the

One of my activity with webview opens a web page , but the page content of the input box enter the soft keyboard to pop up when the input box , very convenient, the Internet to find some solutions such as in the manifest file plus android: windowSoftInputMode = "stateHidden | adjustResize phrase the question is set full phrase is hidden system title bar now hide the system title bar if the sentence deleted , no problem, If you add this Hide system title bar on top of android: windowSoftInputMode = "stateHidden | adjustResize this sentence does not work , and now I have this activity requirement is to set up full-screen , seeking expert answers troubled for a long time < br> ------ Solution ----------------------------------------- ---
set full screen, there are two ways , as follows:

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

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

setContentView (R.layout.main);
}


In the configuration file in the manifest

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 the soft keyboard , take a look through the full set , use the android: windowSoftInputMode = "stateHidden | adjustResize can achieve the effect you want !

------ Solution ------------------------------------ --------
try
android: windowSoftInputMode = "adjustPan"
------ Solution ---------------------------- ----------------
Bangding , but also more to this issue. . .
you add a layer of scrollView in WebView try it out ? I added into the black , and you try it , I say if the settlement . . . I was out of the box with the interface . . . Gloomy ing
------ eference -------------------------------------- -
their top , no one will question you
------ eference -------------------------- -------------
2 floor buddies
that use code written in full-screen certainly die I tried you said that in the configuration file to write android: theme = "@ android: style / android.NoTitleBar.Fullscreen" ;
it into the herd there is no error ah theme @ android

------ eference ------------------------------------ ---
jacking
solving
------ eference ----------------------------------- ----
solve problems outside the layout must be used with a linear layout methods can be upstairs , but the premise must be linear layout
------ eference - --------------------------------------
LZ can share the method has been set failure
------ eference ---------------------------------------

I webView plus a linear layout but still does not work ah
------ eference --------------------- ------------------
at you, big brother , the same problem ah. Seeking help ah ,
------ eference -------------------------------- -------
official documentation is so written :
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

没有评论:

发表评论