When developing the Android app, especially the strong content display function, will want to choose in the native native implementation and the Web implementation, when making this choice, inevitably want to look at the competitor or other app similar function is implemented in which way. But how can you tell if other apps are implemented using native controls or WebView loading Web pages? In fact, to do this is not difficult, there are at least two ways:
First, grab the bag
This is relatively primitive, it is relatively easy to think of, open the corresponding interface, crawl the packet to see if there is a URL is to return the more complete HTML code, it is basically webview to achieve.
Second, the use of system developer tools
The method of grasping the package is still too troublesome, many systems have more advanced developer tool function, usually can be found in the setup, some phones may need special operation to open the Developer tool function. Take Meizu MX2 As an example, enter *#* #6961 #*#* on the dial-up interface to open the Developer Tools feature (Input *#* #6960 #*#* off), click "Settings", "Accessibility" and "Developer Tools" , find "Show layout boundaries" in the drawing bar and open. So the control layout of all the apps is at a glance, WebView as a control, there is only one bounding box, so through this, it is easier to distinguish whether an interface is implemented WebView or native layout control, Of course, do not rule out the use of a bunch of webview to spell an interface implementation method.
As a native and WebView interface, the blue wireframe is the drawing boundaries of each control, the middle of the large layout of the rich interface does not show a lot of the border Blue Line, is the implementation of the Web page.
In addition to the above two methods, in general, by disconnecting the network, refresh the interface, observe the content cache can also have a general pre-judgment on the implementation of the way, generally, the cache is done well, are native control implementation, there is the interface of the local cache is more likely to be native.
Are there any other options for the pros? Welcome to the comments below!
How Android differentiates app native and WebView implementations