Facebook timeline like listview - android

The Facebook timeline seems to display all the feeds in the listview vertically. When the user shares his/her multiple photos, then those photos are displayed in horizontal list view. Has anybody any idea, how this actually works. Because I don't think nesting a horizontal listview within vertical listview works. Nor does the horizontal listview functions smoothly within the vertical scrollbar. So, if anybody has any idea about how Facebook implements its views in timeline, do share it here.

To use a gallery for the photos check out that example:
https://stackoverflow.com/a/11544447/944070
You may also need an implementation of different list items per case, so this answer would also be helpful https://stackoverflow.com/a/3515221/944070

That can be done using custom list view. Below tutorial covers facebook like feed view using volley networking library
Android Facebook like Custom ListView Feed using Volley

Related

Displaying One or Multiple Photos in post like Instagram

I am creating a photo blog app using firebase. I am able to allow user to post one or multiple photos on the firebase database and I am also able to retrieve them successfully.
Above image is the bottom view of an instagram post.
Just like that I want some type of View or Layout. I already have a working layout which can show only one image with like, comment and share options.
If the user wants post one photo, the layout should show just one slide and if user wants to post multiple photos, it should create a so called Sliding View to display all images side by side.
How do I do this ?
If you want me to clarify anything in more detail, please let me know.
If you need to build something similar that you mentioned then take example from the following library.
View Pager Indicator
You need to use ViewPager along with CirclePageIndicator mentioned in the library.
ViewPager - images container
CirclePageIndicator - circle indicator
You will need to add another overlapping view, which will contain like, comments and other buttons.

How to share adapter items with two recycler views?

I am trying to implement Instagram like Search fragment where they have explore posts(contains only the image) in a grid layout and when we click on them, it changes to another feed like view showing more details.
The way I am thinking to implement is to have two fragments with recycler views: 1 for grid layout and 1 for feed like. Share the currently, loaded feed items between these two recycler view adapters.
Question: Is it the correct approach to share adapter items between two views? If not, what would the design be? I suspect I will run into issues if we share the items.
Kindly let me know if any more details is needed. I can share pictures as well in case someone needs for android device.
I went ahead and implemented my design. Till now, I haven't seen any issues.

how to implement Facebook like layout to show photos in android

I want to show photos in my application like Faceook shows. Currently I have a recyclerview and the list of this recyclerview contains some images, textviews etc. In this list I want to add a GridView also to show images as the no of images may be more than 1, so I want to show them in Grid.
My whole layout is like how facebook shows news feeds, but I want to implement the same layout of photos as well.
Can anybody help me here, so that I can implement the same layout of photos also.
Thank you so much in advanced.

How to get a click event on Horizontalscrollview in android?

I have a requirement to design a Horizontalscroll list to show the list of dynamically obtained images in the list.Upon clicking on any item on the list it has to be shown on the Image view above the list.I tried many examples provided in the blogs. But they dont extend thier explanations towards obtaining the index of the Horizontalscrollview or getting resourceid of the image on which user has tapped. Knowledged please guide me on this.
Ps. I tried with galleryview as well But, I am not supposed to work using this as it is deprecated.
Regards,
Gururaj
Elsalam Alykom
you can use ViewPager
try this link
http://android-er.blogspot.com.eg/2014/04/example-of-viewpager-with-custom.html

Custom Adapter for Gallery View in Android

hi i want to split my gallery with 5 images in 2 rows.
Please let me know how to do this in android using Gallery View & custom adapter for Gallery view.
Is there any sample code available please share it, i have already checked the previous posts in this site.
Thanks
If you still need this and Pagination instead of scroll will work for you, you might look at: https://github.com/sfarooq/PaginatedGallery
I designed it using ViewPager so you can manipulate the adapter to send any kind of views you want including two row views.
If you must use scrolling galleries you could implement two separate gallery in a vertical orientation and send touch events from each to the other.

Categories

Resources