我在這裏做了一個不合適的事情,我知道它,但我有一個嵌套在horizontalscrollview中的webview。 (我需要更多的滾動控制比網頁視圖提供。)內容伸展填充HorizontalScrollView
佈局看起來像這樣:
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webRel"
android:layout_below="@+id/titlebar"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<WebView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webZ"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</HorizontalScrollView>
而結果如下:
web視圖未填滿horizontalscrollview 。 horizontalscrollview提交視圖,所以我想我可以說webview並沒有填充視圖,即使我已經設置爲fill_parent。我真的很喜歡它,如果有人會幫助我弄清楚如何讓webview在橫向上填充horizontalscrollview ...因爲然後我測量高度並使用該測量對文本進行分頁(然後將文本分段顯示所以我選擇了horizontalscrollview)
:d
(或者,更清潔的方式建議,在網頁視圖平滑水平滾動條也將是有益的)
救了我的一天:) – tacone 2011-03-26 15:44:47
我以前遇到過這個問題,但今天我忘了我是如何解決它。現在你救了我,我敢打賭你是醫生^ _ ^ – neevek 2012-08-16 11:13:15