Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
John jones
65 PointsHow do you add comments using piccasso?
How do you add comments using piccasso? Is there a way to do it so when you tap on it the picture will show a title and the user can add a description and other users can comment like on Instagram?
4 Answers
Danial Goodwin
13,247 PointsThe Picasso library is only used for downloading and caching images. Any other features would have to use a different library or have your own custom code.
John jones
65 PointsSo I can request the photo that has been uploaded to the parse backend and display it on the app like Instagram has it on its single column phitostream? I thought in the tutorials stated you were unable to do that.
Danial Goodwin
13,247 PointsI don't recall any tutorial that says you can't load the photos in a column or list. Parse API even offers some tools to make that easier, like ParseQueryAdapter.
I just finished Treehouse's "Build a Self-Destructing Message Android App" and it describes loading images in a list and grid.
John jones
65 PointsOh oops I mist of miss heard. Thanks for your help so far Daniel. So I would create an array adapter and then in an XML create one where it displays an image in the middle of the screen and a texview below it to display the comments?
Danial Goodwin
13,247 PointsYep, that sounds good!
John jones
65 PointsIn the XML if you drag and drop the list view in there wouldn't it display the image as a small icon? Will the custom adapter grab the image and make it so it covers 3/4 of the page while The other 1/4 is where the comment goes?
John jones
65 PointsAh OK. I am on the ribbit app but I am only at the fragment section so still I'm the beganing of it. I will probably understand it more once I get further into the lesson
John jones
65 PointsJohn jones
65 PointsThanks Danial,
Do you know how I would add a comment feature in an app or create a photo stream like instagram?
Danial Goodwin
13,247 PointsDanial Goodwin
13,247 PointsI can quickly describe it at a high level for you that will hopefully point you in the right direction, but you are going to need to read a lot of references to fully understand how to create those features.
To get the interaction you described in the original post, if you are using
ListViewandListActivity, then you can overrideonListItemClick(), then show anAlertDialogwith a custom view byAlertDialog.Builder.setView().To make a simple one-column photo stream like Instagram, then the easiest way is to create a custom ArrayAdapter for the ListView, and you'll have to create a custom XML layout. There are tutorials online for "How to create a custom ListView".
The above is probably what you would want to use for a quick implementation that you can see results from. But, Google also recently released something like a
ListViewcalled aRecyclerView, which makes some things easier and some things harder. So, eventually you might want to learn about that also: https://developer.android.com/training/material/lists-cards.htmlDanial Goodwin
13,247 PointsDanial Goodwin
13,247 PointsFor more details than what I provided, I just found this Treehouse forum thread that talks about it: https://teamtreehouse.com/forum/custom-listview-course