Basic design question

  • Replies:1
  • OpenNot stickiedUnanswered
  • Forum posts: 1

Nov 23, 2014 5:50:28 PM via Website

Hey guys,

Total beginner here and I honestly just need help in direction on what to look up to accomplish what I'm looking to accomplish.


I'm a programmer at heart so I can do the back end stuff, I just don't know how to do the front end. What I'm going to get is a list of users from a MySQL database. In that I'll have a BIO, ratings, a url for a picture, a name, etc. I want to take this list and dynamically generate a scrollable list of these little content viewers. I want these to be clickable, as well.

So basically if I get 10 names, I want to dynamically populate 10 of these things with the details I need. I just don't know what to look up or where to get started. I've looked through list views, and a table layout seemed smart, but I really just am looking for the generally accepted method of doing something like this so that I can start on the right path. A good example of something akin to this is simply the gmail app, which is reading a database of your e-mails, populating it with details, pictures, etc. I want the scrolling and clicking to be pretty much the same as that!

  • Forum posts: 118

Nov 24, 2014 1:22:37 PM via Website

Hey man :)

You're already on the good path to accomplice this. First of all, ListViews are automatically scrollable and don't require a Scrollable View or similar because that'd simple bug it out.

You need to work with a custom Adapter. An adapter deals with each item of the ListView separately and you could give each item a different onClick event if you wish. I've got somewhat a similar adapter with a custom object for you ready to make this all easy BUT you won't become any wiser by copying and pasting my entire code.

Here's a tutorial that would lead you through the process of making your own ListView with custom onClickListeners. Even though this tutorial will make you copy paste most of the code as well but this dude who made this tutorial explains everything to the fullest and I'm not due lack of time (nothing personal :)) Search for this part mainly in the tutorial: 3. Custom adapter implementations

If you still can't figure it out, I will post my code, step by step where to add which snippet etc etc.