In my application, I am using my custom color picker widget. In the However, the result I get is not what I would like to receive. Below you can see what looks like the As you can see it does not work completely ... edit (Possible solutions): To work, I have to use the following code: Although I really can not understand how this line of code affects my application. I mean the IU understands that it sets It is intended for Android 4+, in which hardware acceleration (AA) is enabled by default. Before 4.0, you may optionally be enabled in your AndroidManifest.xml. Hardware acceleration completes all drawing tasks, which are done on the canvas of the view using GPU, which is good because it should be fast but when the HA is enabled, some drawing method is not supported Are there. You can use only a subset of drawing methods to use acceleration. There is a problem with your case, because the documentation says (see), that You can find your Android manifest.XML or per activity or per view as you are now Please note that there is a bug in Android which is fixed in 4.1 (view) And as a result your If you disable a view for a scene, then you do not have to enable it back, because it only affects the drawing of your view. onDraw method I mix two
shaders using the following code:
composeshader mShader = new composeshader (mValShader, mSatShader, PorterDuff .Mode. Multiplied);
shader mentioned above:
+ =
Result of Results ( More or less) should look:
if (Build.VERSION.SDK_INT> = Build.VERSION_CODES .HONEYCOMB) {setLayerType (see PLAYERLAYER_TYPE_SOFTWARE, tap); }
hardware acceleration , is there any result of doing this for my application? Should I turn it on after the
Shader drawing? Can anyone be explained?
composeshader can have only different types of shaders (for example a bitmap shader and one Rainiergradian, but not two examples of bitmapshare)
Disabling hardware acceleration.
& lt; Apps Android: Hardware Expected = "False" ... & gt;
& lt; Application Android: Hardware Expected = "True" & gt; & Lt; Activity ... /> & Lt; Activity Android: Hardware Expected = "False" /> & Lt; / Application & gt;
setLayerType (see PLAYER_LAYER_TE_SOFTWARE, null) calls will be ignored in some Android versions (for example 4.0.2).
No comments:
Post a Comment