Tag Archives: web page

Displaying web pages in your Android apps

Last year, I presented a short tutorial on displaying web pages from inside your App Inventor apps. Now, here is a some what improved version that prompts for a web address URL, checks to see if http:// has been entered, and if not, prepends http:// to the front of the address. Then the web page is displayed.

The Designer View

There is not much to the user interface – a text box to enter the web URL and a button to display the web page. The page then appears below the button, and the content may be scrolled on the screen.

To create this user interface, drag a horizontal layout onto the screen and then add a label for the “Web page URL” prompt, followed by a text box for the data entry. Then add the Display web page button.

From the User Interface section of the Palette, at the left of the Designer screen, drag and drop a WebViewer component on to the design area.

Screenshot_2015-02-10-15-15-17

 

The WebViewer is not a full Internet browser – it is a component that displays the specified web page only. The WebViewer does not support standard browser features, such as saving web page content nor does it provide a history of the web pages visited.

The Blocks Code

Continue reading Displaying web pages in your Android apps