I am implementing array list adopter uisng "simple_list_item_2" that is inbuilt but I get error. it says " getview from fragment cannot be applied" and it also cannot resolve "get" symbol from get.(position)
public class AboutFragment extends Fragment {
ListView listView2;
String[] items = {"Friendly Map", "Inc"};
public AboutFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_about, container, false);
listView2 = (ListView)v.findViewById(R.id.listView2);
ArrayAdapter arrayAdapter = new ArrayAdapter(getContext(), android.R.layout.simple_list_item_2, items);
listView2.setAdapter(arrayAdapter);
return v;
}
@Override
public View getView(int position, View convertView, ViewGroup parent){
View view = super.getView(position, convertView, parent);
String[] entry = listView2.get(position);
return view;
}
}