Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue On OpenGLRenderer : Path Too Large To Be Rendered To a Texture

i have a TextView inside of a ReleativeLayout which i set a big Text into that at runtime. the problem is about my ReleativeLayout background which is a rounded shape with a border. it doesn't set the background and in Logcat it says that :

12-12 16:26:56.602: W/OpenGLRenderer(7400): Path too large to be rendered into a texture

i've solved this issue by turning android:hardwareAccelerated to false in manifest file(one activity not whole application) , but it raise another error when i use sliding menu inside my Activity which it tells that :

12-12 16:37:05.717: E/AndroidRuntime(9520): java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@4633e3f8 

i have just a ListView without any bitmap inside of my SlidingMenu which is 6Wunderkinder SlidingLayer library.

any help would be appreciated.

like image 286
Arash GM Avatar asked Dec 12 '14 13:12

Arash GM


Video Answer


2 Answers

Finally solved it with just changing LayerType of my Fragment ScrollView from HardwareAcceleration to Software without setting HardwareAcceleration false for whole Activity which caused strange bahavior as mentioned on SlidingMenu :

<ScrollView 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layerType="software">
like image 81
Arash GM Avatar answered Oct 19 '22 23:10

Arash GM


This happens to me when i have a scrollview that is too long with a drawable in the rootview, this effects every device uniquely. My Nexus 9 will show most anything but my sony compact won't. It is not worth it to turn hardware acceleration off because on low end devices you will probably have a very choppy application.

In this situation you should probably consider using a listview or recyclerview instead to ensure your background element is not larger than the screen. Even XML drawables in the background of a not so long scrollview will create this error. I choose for safety and would redesign elements, simplu removing the background from the scrollview could be an options , and placing them as tiles in the inner elements.

It is seems strange but it must have to do with how the background is rendered by that rootview in a longer scrollview, because a scrollview itself can be quite long, with many complex elements without an issues, and background colors are as well never a problem..

like image 39
brian Avatar answered Oct 20 '22 01:10

brian