D
D
Danil2014-06-27 18:20:35
Android
Danil, 2014-06-27 18:20:35

How to show a part of a web document in an application?

The task is to show the site in the android application. They advised WebView , but it just redirects to the site through the browser, and I just need to open the site in the window (or the entire page of the application). How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
one pavel, 2014-06-27
@onepavel

All were well advised. There are examples in the documentation at your link.
load content from the network
load locally

String summary = "<html><body>You scored <b>192</b> points.</body></html>";
 webview.loadData(summary, "text/html", null);

If the browser window opens, then it is incorrectly implemented.
Google found an example www.tutorialspoint.com/android/android_webview_lay...

A
Andrey M, 2014-06-27
@Collosteam

Try to add after initializing the class
and only then open the site

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question