Android Pen Questions

Source: Internet
Author: User

1. Please talk about the architecture of the Android system. A: The Android system uses a tiered architecture, from the high-level to the lower-level, which are application tiers, application framework tiers, System runtime tiers, and Linux core tiers.2. Talk about the five types of layouts commonly used by Android. A: There are five layouts in Android, namely: Framelayout (frame layout), LinearLayout (linear layout), Absolutelayout (absolute layout), relativelayout (relative layout), Tablelayout (table layout). (1) Framelayout frame layout, where all elements are placed in the leftmost area, and cannot specify an exact position for these elements, the next child element overlaps the previous child element, suitable for viewing a single picture. (2) LinearLayout linear layout, which is the most commonly used layout in the application, mainly provides a horizontal or vertically arranged model of the control, each of which is positioned in a vertical or horizontal way. (Default is Vertical) (3) Absolutelayout Absolute positioning of the layout, the axis of the way to locate the component, the upper left corner is (0,0) point, to the right x axis increment, down the y axis increment, the component positioning property is android:layout_x and Android:layout_ Y to determine the coordinates. (4) Relativelayout relative layout, depending on the other component or the top-level parent component to determine the location of the next component. Similar to the inside of CSS. (5) Tablelayout table layout, similar to table in HTML. Use TableRow to lay out, where TableRow represents a row, and each view component of TableRow represents a cell.3. Talk about how the Android data is stored. A: Android provides 5 ways to store data: (1) Use sharedpreferences to store data; it is a mechanism provided by Android to store some simple configuration information in an XML format that stores data in the device. Can only be used within the same package and cannot be used between different packages. (2) file storage data; File storage is a more common method, the method of reading/writing files in Android is exactly the same as the program implementing I/O in Java, providing Openfileinput () and Openfileoutput () method to read the file on the device. (3) SQLite database stores data; SQLite is a standard database with Android, it supports SQL statements, it is a lightweight embedded database. (4) Use ContentProvider to store data, primarily for data exchange between applications, enabling other applications to save or read the various data types of this content provider. (5) Network storage data, upload (store) and download (obtain) The data we store in cyberspace through the storage space provided to us on the network.4.Android activity, Intent, Content Provider, service each have what difference. A: Activity: Active, is the most basic Android application component. An activity is a separate screen, and each activity is implemented as a separate class and inherits from the active base class. Intent: Intention to describe what the application wants to do. The most important part is the data corresponding to the action and the action. Content Provider: An android application can save their data to a file, a SQLite database, or even any valid device. Content providers can work when you want to share your app data with other apps. Service: A program that has a long life cycle and no user interface.5.View, Surfaceview, Glsurfaceview What's the difference. A: View is the most basic and must be updated within the main thread of the UI to be slow. Surfaceview is a subclass of view, similar to using a double-slow mechanism to update the screen in a new thread so the refresh interface is faster than the view-Glsurfaceview is a subclass of Surfaceview, OpenGL dedicatedWhat is the role of 6.Adapter? What are the common adapter? A: Adapter is the adapter interface that connects the backend data to the front-end display. Common adapter are arrayadapter, Baseadapter, CursorAdapter, Headerviewlistadapter, ListAdapter, Resourcecursoradapter, Simpleadapter, Simplecursoradapter, Spinneradapter, Wrapperlistadapter, etc.what information is included primarily in the 7.manifest.xml file? A: Manifest: Root node, which describes all the contents of the package. Uses-permission: Ask for the security license you need to give your package a normal operation. Permission: A security license is declared to limit which programs can be components and features in your package. Instrumentation: Declares the code used to test this package or other Packages directive component. Application: Contains the root node of the application level component declaration in the package. Activity:activity is the primary tool for interacting with users. Receiver:intentreceiver enables the application to obtain data changes or actions that occur even if it is not currently running. Service:service is a component that can run at any time in the background. Provider:contentprovider is a component used to manage persisted data and publish it to other applications.

Android Pen Questions

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.