0

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.

Example

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.

Rubick
  • 296
  • 3
  • 22
Detained Developer
  • 1,134
  • 2
  • 13
  • 33
  • You can use ViewPager with indicator, Please try to Search before asking question directly as View Pager is very well known widget in Android development, This tutorial will help you http://www.androhub.com/android-image-slider-using-viewpager/ also here is useful answer https://stackoverflow.com/questions/11486218/android-added-circle-indicator-to-viewpager – TapanHP Aug 29 '18 at 05:25
  • Possible duplicate of [Android ViewPager with bottom dots](https://stackoverflow.com/questions/20586619/android-viewpager-with-bottom-dots) – TapanHP Aug 29 '18 at 05:26
  • why don't you use ViewPager with Page Indicator hide it if your image array size = 1 – Rajesh Aug 29 '18 at 06:30

1 Answers1

4

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.

Varsha Dhadge
  • 1,711
  • 14
  • 23
Amolpskamble
  • 863
  • 7
  • 12