问题
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?
回答1:
The direct answer to your question (Does View.LAYER_TYPE_SOFTWARE
disables the hw acceleration or not?) is YES. It actually disable hw acceleration, but only at a view level, i.e. hw accl is disabled in imageView
in your case, while setting android:hardwareAccelerated="false"
will disable hw accl for your whole application.
For more detailed, please refer this link.
来源:https://stackoverflow.com/questions/17814680/why-imageview-setlayertypeview-layer-type-software-null-and-application-and