Why imageView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); and <application android:hardwareAccelerated="false" have different effect?
Asked Answered
E

1

9

I wonder why if I set

<application
   android:hardwareAccelerated="false"

using svg-android i see no image (due to hw acceleration problem?), but if I set

imageView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

I can get it to work.

Does View.LAYER_TYPE_SOFTWARE disables the hw acceleration or not?

Epaminondas answered 23/7, 2013 at 15:35 Comment(0)
P
10

The direct answer to your question

(Does View.LAYER_TYPE_SOFTWARE disables the hardware acceleration or not?)

is YES.

It actually disable hardware acceleration, but only at a view level, i.e. hardware acceleration is disabled in ImageView in your case, while setting android:hardwareAccelerated="false" will disable hardware acceleration for your whole application.

For more detailed, please refer this link.

Piddock answered 3/4, 2014 at 2:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.