Android uses SurfaceView to make simple tablets

Some people say that SurfaceView is the twin brother of View. In fact, SurfaceView is also inherited from View, but View can only be drawn in the main thread, while SurfaceView can be drawn in the sub-thread. In this article, we will not introduce the basic usage of SurfaceView, but only how to use SurfaceView to make a simple writing board. ...

Posted by robin105 on Fri, 29 Mar 2019 18:36:30 -0700

The surface has been released error causes (pro-test validity)

Looking at a lot of information from the Internet, I found that many of them are wrong, so I intentionally updated the reasons for this problem today. When playing mediaPlayer.start(), SurfaceHolder did not come and called onCreate() method to create view, which resulted in the holder not loading successfully, because ...

Posted by mirana on Wed, 06 Feb 2019 13:36:17 -0800

Andriod applet-simply making a wheel to control the movement of tasks in the game

Andriod applet - Simply making the wheel that controls the movement of characters in the game Explain Customizing your own view inherits from the View class Override onDraw() method When we see this control, it looks like that, as shown in the figure. Perfecting onDraw() Method Rewrite the OnTouch() method Update onDraw() ...

Posted by Zomie on Tue, 29 Jan 2019 02:54:15 -0800