My task involves a ListView inside a Fragment.
I'm having trouble populating that ListView.
Here's what I'm trying.
public class UrlListFragment extends Fragment {
public View onCreateView(LayoutInflater inflator, ViewGroup container, Bundle state)
{
View returnView = inflator.inflate(R.layout.url_fragment, container, false);
ListView mylist = (ListView) returnView.findViewById(R.id.mylist);
String[] urlArray = new String[] { "http://mobile.cs.fsu.edu/android", "http://www.google.com", "http://my-favoriate-website.com" };
ArrayAdapter<string> arrayAdapter = new ArrayAdapter<string>(getActivity(), android.R.layout.simple_list_item_1, urlArray);
mylist.setAdapter(arrayAdapter);
return returnView;
}}
I get the error
The constructor ArrayAdapter<R.string>(Activity, int, String[]) is undefined
How can i solve this?