Android developer options, it seems very simple things, in fact, a lot of students do not know enough about it, Google is well-intentioned for us to design so many small switches have its role, today also took a bit of time, over the all over 30 switches, There are 15 options that help you compare your daily Android development.
It should be noted that different ROM support for developer options is not the same, it is normal to streamline some, I mentioned below is the official support features, of course, different official version of the support level is not the same, you can not find on the phone and not strange.
Sorry, I don't know where the developer options are.
1. Stay Awake
When charging to keep the screen wake up, development, every now and then the lock screen is really enough, open it as long as the USB cable will not need to always go to unlock the screen.
2. Select runtime (Dalvik or ART)
Art runtime your app will be more slippery, the current high version of Android is already directly on the art runtime, but as Android development may need to ensure that your application can operate in both runtime, this may be a test need more consideration.
3. Process Stats
It has all the information about the current running process, which is a bunch of meaningless numbers for the average user, and for Android developers, this information may help you a lot.
4. USB Debugging
This does not need to introduce, do not open it how to debug it? (Although wireless debugging is now popular)
5. Allow Mock locations
When your app needs to use GPS to get location information (like weather apps), it can be used to simulate any location anywhere in the world with a few locations. (What else can I do?) Witty you must have thought of it)
6. Show Surface Updates
When the interface is drawn, a flashing reminder that you can simply blink your eyes when you turn it on, but there are times when we need to be aware of the exact details of the interface drawing, and we have to endure this torment.
7. Show layout Bounds
Show layout grid, when you see an app that has great interface effects, want to know how it's laid out? Turn on this feature. I am more commonly used in the use of the scene is: whenever there is a PM to ask me people this interface is Native implementation, or similar to the hybrid scenario of the Web implementation, I let him open this function, WebView is a whole lattice, Native view is a variety of small lattice combination. (Unless you redraw your own to implement a custom view, the general complex layout doesn't work that way)
8. Force RTL Layout Direction
Forced RTL layout, RTL is right to left, the Arab countries generally have this culture, similar to ancient China, the text from the right to the left, including the interface layout is also from the right, and feel that the operating habits are mirrored with us, if you are as unfortunate as I need to do this kind of pit dad fit, This is also a skill that must be mastered.
9. Animation Scale
Animation scale, speed adjustment is also very useful function, especially in the implementation of complex animation effects, slow down can be seen more clearly, of course, you can slow down in your own code, but every time you change the code to rebuild a lot of trouble right? And what if PM comes along and lets you look at the cool animations of an app?
Simulate secondary Displays
It allows you to simulate the performance of applications in different screen sizes, although there are similar features in the IDE, but it is only a static effect.
One. Debug GPU overdraw
This refers to an incorrect over-drawing:
Primary color: No over-drawing
Blue: Once over-drawn
Green: two times over-drawn
Pink: three times over-drawn
Red: Over four times and over drawing
It is worth reminding that over-rendering is sometimes unavoidable, and Android recommends not to over-draw more than once, which can be blue and not green.
Strict mode Enabled
In tough mode, when the app does something that affects performance, the screen will flash to remind you. You can also in the code for your application to open the strict mode, once you find some performance problems, there will be a detailed log output, in order to avoid affecting the online users, it is recommended to only open in debug mode.
Show CPU Usage
In the upper right corner of your screen displays a small window, prompting the current CPU of various information, in performance debugging will have some help to see whether the CPU load is too high caused performance problems.
. Profile GPU Rendering
Look at the following picture, understand its role, open, will be shown below a real-time drawing, remember that the Green Line is a smooth performance of the bottom line, more than the moment will appear out of frame, there will be a lag feeling, One of the most important indicators of interface performance tuning is to optimize all interface operations below the Green Line as much as possible. The specific principle can see Hu classmate's Android performance optimization model, my public number also included his this classic article.
Don ' t keep activities
When this option is turned on, activity A is immediately destroyed when you jump from activity A to activity B, which is typically used to simulate a scenario in which the background activity is destroyed when the device is out of memory, and if your app can open it, the functionality is still basically normal. The code design is more reasonable, the decoupling between different activities and very low, for the application of complex business, can do this really difficult.
15 must-know Android developer options