android - When keyboard open webview not scrolling -
i have application 50% native 50% webview. have 1 input in webview problem, when keyboard open not scrolling webview.
webview webview = (webview) findviewbyid(r.id.webview); webview.getsettings().setjavascriptenabled(true); webview.getsettings().setallowfileaccess(true); webview.setverticalscrollbarenabled(true); webview.setdownloadlistener(this); webview.requestfocus(view.focus_down); webview.requestfocus(view.focus_up); webview.loadurl("webview url");
webview layout:
<android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:popuptheme="@style/apptheme.popupoverlay" /> </android.support.design.widget.appbarlayout> <include layout="@layout/content_main" /> <relativelayout android:id="@id/activity_main" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff"> <relativelayout android:id="@id/header" android:layout_width="fill_parent" android:layout_height="260.0dip" android:layout_alignparentleft="true" android:layout_alignparentstart="true" android:layout_alignparenttop="true" android:background="@drawable/header" /> <relativelayout android:id="@id/logo_main" android:layout_width="170.0dip" android:layout_height="170.0dip" android:layout_above="@+id/container" android:layout_centerhorizontal="true" android:layout_marginbottom="28dp" android:background="@drawable/logo" /> <relativelayout android:id="@id/container" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@id/header"> <webview android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="100.0dp" android:layout_below="@+id/insert_link" android:layout_alignparentleft="true" android:layout_alignparentstart="true" android:layout_alignparentbottom="true" android:layout_centerhorizontal="true" android:layout_above="@+id/adview" /> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:layout_centerhorizontal="true" app:adsize="smart_banner" app:adunitid="@string/admob_banner_id" /> <textview android:id="@+id/downloader" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:layout_margintop="18dp" android:textsize="27dp" /> <textview android:id="@+id/insert_link" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/insert_link" android:textsize="17dp" android:layout_below="@+id/downloader" android:layout_centerhorizontal="true" /> </relativelayout> </relativelayout>
i tired solutions still same: webview doesn't scroll when keyboard opened
webview textarea doesn't pop keyboard
what can it?
you have resize layout when keyboard
open, scrollable in other area
set programmatically
getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_adjust_resize);
and change height of webview
android:layout_height="100.0dp"
to
android:layout_height="match_parent"
Comments
Post a Comment