Jau*_*ume 8 java eclipse html5 android jquery-mobile
将HTML加载到webview后,我会在布局的右下角出现白色条纹.对于正确的我使用以下方法解决它:
setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
但是,我已经尝试了许多选项来删除底部没有成功.甚至在我阅读了所有相关帖子之后.如果需要更多代码,请告诉我.
XML
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView android:autoLink="web"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webview1"
android:textColor="@android:color/black"
></WebView>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
活动
browse = (WebView) findViewById(R.id.webview1);
browse.getSettings().setJavaScriptEnabled(true);
browse.getSettings().setUseWideViewPort(true);
browse.getSettings().setLoadWithOverviewMode(true);
browse.setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
browse.setScrollbarFadingEnabled(false);
Run Code Online (Sandbox Code Playgroud)
小智 3
在您的 WebView xml 中,添加 android:scrollbars="none"
<WebView android:autoLink="web"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webview1"
android:textColor="@android:color/black"
android:scrollbars="none"
></WebView>
Run Code Online (Sandbox Code Playgroud)
并删除setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
| 归档时间: |
|
| 查看次数: |
1854 次 |
| 最近记录: |