I've run into a problem, everything was fine prior SDK 23. But now I get these errors:
W/art: Throwing OutOfMemoryError "Failed to allocate a 61819212 byte allocation with 4032304 free bytes and 3MB until OOM"
W/JavaBrowserViewRendererHelper: Error allocating bitmap
E/chromium: [ERROR:java_browser_view_renderer_helper.cc(133)] Error unlocking java bitmap pixels.
And WebView is not displaying. This is my layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/post_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff">
<ScrollView
android:id="@+id/scrollview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:fillViewport="false"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollbars="vertical"
android:touchscreenBlocksFocus="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:orientation="vertical"
android:touchscreenBlocksFocus="false">
<ImageView
android:id="@+id/icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/placeholder" />
<TextView
android:id="@+id/textView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|top"
android:layout_marginBottom="30dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="30dp"
android:gravity="center|center_horizontal"
android:text="Title"
android:textAppearance="?android:attr/textAppearanceLarge" />
<WebView
android:id="@+id/webView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/textView"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollbars="none" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center" />
<ImageView
android:id="@+id/nextprev"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="30dp"
android:adjustViewBounds="true"
android:src="@drawable/nextprev" />
</LinearLayout>
</ScrollView>
As you can see WebView is in ScrollView, cause I want that views above and below WebView to scroll. I've also tried solutions without ScrollView from here Webview in Scrollview and WebView loads just fine, but whatever is above scrolls out but leaves blank space covering WebView.
I don't know, maybe is it just emulator fault? Anyway I would love to know what's causing this and how to solve it.