垂直滾動,在我的Android應用我有一個網頁視圖:我不能在網頁視圖
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<WebView
android:id="@+id/webView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
我的問題是,我不能垂直滾動頁面。水平它工作得很好,但不垂直。現在,如果我將android:layout_height的大小設置爲400dp,那麼它可以工作!但後來我無法支持多種屏幕尺寸......任何想法?
爲什麼不將WebView設置爲'fill_parent'? – Adinia
它不工作 – Alexis
嗯,我使用的是一個RelativeLayout,因爲我需要WebView旁邊的其他元素,但正確的LinearLayout(即與羅馬黑的答案中的方向設置)也應該工作;也許這是你的Java代碼的問題?或者您嘗試打開的HTML頁面?嘗試在你的問題中添加更多的代碼。 – Adinia