Android Instance-implement browser with WebBrowser (xe8+ Xiaomi 2)

Source: Internet
Author: User

Results:

1. The network good situation, open quickly, very smooth.

2. The address bar is really not good, if you really want to do the application, this piece must be optimized for itself.

Instance code:

1 UnitUnit1;2 3 Interface4 5 uses6 system.sysutils, System.types, System.uitypes, system.classes, System.variants,7 FMX. Types, FMX. Controls, FMX. Forms, FMX. Graphics, FMX. Dialogs, Fmx.stdctrls,8 FMX. Edit, FMX. Controls.presentation, FMX. WebBrowser;9 Ten type OneTForm1 =class(Tform) A Webbrowser1:twebbrowser; - Toolbar1:ttoolbar; - Edit1:tedit; the Button1:tbutton; - Button2:tbutton; - Button3:tbutton; - Statusbar1:tstatusbar; +     procedureButton1Click (sender:tobject); -     procedureEdit1keydown (Sender:tobject;varKey:word;varKeychar:char; + shift:tshiftstate); A     procedureButton2click (sender:tobject); at     procedureButton3click (sender:tobject); -   Private -     {Private Declarations} -    Public -     {Public Declarations} -   End; in  - var to Form1:tform1; +  - Implementation the  * {$R *.FMX} $ {$R *. NMXHDPIPH.FMX ANDROID}Panax Notoginseng  - //Open Web page the procedureTform1.button1click (sender:tobject); + begin AWebbrowser1.url: =Edit1.text; the End; +  - //return $ procedureTform1.button2click (sender:tobject); $ begin - Webbrowser1.goback; - End; the  - //forwardWuyi procedureTform1.button3click (sender:tobject); the begin - Webbrowser1.goforward; Wu End; -  About procedureTform1.edit1keydown (Sender:tobject;varKey:word;varKeychar:char; $ shift:tshiftstate); - begin -   ifKey = Vkreturn Then -   begin A     //when the button is pressed, hide the input keyboard and move the focus to the Btngo.  +Webbrowser1.url: =Edit1. Text; the Button1.setfocus; -   End; $ End; the  the End.

Android Instance-implement browser with WebBrowser (xe8+ Xiaomi 2)

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.