hellowebview n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
HelloWebView PowerPoint Presentation
Download Presentation
HelloWebView

Loading in 2 Seconds...

play fullscreen
1 / 7

HelloWebView - PowerPoint PPT Presentation


  • 92 Views
  • Uploaded on

HelloWebView. Step 1:. Create a new project named  HelloWebView . Step 2: Open the res/layout/main.xml. Step 3:. give some more space for web pages by removing the title bar, with the " NoTitleBar " theme. add the appropriate permissions.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

HelloWebView


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
step 1
Step 1:
  • Create a new project named HelloWebView.
step 3
Step 3:

give some more space for web pages by removing the title bar, with the "NoTitleBar" theme

add the appropriate permissions

step 4

This creates a WebViewClient that will load any URL selected from this WebView into the same WebView. The shouldOverrideUrlLoading(WebView, String)method is passed the current WebView and the URL requested, so all it needs to do is load the URL in the given view. Returning true says that the method has handled the URL and the event should not propagate (in which case, an Intent would be created that's handled by the Browser application).

Step 4:

If you run the application again, new pages will now load in this Activity. However, you can't navigate back to previous pages. To do this, you need to handle the BACK button on the device, so that it will return to the previous page, rather than exit the application.

Instead of adding an intent filter to view web pages, you can override the WebViewClient class and enable thisActivity to handle its own URL requests.