Discover android interview preparation, include the articles, news, trends, analysis and practical advice about android interview preparation on alibabacloud.com
, Interview questions1.Which of the following statements about memory reclaim are correct? (B)A. the programmer must create a thread to release the memory.B. The memory reclaim program is responsible for releasing useless memory.C. The memory reclaim program allows programmers to directly release the memory.D. The memory reclaim program can release memory objects at the specified time.2.The following exception is a runtime exception (ABCD) (multiple c
created when the JVM is started. The heap memory that the object occupies is reclaimed by the automatic memory management system, which is the garbage collector.Heap memory is made up of surviving and dying objects. The surviving objects are accessible to the app and are not garbage collected. The object of death is the object that the app is inaccessible and has not been reclaimed by the garbage collector. Until the garbage collector reclaims these objects, they will occupy the heap memory spa
activity without switching the screen) and obtains the following results, for example:③ the activity life cycle when switching Cheng:④ change back to the activity lifecycle of the vertical screen:⑤ Add android:configchanges= "Orientation" property to the manifest file. Start the activity again, without switching the screen (normal boot) life cycle:⑥ plus android:configchanges= "orientation" property. Switch to a horizontal screen, the activity life cycle:⑦ plus android:configchanges= "orientati
= newtable;threshold = (int) (newcapacity * loadfactor);}In fact, it is to create a large array, the original data added back in. When will the resize method be triggered? When the number of current elements reaches the Loadfactor (default 0.75) of the total size of the array, the resize method is called, enlarging the array to twice times the original size;6. HashMap's Get methodPublic V get (Object key) {if (key = = null)return Getfornullkey ();int hash = hash (Key.hashcode ());for (entryE! =
6 faces of a cube?
A color consists of 4 values (RGBA), 4 vertices per plane, and a plane requires 16 values to describe the color
The cube has 6 faces and requires a total of 96 values to describe the color
Define a 96-length array to record the color, and then use the Gldrawarrays method to draw the cube
What kinds of light sources does 6.OpenGL es support?
Directional light
Positioning light
7. What is the meaning of the ambient light, scattered light
status bar?
Using the Notificationmanager.cancel method
11. How do I customize notification?
Remoteviews class to mate, often used for notifications and desktop widgets
Mode of Use: Remoteviews remoteviews=new remoteviews (Getpackagename (), r.layout. Layout name);
Notice how to associate: notification.contentview=remoteviews;
12. Describe how you can add an option menu to an activity?
Implementing the Activity.oncreateoptionsmenu Method
Adding m
Questions encountered during the interview:/HTTP//1, the ListView asynchronous loadingThe ListView loads the network picture asynchronously, uses the cache mechanism and the line Cheng to carry on the network picture, reads the memory cache, the file cache, the network downloads the picture. Strong reference Linkedhashmap, soft reference softhashmaptoBetter System Recycling variables, monitor the scroll state of the ListView,scroll_state_fling, scroll
Question:Briefly introduce the four loading modes of some activities.
Analysis:The four loading modes areStandard,Singletop,Singletask,SingleinstanceIn androidmanifest. xml. The Android: launchmode attribute of the activity element is set.
1. Standard: execute the following code:
Intent intent = new Intent(); intent.setClass(ActA.this, ActA.class); startActivity(intent);
A new activity instance is generated in the stack.
2. singletop: the system wil
display the view you don't have to redraw it, but take it out of the cache. By default, drawing Cahce is disabled because it consumes too much memory, but it does have a smoother picture. In the ListView, Scrollingcache is turned on by default, and we can turn it off manually. Animatecache:listview default on Animatecache, which consumes a lot of memory, so the GC is called frequently, and we can turn it off manually, so our code can write:5. Reduce the depth of the layout of the item we should
/details/47017485Extended here: Brief introduction to Binder, http://blog.csdn.net/luoshengyang/article/details/6618363/ 6. What is the difference between HTTP communication and HTTPS communication, and the specific process of HTTPS communication?http://blog.csdn.net/whatday/article/details/38147103 7. How to implement the source code for such a collection of list,arraylist. 55259978Android Related: 1. About Android memory optimization, layout o
top is R. The R-rendered interface will cover Q, and Q goes into the background to run. (4) Pressing the back key is called the finish function to end R (activity) life. At this point R is out of the stack, and the life cycle of R ends. (5) Continue back key, End Q's life, at this time Q out of the stack. (6) Continue the back key, end the life of P, when p out of the stack. (7) When all the activity in the stack has been stacked, the home screen interface will be di
button with StartActivity () with data jump back b,b using startactivity () jump back to A;This answer, needless to say, the drawback is a just when the app was initialized to request a network, in the final jump was initialized once, and, B also in C jump is more initialized once, this is the blind use of statryactivity, the author development experience is less. Although I am also a novice, this still knows.2,a jump to B,b using startactivity () jump to C,c after selecting the data, click the
Android interview and development experts code specifications and details
Note
Rule 1: You must use javadoc to generate documents for classes. Not only is it a standard, but it is also recognized by various java compilers.[Rule 2] The description of the file should be available at the beginning of the file, which should contain the following information:(1) Copyright information;(2) file name;(3) function d
browser from the World Wide Web (www:world Wide Web) server. All WWW files must adhere to this standard, which was originally designed to provide a way to publish and receive HTML pages.Advantages: Disadvantage:HTTPS: A security-targeted HTTP channel, in short, an HTTP security version. It solves the HTTP eavesdropping, easy to disguise, easy to tamper with the determination. Formula expression: HTTPS = HTTP + encryption + authentication + integrity protection.WebSocket protocol: Is a proto
. But these methods are all: the Onmeasure () method, the OnLayout () method, the OnDraw () method.Onmeasure () Method: Single view, generally override this method, for the Wrap_content case, specify the view default size value, to avoid the match_parent situation consistent. ViewGroup, if not rewritten, executes the same logic as the list view and does not measure sub-view. The Onmeasure () method is generally overridden to iterate through the sub-view.**onlayout () Method: * * Single view, do
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.