1. Activity can inherit from Baseactivity, easy to unify style and handle public event, build dialog Unified Builder, in case the overall change is needed, a modification is available everywhere. 2. database table Segment field constants and SQL logic are separated to be clearer. 3. Global variables put in the global class, the module is privately placed in its own management class, do not believe that the huge management of things will bring any benefits, may be a disaster. 4. If the data is not necessary to load, the private module data must be delayed initialization, remember to save memory for the user, there is no harm. 5. Exceptions are thrown, concentrated in the appropriate position to handle, do not throw to catch the exception immediately, engage everywhere is catch. 6. When the address reference chain is long (more than 3 points) Beware of memory leaks, and beware of stack addresses pointing. 7. Information synchronization: Newly inserted data note the return ID. 8. When a multi-threaded db is off, an error occurs. 9. Before doing, consider those that can be public, resource, layout, class, and do an architectural analysis.  10 Orderly queue Operations when AD operations pay attention to sorting. 11. Remove the cascading action to be aware. 12 is sufficient fault tolerance for the returned null object. 13. Formal parameter arguments: Basic type pass-through value, object is passed reference. The parameter can change the state and content of the object, but it cannot change the contents of the argument. 14. ListView The SetSelection function does not work when the data is not full. 15 batch operation strictly and the view correspondence, cannot be hidden.  16 controls the amount of activity code, keeping the main logic clear. Other classes comply with the SRP,ISP principle. 17. ArrayList removes the difference between int and integer when you execute remove. 18. Debug printing must be marked to be able to locate the print position, or more late classes are not sure where to print. 19. Code blocks/Constants/resources can be centralized for common use, even if the common logic is a bit more complex, it is easy to modify, modify one, and be effective everywhere. 20. SetSelection does not work, try to smoothscrolltoposition. The Lastvisibleposition of the ListView (the last visible subkey) changes as the GetView method executes at a different position.  21 and activity communication use handler more convenient; If your frame callback chain gets longer, consider listener mode to simplify callbacks. 22. Handler using Looper on other threads. Prepare, the main thread is not. 23. Timepicker Click OK and need Clearfocus to get the time to enter manually. 24. Do not start the asynchronous thread easily inside the constructor. It would be tragic to assume that an asynchronous thread invokes an example of this example. 25. Do not take for granted that an object will not be empty, sufficient to do fault-tolerant processing. 26. Expandablelistview's sub-list cannot be clicked to return the adapter Ischildselectable method to True. 27. UI display Notice the situation is too long, note that the sensor range of the button is not less than 9mm, note the position of the cursor. 28. The server and client are as uniform and unique as possible, otherwise there will be ambiguity and problems. 29. Note, to write enough comments to see the effect of a piece of code can be understood. 30. Use log to hit the logs and tag. 31. Complete data must use SQLite transaction, big Data must be used. Inserting 100 data is 20 times times faster, and inserting 1000 data will speed up the pace of 100 more than one. 32. Avoid string= "null" in cases where string = null,= "" is possible. Avoid the title= of "no themes" such as data submission to the database wasted space. 33. There are a number of different dbhelper instances, sqlitedatabase objects inevitably exist different instances, multi-threaded simultaneous writing data, the data will be written in turn to the DB is locked, causing the crash, whether it is the operation of the same table or a different table. Read and write can be co-workers, alternating irregular execution. When writing data at the same time, the solution is to use a transaction for each thread that is concurrent, and the DB does not lock and write as a whole. 34. It is recommended that the entire application maintain a dbhelper instance, as long as the DB is not closed, there is only one DB instance globally, multithreading concurrent write DB will not lock, strictly alternating write: 123123123 ... (123 on behalf of different threads, in turn insert a record), read and write will not lock the DB, read and write alternating with no regularity, the number of executions and the degree of the CPU allocated to which thread of the time slice length. 35. A task uses a transaction to nest N transactions, there is a failure in n transactions, the overall failure of this task, all successful, the data is written, with security, integrity. And the efficiency of a transaction to write large quantities of data is actually tested hundreds of times higher than the average single write. 36. It is often necessary to use a ListView or other displayItems ' controls track or view information in real time, and you want the latest entries to automatically scroll to the viewable range. You can set the control Transcriptmode property by setting theAndroidThe platform controls (support ScrollBar) automatically slide to the bottom. PNs. Long A; Determine if a has an assignment, if (a = = 0) An error will be given in the case of a without assigning a value. The IF (a = = null) should be the same as the integer. 38. The code encountered reading and writing, access and other logic to two-way consideration, file import and export, character byte conversion between each side to transcode. 39. The ratio of an int value to the size of an Integer object (the smallest object that can contain an int value) is 1:4, which may surprise you. The additional overhead is derived from the JVM used to describeJavaThe metadata for an object is also an Integer. 40. The object consists of metadata and data. Metadata includes classes (pointers to classes that describe the type of Class), tags (which describe the state of an object, such as hash codes, shapes, and so on), and locks (object synchronization information). The array object also includes the size of the metadata. 41. One in 32-bitJavaUsing 1GB in the runtimeJava Heap Java applications typically require a Java heap of 1.7GB after migrating to the 64-bit Java runtime. 42. The performance of a Hash collection is higher than any List performance, but the cost per purpose is higher. For access performance reasons, if you are creating a large collection (for example, to implement caching), it is best to use a Hash-based collection, regardless of the additional overhead. 43. List is a reasonable choice for smaller collections that do not pay much attention to access performance. The performance of the ArrayList and LinkedList collections is roughly the same, but their memory footprint is completely different: ArrayList has a much smaller size per entry than LinkedList, but it is not exactly set to size. The correct implementation of the list to be used is ArrayList or linkedlist depending on the predictability of the list length. If the length is unknown, then the correct choice may be linkedlist, because the collection contains less white space. If the size is known, then the memory overhead of the ArrayList is lower. 43. Choosing the Right collection type allows you to strike a reasonable balance between collection performance and memory consumption. In addition, you can minimize the memory footprint by properly resizing the collection to maximize the fill rate and minimize unused space. 44. Take advantage of encapsulation (which provides interface classes to control access to data) and delegates (helper objects to implement tasks). 45. Deferred allocation Hashtable: If Hashtable is a common phenomenon that occurs frequently, it should be reasonable to allocate Hashtable only if there is data that needs to be stored. Assign Hashtable to an exact size: Because the default size is used, it is possible to use a more accurate initial size entirely. EditText in SetText don't forget whether you need setselection. In most cases it is necessary to set the. 47. Two things to note in XML: 1 attribute names are duplicated; 2 Note whether the text contains illegal characters, note the use of CDATA parcels. 48. When the logic has no obvious problem, consider the object properties, function parameters, network transport parameters are all understood, whether set correctly. 49. When a compile or run-time error occurs, consider your compilation environment and the environment version if there is no problem for others. 50. Because of the immutable nature of the string class, you should consider using STRINGBUF when a string variable needs to change its value frequently.Fer class to improve program efficiency. 51. The advantage of Java stack is faster than the heap, shareable, mainly for temporary variables, parameters, etc., the advantage of heap is to dynamically allocate memory size. 52. As long as new () is used to create the object, it is created in the heap, and its string is stored separately, even if it is the same as the data in the stack, it is not shared with the data in the stack. 53. The basic data type defines the variable called the automatic variable, which is the ' literal value ', which exists in the stack and can be shared (existing is not new). 54. Multiple Randomaccessfile objects point to the same file, which can be written with multiple threads without locking the object, the experiment concludes that three threads write 1 million data, use the lock for about 12 seconds, and do not use about 8.5 seconds. 100 threads write 10,000 data using a lock takes about 4.2 seconds, and it takes about 3 seconds to not use a lock. 55. Xmlpullparser parsing with Nexttext () method, XML is more complex, with empty tags, duplicate name tags prone to abnormal problems; text uses the GetText () method instead of the Nexttext () method in Start_tag; START _tag,text,end_tag three events in conjunction with each other. Note The text event occurs between each XML node, either the start node or the end node. 56. Change the logic of the time to consider all the use of this function, scattered places more, easy to careless. 57. When there is a problem with the system components, look at the error stack information, make a copy of the error method where appropriate, plus the try catch guarantee does not crash. Remember not to disturb the normal logic of the system control. 58. The input controls are aware of the control of symbols such as spaces, line breaks, and so on. Note the contents of the input box and control the left and right controls to prevent accidental hits. 59. Note the + + or – operation in the function parameter. is ++c or C + +, the difference is very big. Note Null can also be inserted in ArrayList. 60. Never underestimate the problem of NULL pointers, rather than the wrong to kill, do not let go. http://www.vmatianyu.cn/summarization-of-technical-experience.html