1. What are the four components of Android, and what are their roles?
(1), activity:activity is the windows of Android program and user interaction, is the most basic of the Android building block, it needs to maintain the state of all walks of life, do a lot of persistent things, properly manage the life cycle and some jump logic
(2), service: is the implementation of Android in the background to run the solution, it is very suitable for those who do not need and user interaction and also require long-running tasks, background services to the activity, encapsulation has a complete functional logic implementation, accept the upper instruction, complete the related things, Define the intent that need to be accepted provide synchronous and asynchronous interfaces
(3), Content Provider: is the third-party application data provided by Android access scheme, can derive Content Provider class, provide data to the outside, can be like a database to choose sorting, shielding the internal data storage details, to provide a unified Excuse model, greatly simplifies the upper application, and provides a more convenient way to integrate the data.
(4), broadcast Receiver: Accept one or more intent as triggering events, accept the relevant messages, do some simple processing, converted into a notification, unified the Android event broadcast model
2. What are the types of animations in Android, and what are their characteristics and differences?
A: Two, one is tween animation, there is also a frame animation. Tween animations, which enable the view component to move, zoom in, zoom out, and create transparency, another frame animation, a traditional animation method, is implemented by sequential playback of a well-arranged picture, similar to a movie.
3. What kinds of XML-parsing classes are in Android? What kind of official recommendation? and their principles and differences.
A: There are three main ways of parsing XML, SAX, DOM, pull. General development on the PC we use the DOM relatively easy, but some performance-sensitive database or mobile phone is mainly sax, sax read is one-way, the advantages: not account for memory space, parsing properties convenient, but the disadvantage is that nested multiple branches for processing is not very convenient. And Dom Way will load the entire XML file into memory, where the Android Development network to remind you that the method in the search aspect can and XPath good combination if the amount of data is not highly recommended, and pull is often used in J2ME for node processing is better, similar to sax mode, Also very memory-saving, in J2ME we often use the Kxml library to parse.
Android Basic problem