I am working on a scrollview that contains a web view, it works fine on 2.3, 4.1, but when I try to use it in 4.4 emulator, it shows
View too large to fit into drawing cache, needs 5744640 bytes, only 3932160 available
Web browsing is simply empty.
And this is the layout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:overScrollMode="never" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="5dp" > <TextView android:id="@+id/newsTitle" android:textSize="18sp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/last_update" /> <WebView android:id="@+id/newsContent" android:layout_width="match_parent" android:layout_height="match_parent" android:text="@string/last_update" /> <TextView android:id="@+id/newsDate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/last_update" /> </LinearLayout> </ScrollView> </LinearLayout>
I tried using mywebView.setDrawingCacheEnabled(false); but it just returns the same warning.
In addition, I found that the problem occurs when the web page has a screen size, but when I show it, I find that the layout of the web interface is slightly different, by 2.3, 4.1, it can just start a new line if this word exceed the page, but in 4.4 this is not so, so part of the word is off screen.
How to fix it? Thanks
android webview scrollview
user782104
source share