我有內部網頁視圖列表視圖。所以我創建了一個自定義列表視圖。 WebView禁止我點擊,所以我創建了一個webviewclicklistener。問題與自定義列表視圖的(的WebView在我的列表視圖),我有一個問題,讓我瘋了</p> <p>顯示
我的問題是,當我顯示一些圖像,我的webviews是「搖動」,就好像它想要加載圖像一千次。事實上,我發現一些元素的高度尺寸像每秒鐘一樣變化,這給人一種震動的感覺。
我發現修復它的唯一方法是爲我的列表視圖提供佈局:height值。 我的新問題是,當我舉例600dip,我有一個滾動條,但我不能看我的列表視圖的結尾。 如果我像1000dip一樣,我沒有滾動條,我也看不到我的列表結束。
這裏是我的佈局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:background="@drawable/woodbackground"
android:layout_weight="1">
<TextView android:background="@android:color/transparent"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:hint="Question" android:textSize="30px"></TextView>
<ScrollView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<WebView android:id="@+id/wvplquestion" android:layout_height="wrap_content"
android:layout_width="fill_parent"></WebView>
</ScrollView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@android:color/transparent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="vertical"
android:layout_weight="1">
<TextView android:background="@android:color/transparent"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:hint="Select Answer" android:textSize="30px"></TextView>
<ListView android:id="@+id/lvquestion" android:layout_width="fill_parent"
android:layout_height="600dip" android:prompt="@string/selectp" />
</LinearLayout>
而我的列表視圖定製佈局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:padding="3dip">
<WebView android:id="@+id/weblistview" android:layout_width="fill_parent"
android:layout_height="wrap_content"></WebView>
感謝您的幫助
是的,這就是我所做的。這不是最好的解決方案,因爲我有各種內容,但沒關係 – joris