Reputation: 143
I want to choose an item out of the spinner. And then it should open an URL in the Webview which only changes one number in the base URL. How does this work?
Upvotes: 1
Views: 148
Reputation: 39605
Here is the basic idea.
You implement an OnItemSelectedListener
by extending it. Inside of this listeners onItemSelected()
method you just manipulate your string appropriately and start your other activity.
Here is an example on how to work with a Spinner
.
Upvotes: 1
Reputation: 36836
Get the value from the Spinner with
getSelectedItem.toString()
Build your url with
String.format()
And update your webview with
WebView.loadUrl()
Upvotes: 0