KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: Horizontal ListView in Android? Like many things in Android, you wouldn't think this would be such a hard problem but ohhh, by golly, would you be wrong. And, like many things in Android, the API doesn't even provide a reasonably extensible starting point. I'll be damned if I'm going to roll my own ListView, when all I want is to take the thing and turn it on its side. \rant Okay, now that I'm done fuming, let's talk about the problem itself. What I need is basically something exactly like the Gallery , but without the center-locking feature. I don't really need ListView 's listSelector but it's a nice-to-have. Mostly, I could do what I want with a LinearLayout inside a ScrollView , but I need the child views to come from a ListAdapter and I would really like to have a view recycler. And I really don't want to write any layout code. I peeked into the source code for some of these classes... Gallery: It looks like I could use the Gallery if I override most of the 'onXyz' methods, copy all their source code, but refrain from calling scrollIntoSlots() . But I'm sure that if I do that I'll run into some member field that's inaccessible or some other unforeseen consequence. AbsSpinner: Since the mRecycler field is package-private I doubt I'll be able to extend this class. AbsListView: It looks like this class is only meant for vertical scrolling, so no help there. AdapterView: I've never had to extend this class directly. If you tell me it's easy to do, and that it's easy to roll my own RecycleBin , I'll be very skeptical but I'll give it a shot. I suppose I could possibly copy both <
Tags (comma-separated)
Save Edits
Cancel