Android ListView with Images inside of ListFragment
I have been trying to get a listview inside of SherlockListFragment for
about a week (total of like 12 hours) and I can't figure it out. I'm out
of options here. So, I have three tabs, which all need to have listviews,
with images. I managed to get the listviews working, but I just cannot
seem to find a way to add images. I am a HUGE beginner at this as well.
Here is one of the three tab classes that extend SherlockListFragment:
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
String[] commands =
this.getResources().getStringArray(R.array.currentmobs_selections);
ArrayAdapter<String> adapter = new
ArrayAdapter<String>(getActivity(),
R.layout.main_list_item, commands);
setListAdapter(adapter);
}
Now I did make a custom array for the listview in attempt to get it
working, but I didn't even know how to implement the custom array adapter
into the code. If anyone knows any way to get a image/text listview inside
of a ListFragment I'd be soooo happy. Thanks!!
No comments:
Post a Comment