You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Sorry for my bad English. I have a screen that displays a pie chart and a combo chart of lines and bars. In portrait orientation there is no problem, the charts are displayed. However, in landscape orientation the combo chart is not displayed, and in the logs the message "WebView not displayed because it is too large to fit into a software layer (or drawing cache), needs 11107800 bytes, only 10368000 available" is constantly displayed. Could someone please tell me how to fix this problem?
I ran your code on a real device and couldn't reproduce this issue. Here are some potential solutions:
Are you using an emulator for testing? If so, please try testing on a real device.
Try setting the width of both charts to match_parent.
I’m not sure how large your data set is—if it’s very large, try using a smaller sample for testing.
Additional steps:
4. Do you have hardware acceleration enabled or disabled in your manifest (android:hardwareAccelarated)?
5. Lastly, try using only a ScrollView instead of a CoordinatorLayout.
It's a somewhat unclear issue, so this is all I can suggest for now. I believe it might be related to the emulator, and I’d be glad to hear your feedback on this.
I am testing on a real device. Adding "android:hardwareAccelarated=true" to the manifest did not solve the problem. This problem can occur regardless of sample size, but varies from device to device. Right now I modified the code a little by adding chartView.setLayerType(View.LAYER_TYPE_SOFTWARE, null) and it solved the problem on some devices, but I also encounter this on some devices, for example Samsung Note 10
Hi. Sorry for my bad English. I have a screen that displays a pie chart and a combo chart of lines and bars. In portrait orientation there is no problem, the charts are displayed. However, in landscape orientation the combo chart is not displayed, and in the logs the message "WebView not displayed because it is too large to fit into a software layer (or drawing cache), needs 11107800 bytes, only 10368000 available" is constantly displayed. Could someone please tell me how to fix this problem?
laout.xml code:
`<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.general.GeneralFragment">
</androidx.coordinatorlayout.widget.CoordinatorLayout>`
Charts code:
`private fun setPieData(data: PieChartModel) {
val chartView: HIChartView = binding.chartPie
val options = HIOptions()
The text was updated successfully, but these errors were encountered: