A
A
Anton @ Lyalin2017-09-15 12:07:15
Android
Anton @ Lyalin, 2017-09-15 12:07:15

How to use one WebView and Activity to display different information?

There is a MainActivity, where by clicking on the ListView elements, another activity opens with a WebView and with different content. How can I use one Activity and WebView to display different information. That is, I click on one listView element to open an activity with a webview with one information, then I click on another listview element and the same activity opens with a webview with different information. Information is a local html file in assets.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
one pavel, 2017-09-15
@toxa_1995

sent to the
activity startActivity(new Intent().putExtra("key", "value"));
received in another
activity savedInstanceState.getString("key");
https://www.survivingwithandroid.com/2012/09/passi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question