Android master advanced tutorial (22) collection of several image special effects processing in Android!!
Hello, everyone. In this section, we will share some tips for image special effects processing in Android, such as rounded corner, reflection, image scaling, drawable to bitmap, bitmap to drawable, etc
No more nonsense. Let's explain today's example directly. This example is mainly to obtain the wallpaper (getwallpaper()) and then deal with some special effects of the current wallpaper. Let's follow step by step:
Step 1: create a new Android project named imagedemo. The project structure is as follows:
Step 2: create a new. Java file named imageutil.java, and define some image processing methods in it. The code is as follows:
Step 3: modify the main.xml layout file and put two ImageView controls. The code is as follows:
Step 4: modify the main core program, imagedemo.java, with the following code:
Step 5: run the above project and check the effect as follows:
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.