generally very short.The Ps:view class contains surface (variable name msurface), each surface typically corresponds to two buffer, a front buffer, and a back buffer.(After 4.1 is 3, one before, two after) where back buffer is the corresponding bitmap (research Android_view_surface.cpp::lockcanvas) for canvas drawing.Therefore, the painting is always on the back buffer and needs to be updated, swap back buffer with front buffer.Draw + Process + Execute = Full display of one frame,This time is l
To use global variables in Android apps, in addition to static variables of public, you can also use android. app. Application in a more elegant way.
When the Application is started, the system creates a PID, that is, the process ID, and all the activities will run on this process. In this case,When the global variables are initialized, all the activities of the
To write Android games, Java is too difficult to try the app Inventor, although some people think he is a middle school toy, but also can write 2048 such a hot game, do not need too complex algorithm.The entire game has several modules:First, game initializationThe sequence is transformed into a graph, using the canvas and the sprite, relative to the list, here Note that the elf position is fixed, just chan
Use the Dumpsys tool to view activity-related informationADB shell Dumpsys activity > 1.log//Save relevant information to 1.logADB Shell Dumpsys Activity | grep "Running Activities"-A 7//-a 7 indicates that matching rows and 7 rows of data are displayedView Help: adb shell Dumpsys activity-hThe first one is the activity name of the current interface. ↓↓↓↓↓↓↓↓Dumpsys There are other parametersReference:1, http://riusksk.blogbus.com/logs/272125296.html2
Android provides a variety of data storage methods, the simplest of which is to use Shared Preferences. shared Preferences can store Key/value pairs. Shared Preferences supports accessing boolean, float, long, integer, string. The most common use of Shared Preferences is to store some application Preferences. In addition, onSaveInstanceState () is used to save the UI state.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.