Reputation: 11782
I have a webView inside a scrollView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_header"
/>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="match_parent"
>
<WebView
android:id="@+id/webView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</ScrollView>
</LinearLayout>
But it won't let me get keyboard when I click on form field or edit box in webView like login fields etc
I have tried removing scrollView . perhaps its because once the values are recorded that is I made the webView "Remember" those fields and that is why the keyboard is not showing? How can I fix this
What should I do :(
Upvotes: 0
Views: 596
Reputation: 3215
can you please check this .read from here
http://developer.android.com/guide/topics/manifest/activity-element.html
android:windowSoftInputMode=["stateUnspecified",
"stateUnchanged", "stateHidden",
"stateAlwaysHidden", "stateVisible",
"stateAlwaysVisible", "adjustUnspecified",
"adjustResize", "adjustPan"] >
android:configChanges="orientation|keyboard"
try this
InputMethodManager imm = (InputMethodManager)this.getSystemService(Service.INPUT_METHOD_SERVICE);
for hiding
imm.hideSoftInputFromWindow(ed.getWindowToken(), 0);
to showing
imm.showSoftInput(ed, 0);
Upvotes: 0
Reputation: 1001
In the android manifest in the activity tag, see to it you have given this
android:configChanges="orientation|keyboard"
your code might have
android:configChanges="orientation|keyboardHidden"
check it out and let me know.
Upvotes: 1