0
我正在为我的公司开发应用程序。其中一个按钮加载一个谷歌日历的网页视图。这工作得很好,我的所有其他webviews适当滚动。但是,当加载此日历时,它将调整为屏幕大小,并且不会滚动。我尝试在线性布局中设置webview并使webview 4096px的高度。这将日历扩展到屏幕底部之外,但不会滚动。我正在学习android,在我年轻时和所有命令行中都有一些编程经验。Android WebView不会滚动(加载嵌入的Google日历)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="4096px">
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="1020px"></WebView>
</LinearLayout>
的代码是
WebView calendar = (WebView) findViewById(R.id.webview);
calendar.setBackgroundColor(0);
calendar.setScrollBarStyle(3);
calendar.getSettings().setJavaScriptEnabled(true);
Toast.makeText(getApplicationContext(), "Loading Events Calendar", Toast.LENGTH_SHORT).show();
calendar.loadUrl("http://www.google.com/calendar/embed?src=blahblah%40blah.com&mode=Agenda");
JavaScript是用于web视图功能。任何帮助将不胜感激。