I am working on implementing a view to show this specific layout.
So a user may post something (with their profile picture to the left) then people comment/like the post and after a variable length list of comments, there is an edit text box to add one's own comment.
My question here is what is the best way to achieve such a view? Should I use a sectioned adapter with the "5 likes" and "2 comments" pieces as headers? Or are they just all their own views in a list? I'm still fairly new to creating my own variable length views...
Any direction would be greatly appreciated.
-
How do you want this implemented. If you only want to display 3 likes and a +N that part is easy. If you want to display as many likes as fit with a +N button that's a bit harder. You have to measure your views and add until only one more can fit and then add the +N button.The Dude– The Dude2014年07月22日 02:42:11 +00:00Commented Jul 22, 2014 at 2:42
-
Also, if you only want to display a fixed number of comments and add a "View More Comments" link/button this becomes much easier as well. Also, do you want this whole thing to scroll if necessary, or just the comments sectionThe Dude– The Dude2014年07月22日 02:45:21 +00:00Commented Jul 22, 2014 at 2:45
1 Answer 1
Make a LinearLayout(Vertical) as the root, and try follow theese guidelines. If any questions comment :)
uhh
5 Comments
LinearLayout (vertical for A comment to a networking site, it's better to go with a ListView. Don't you think so? It will be easy to manage.