Realize the ground glass effect in IOS in Android

In order to achieve the ground glass effect, we need a set of compute kernels (. Written in RS file) and a set of Java APIs used to control renderscript related (. RS file is automatically generated into Java class). Because the compilation of compute kernels requires a certain learning cost, from Jerry_ BEAN_ Since MR1, androied has built in some compute kernels for common operations, including Gaussian blur.

Next, let's explain how renderscript realizes Gaussian blur through practical operation, and finally achieve the effect (blurring the text background):

Implementation code:

The layout is as follows:

The above is what Xiaobian introduced to you about realizing the ground glass effect in IOS in Android. I hope it will be helpful to you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>