Tôi gặp vấn đề về bộ nhớ bố cục. Khi tôi có một webview lớn nó không hiển thị bất cứ điều gì và logcat cho thấy "Xem quá lớn để phù hợp với bộ nhớ cache vẽ".WebView và GridView vào ScrollView, Xem quá lớn để vừa với bộ nhớ cache vẽ
Việc bố trí là:
<ScrollView
android:id="@+id/scrollNoticia"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ficha_curva"
android:layout_below="@+id/linea"
android:scrollbars="none"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="12dp"
>
<WebView
android:id="@+id/webViewNoticia"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
/>
<GridView
android:id="@+id/gridGaleria"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/webViewNoticia"
android:horizontalSpacing="4dp"
android:verticalSpacing="4dp"
android:numColumns="4" >
</GridView>
</RelativeLayout>
</ScrollView>
Bạn có nhận được giải pháp nào cho vấn đề này không ?? –
Không có giải pháp nào ... –
Có, tôi nhận được giải pháp là giải pháp khác, tôi tính chiều cao của webview và nếu nó lớn hơn chiều cao cụ thể, tôi chỉ thay đổi chiều cao của webview thành chiều cao cụ thể đó. Tôi đang sử dụng tính năng này trong ứng dụng hiện tại của mình và hoạt động tốt –