Embedded HTML tags (when Android is connected to the Internet)

Source: Internet
Author: User

 

Google started out as a Web search engine and has become a giant in the online world through hard work and continuous R & D. The Android platform developed by the network engine is compatible with Internet applications.

WebView widgets using the WebKit engine are the best choice for self-developed programs to have browser functions. Here, I am a bit confused. Maybe some readers may not be very clear about the concept of WebKit.

WebKit is a software framework included in Mac OS X v10.3 and later versions (for v10.2.7 and later versions, you can also obtain it through software updates ). WebKit is also the foundation of Mac OS X's Safari web browser. WebKit is an open-source project. It is mainly modified by KDE's KHTML and contains some components from Apple. Traditionally, WebKit contains a web engine WebCore and a script engine JavaScriptCore, which correspond to KDE's KHTML and KJS respectively. However, as JavaScript Engines become more and more independent, WebKit and WebCore are now basically mixed (for example, Google Chrome and Maxthon 3 adopt V8 engines, but they still claim to be WebKit kernels ).

Back to the question, in fact, WebView is a complete embedded browser. You can directly use the loadData method provided by WbeView to pass the html tag to the WebView object and turn your android mobile phone program into a Web browser. Now that you can add HTML tags, you can write HTML Webpage Programs directly in WebView.

Set the content of the Web page to be displayed in the WebView */
MWebView1.
LoadData (
"<Html> <body>" + strIFrame + "</body>

The following is the program code for your reference.

 

Main. xml content

Shows the effect after running.

Click Link Blog.

 

 

This article is from the "HDDevTeam" blog

Related Article

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.