Discussions and ListView

Put your problem here if it does not fit any of the other categories.

Discussions and ListView

Postby Nanodeath » Sun Jan 20, 2008 1:04 am

Hi all. This question is part technical and part opinion.

Technical part: I want the ListView to display the entire contents of the strings I put into the list adapter, not just the first two lines (that is, I have a set of Long Strings that I was the listview to display, but it only shows the first two lines show). I tried putting android:maxLines="5" in the xml file for the row, but it's no good.

Opinion part: So what I'm trying to do is this: for whatever reason, I want to have a pseudo discussion board. The screen I'm trying to create is the view where you're viewing a particular thread, with a bunch of people's posts (from one thread) and whatnot. At first I only want the first X characters of each post to appear until you click the post, and then the rest of the post appears on the same page. Does the ListView seem the way to go for this? Or do you think I should be going for a different approach?

Thanks!
Nanodeath
Junior Developer
Junior Developer
 
Posts: 15
Joined: Tue Jan 15, 2008 6:56 am

Top

Postby wizlon » Sun Jan 20, 2008 11:37 am

maybe it would be worth checking out one of the api demo's. especially com.google.android.samples.view.list6 (ListAdapter Collapsed) this shows a single line, a title if you will, and on click expands the item to display the rest of the text.

Hope that helps.
wizlon
Junior Developer
Junior Developer
 
Posts: 23
Joined: Mon Jan 07, 2008 2:17 pm

Postby Nanodeath » Sun Jan 20, 2008 7:05 pm

That's perfect man, thanks. Just what I was looking for. Sort of unfortunate that it's not shorter, but that can't be helped I suppose.
Nanodeath
Junior Developer
Junior Developer
 
Posts: 15
Joined: Tue Jan 15, 2008 6:56 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 14 guests