the new facebook app has an image slider inside posts which have multiple images. It looks something like this:
One thing to notice is the adjacent images are slightly displayed with the current image in focus.
I know I can implement a slider using viewpager. But, in a viewpager, the current fragment occupies the entire view. Only the titles of the adjacent views are visible, not the content itself.
Can anybody give me a direction to look at for implementing this. Or is there anu opensource library for this?
Thanks
Related
I need to make a layout similar to that Image.
I wish it were shown all the registered images and their attributes and a button to add the user would select an image and define the attributes of it. I do not want a complete example that ordered but at least one direction than I use to do the layout. By my research I should perhaps use a swipe view. Has anyone seen something similar?
Thank you
You can use ViewPager to display cards like in top part.
ViewPager with previous and next page boundaries
And use a ListView or RecyclerView to show the bottom part. https://code.tutsplus.com/tutorials/getting-started-with-recyclerview-and-cardview-on-android--cms-23465
I want to built a landing page like grofers. I started with slider but I got different one using viewpager.
Like i want
but I end with this using viewpager
and below slider of grofers there is a menu. I tried to make same view using gridview and put condition on button to show other components on click.
Correct me if I am wrong and also suggest me for slider.
for the grid, I tried like this..
What are you asking exactly? There is no question.
Using a ViewPager for the slide's in the top is a good approach. If you need to have it wrap-around take a look at the infinite ViewPager: https://github.com/antonyt/InfiniteViewPager
For the bottom part, the grid, you can use a GridView. However I recommend taking a look at the RecyclerView with a GridLayoutManager: https://developer.android.com/reference/android/support/v7/widget/GridLayoutManager.html
You can implement this by using TwowayGridView
I saw beatport's app intro with viewpager, and what I want is to create that effect on scroll, for example, when changing to the next fragment, the background image of the fragment before adjust itself in the center of the remaining space.
Maybe I wasn't very specific, I'll be glad if you could take a look at beatport's app Intro for more understanding. The effect is called Parallax and I found this pieces of code, but I canĀ“t implement my fragments, only the images.
Here is the code:
https://github.com/je4a/ParallaxViewPager/tree/master/sample/src/main/java/com/parallaxviewpager/sample
I have an application with a top and bottom menu bar in the view. In between these two bars I have an image with text. When a new image comes in I want to push the current image to the left ("off screen") and display the new image with text.
However, how do I allow sliding back to the previous images with figure gesture effects? Is this something similar to sliding the whole view using ViewPager and Fragments, but only doing part of the view?
I think what you are loaking for is Gallery which will allow you to add the images in it programatically and will scroll horizontally.
try using horizontal scroll gallery.
there's lots of examples in the web.
similar question asked here
two examples in git for that. first , second
hope that's what you're looking for.
As gallery is deprecated, I did some research and found ViewPager. Using the example on the developer site, I was able to create exactly what I wanted.
Link: Using ViewPager for Screen Slides
I want to create an image slider using the HorizontalScrollView. Indeed, the slider will display one image at the time and I want to be able to use the fling gesture to navigate left and right in the slider.
Any Idea to which methods to override in the HorizontalScrollView to achieve this.
Thanks a lot.
Best
You could use Gallery with Image Switcher view to achieve this
This Link is usefull to you for better way to implement Android HorizontalScrollView to move image one by one.
Link :http://saigeethamn.blogspot.in/2010/05/image-switcher-view-android-developer.html
video: http://www.youtube.com/watch?v=c6a6wTfSPJA
EDIT :
If you want to implement Complex way refer this Links
Link1
Link2
You'd be better served implementing this with a Gallery widget or a ViewPager. These elements handle the display and interaction portion for you; you just have to provide the data behind that. If these don't quite work for you, better to customize one of them then start all the way from scratch.
Gallery Docs
ViewPager Docs
You can use any of below things for your need
Gallery - A view that shows items in a center-locked, horizontally scrolling list.
ViewPager -Layout manager that allows the user to flip left and right through pages of data. You supply an implementation of a PagerAdapter to generate the pages that the view
shows.
HorizontalScrollView -Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display
for reference see these links - Gallery , ViewPager and HorizontalScrollView