0

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.

asked Jul 22, 2014 at 0:54
2
  • 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. Commented 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 section Commented Jul 22, 2014 at 2:45

1 Answer 1

1

Make a LinearLayout(Vertical) as the root, and try follow theese guidelines. If any questions comment :)

uhh

answered Jul 22, 2014 at 2:55
Sign up to request clarification or add additional context in comments.

5 Comments

+1 for the time and answer. Instead of going with 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.
Yes a ListView would do it too (Just remember to set the height as wrap_content) If you are not that confident in making layout in code then go with list view (easier to make the list items).. Just remember to put whole layout in a scrollview.
I didn't ask this question. Anyway whole layout in ScrollView? Why??Then it's not good to use ListView in it.
yes but if you make the height wrap_content it will just stretch the list so you won't have a "scroll inside a scroll".. The reason to put the layout in a scrollview is because the comment section can be very big, and in that case it needs to scroll.
That's why I told to put the comment section in ListView instead of Vertical LinearLayout. You will get scrolling with ListView, even though you set the height to wrap_content.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.