In my app I have a ListView which is populated with URLs from a string-array. When the user selects some item in this ListView, the app should open a WebView and load the selected URL.
The string-array is like this:
<string-array name="app_urls">
<item>http://www.google.com</item>
<item>http://www.android.com/</item>
<item>http://www.youtube.com</item>
</string-array>
I am trying to get the string value of the url this way:
Resources res = getResources();
String[] url = res.getStringArray(R.array.app_urls);
webView = new WebView(view.getContext());
webView.loadUrl("http://" + url);
How can I correctly get the url value?