How to implement ScrollTricks with a gridView - android

I need to make something like the google+ profile header (a background image that hides when scroll up and a fixed header on top), but i don't have idea how to do it with a gridview.
I looked into the scrolltricks example from Roman Nurik and he did it on StickyFragment, my problem is that I need to use a gridview to recycle the views.
Attached some images to be more clear.

you can find this solution:
http://antoine-merle.com/blog/2013/10/04/making-that-google-plus-profile-screen/
maybe it can help you.

Related

Runtime manipulation of ListView

developers.
I would like to ask for help for a task. Unfortunately, I can not upload any code because I do not know how to get started.
I would need to create a listview where I can check the views of all its appearing elements while scrolling and ask to change the view while scrolling.
Specifically: The list item displayed in the center of the screen should be larger than the others, and as I scroll the list up or down, the letters become smaller.
It would look like a scroll on a cylinder.
I would like to ask for help on this problem.
Thank you very much!
Please check out this Github Page : CarouselLayoutManager
Its got instructions and examples..

How to implement a horizontal image effects/filters view in android?

I am trying to implement an image effects/filters preview in an android app.
Example [From CamScannner App]:
How do I implement the stack of horizontal image filter previews in android as shown in the example [Auto/Original/Lighten/Magic/Gray]? Note: I am not asking about the implementation of the filters. I would like to know how to render.
I tried:
https://github.com/moondroid/CoverFlow
But I am looking for a simple horizontal stacking.
I don't think so it would be much of work. You just have to use RecyclerView with horizontal LinearLayout I can just guide you here.
Once user take the image or select the image. You need to find a way to give that image to RecyclerView's adapter Inside then adapter. You just apply the respected filter to the image and return the image to ViewHolder. Simple it is. If you need more descriptive answer just let me know.

How can i achieve something like a vertical ViewPager in Android?

It may not be a great question but i am asking for some help.
I am not a pro so please if anything is unclear post a comment and i will try to explain.
I have an activity where i have a full screen ImageView where over it i have a couple of texts and an other overlayed imageview, i want when i swipe up to send the whole view upwards and to show from below a simillar view but with different image,
i don't need to detect swipe gesture, i need the view to track my finger's Y (vertical value) , and as i have my images into an array , how can i create the same view for each image ? I am not using adapter and as i know adapters works only with gridview and listviews, please if someone knows help me !
Try to use RecyclerView I think it can do what you want

Which View/Widget can be used to display images on the screen one at a time by swiping horizontally?

I have a list view in which I want each list item will contain images. But the images will be displayed one at a time. SO, at a time for every list item only one image will be displayed. To view other images in the list item,one has to swipe horizontally. Is there any inbuilt widget that handles this in android?
EDIT1
My List item not only has Image but it also contains other views like textview, seekbar etc. So each list item will contain Image, textview, seekbar etc but the majority of the space will be occupied by the Image. Now, for each list item, when the image is swiped horizontally, another image has to be downloaded from a ulr and displayed.
EDIT2
I did a bit of research on ViewPager but many references like the answers here and this blog seem to suggest that using ViewPager inside a listview is not a good idea. Why is that? If it is not a good idea, what is a good alternative?
This problem can be solved by using ViewPager.
Link: http://developer.android.com/training/animation/screen-slide.html
ViewPager(for swiping between views) + UniversalImageLoader(for loading images from URLs, with caching etc)
If it is not, what is a good alternative?
I think you should use RecyclerView with LinearLayoutManager.HORIZONTAL. All things like recycling the views, view holder design pattern can be done easily with it and it is a new widget that google introduced and you can use it instead of ListView + ViewPager. because as you suggested it is not recommended to use viewpager inside listview. Although you can use horizontalScrollView but it dose not recycle the view. Other third party library like this exist but I recommend you use RecyclerView with LinearLayoutManager.HORIZONTAL because it is from google and it is normally tested more than people library. And another thing is you can use other layout manager like GridLayoutManager or having for example 3 rows that swiping horizontally or other good effects like adding animation and .... that google provided with RecyclerView.
For downloading the images you can use Picasso,Volley, Universal Image Loader or a lot of other libraries that exist.
Happy Coding :-)
Not sure I'm following you, but rather than a ListView wouldn't it be simpler to use ViewPager with simple Fragment that wraps a single image at a time. That way you get horizontal swiping "for free".
Do you just want swipe to change images? Or do you want the images to scroll as you swipe? For the former, you can just use a GestureDetector. For the latter you would probably use a ViewPager. See http://developer.android.com/training/animation/screen-slide.html
I have achieved the same functionality by using ViewPager, you can either put the SeekBar and TextView in the Fragment class off which you are gonna make multiple instances for each item and add to the pageradapter,
You can also add the TextView and SeekBar above the ViewPager Layout in your main fragment layout file and change the text and data on seekbar on viewpager's on item change listener, this looks more neat and this is the approach i've used

Slide in a Layout and replace with another layout in android

I want to create slide in effect like below.
http://demosthenes.info/blog/838/CSSslidy-An-Auto-Generated-Responsive-CSS3-Image-Slider
The differences are
1) I have layout with two images, and when the new image is downloaded in background, one of the existing image has to slide out and this new image has to slide in.
2) User dont need to scroll and see previous images, I want to show only two images at any given time.
3) Its better if the diapered images get disposed.
What i tried so for with no luck
1) Horizontal scroll view- issues is hard to add items dynamically scroll to it while existing images been deletes.
2) ViewPager - http://developer.android.com/training/animation/screen-slide.html, couldnt get it to work.
what other ways is there, or how to improve what I tried.
Thanks
Simple and effective tutorial here.
1.http://android-er.blogspot.in/2011/09/implement-slide-in-and-slide-out.html
2.http://wptrafficanalyzer.in/blog/image-slideshow-from-right-to-left-using-viewflipper-in-android/
Basics about animation tutorial here,
https://github.com/codepath/android_guides/wiki/Animations
I think your looking for this.
ViewPager is what you want, hope it'll help.

Categories

Resources