• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing Strings into an Array Adapter.

 
david foley
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wondering if some one could help me out with this, my list view is populating from Text File, when i use...
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity, android.R.layout.simple_list_item1, ListItems);

but what i would like to do is get the ListView populating with the Model Class,
which would then all me to click on an element inside the list view to send the URL across to another Activity class. so i can use WebView

my Text file looks something like this
Song#Date#URL,

all in the one line


Menu_Fragment


Model

Controller
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What specific problem are you encountering implementing this? The code already seems to do somewhat similar to what you describe (except that it uses commas instead of hash marks as separators).

By the way, ignoring exceptions in code sections that do important work (like in lines 23/24 of the menuFragment class) is a bad idea.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic