Android imitation 360 suspended ball custom view implementation example
Android imitation 360 suspended ball custom view implementation example
The renderings are as follows:
The current similar effect is similar to that of 360 small ball suspended desktop. How is this effect achieved. No more nonsense, go straight to the code.
1. Create a new project and add suspended window permission.
2. Customize a floatmessagermainwindow
Call method:
To achieve this, click the button to realize the suspended window. (a corresponding crash may occur here. The reason for the crash is that the levitation permission of the levitation window is turned on.)
4. I take the official simulator as an example to open the suspension permission:
Open administrative permissions allowed on other apps
At this time, open the project again and click the button to realize the suspension effect.
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.