I want to make awesome scroll effect. I've found a couple of examples:
http://lab.hakim.se/scroll-effects/
but I have no idea how to such behaviour. I consider to make it on my own, but it will be good to have a library which I can use. Just need some starting point. Any ideas?
I've used this library a few times and seemed good but seems to be in need of an update since some of the delete animations have problems. But the scrolling animations should still be good:
https://github.com/wasabeef/recyclerview-animators
Related
I searching for a way to animate views via xml, I am really lost in this part of UI programming.
Can anybody explain to me step by step how to do this?
You can animate android views by using Animation resources.
With xml animations you can set different properties e.g duration, rate of change (interpolator).
AndroidHive has a very good tutorial with a nice set of animations
http://www.androidhive.info/2013/06/android-working-with-xml-animations/
From my experience with xml animations, you won't know what you want until you've played around with different properties.
http://developer.android.com/guide/topics/resources/animation-resource.html
Update:
Interpolators as well are also important,they allow you to achieve a lot more smoothness. But misusing them can also be expensive so be make sure its necessary.
http://developer.android.com/reference/android/view/animation/Interpolator.html
This blog also gives a quick peek into the actual effects of interpolators:
http://android-er.blogspot.co.uk/2012/02/various-effect-of-interpolator-in.html
I've noticed that the new RecyclerView class, even though it makes things a bit cleaner, is lacking a lot of functionality that I'm familiar with:
dividers, but this can be solved by looking at this post or this one
"footerDividersEnabled"
"headerDividersEnabled"
"listSelector" , but maybe I should simply set it per view ?
"fastScrollEnabled"
"smoothScrollbar"
"textFilterEnabled"
I've also tried to find out if there is a new way to use the new class with filtering (as done with ListView by implementing Filterable). I couldn't find out if there is such a thing
"tools:listitem" , to show the items on the UI designer.
Those are what I use, but maybe there are others that I missed.
Is there any tutorial or some guidelines of how to replace each of those things?
ok, I think I've found some solutions to what I wrote about:
dividers - the links I've given can probably help (here, here and here).
"footerDividersEnabled" - probably like #1, but even if you don't have it, you could always add a divider to the layout of the footer.
"headerDividersEnabled" - same as #2.
"listSelector" - should be done to the item views .
"fastScrollEnabled" - no solution is available for this, except for this library I've found, which was an answer for my post here.
"smoothScrollbar" - should be a feature request for #5. I think it's already smooth, but I'm not sure.
"textFilterEnabled" - sadly, you need to handle it yourself. create a thread pool of size 1, or manage your own thread (or use AsyncTask, in case the work is relatively short), and let it do the filtering for you.
Filterable - same as #7
"tools:listitem" - not available, but I think you could extend from RecyclerView and add it. You will however have to put some work, as RecyclerView doesn't know how to layout the views.
No tutorials that I know of, but the sources for ListView are public! There's no better way to learn than this... For example: I recently implemented filtering just like ListView does and it work like a charm. Plus, if you do it well, you only need to do it once and can re-apply it everywhere!
I would recommend you go look at some of the library's for the RecyclerView. You can find a lot of library's at https://android-arsenal.com/.
Also you can implement your own functionality in the RecyclerView and the Adapter for the RecyclerView. Just extend the RecyclerView and build on that.
I recommend that you read the source code for the RecyclerView at https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java.
I've searched for libraries, but i have found that existing libraries only support vertical slider. Anyone know any library capable of handle things such as “automatic collapse item when another is clicked”, and so on.
I'm not asking for a piece of code that ilustrate how to do it. Instead, i'm looking for something more robust and tested, like this library https://github.com/tjerkw/Android-SlideExpandableListView, but it must support horizontal slider.
Thanks.
This library is just what I needed it
I'm using this library that allows flipping between views like the "FlipBoard" app.
It works quite well.
The problem is that I need to put a few views on top of it, so I've put it inside a FrameLayout, and the rest of the views after it.
It looks ok, but it has a problem:
When flipping, the views that are on top of it change their transparency (and even become hidden) till the flip is over.
How can I handle this problem?
EDIT: I've found this library which doesn't have this problem, but it has a weird color transition while flipping that I wish to avoid.
EDIT: I've found out that this is a known issue (#49) . Would love to know if anyone else has an idea of how to overcome this.
I don't know how to fix this library, but it seems this library works fine :
https://github.com/emilsjolander/android-FlipView
Not sure though how customizable it is compared to the one i've tested.
I have a GridLayout with some items in it. Nothing special on it.
I just would like to know if I can drag items around and make the other items automatically arrange themselves.
It's like Android does in Jellybean if you move an icon near another icon.
Is that possible in GridLayout?
Thank you!
I don't know if that is possible with a GridLayout, doubt it, but here is a example that looks like a GridLayout and implements Drag and Drop. This should solve your issue.
I feel like there are many projects which could solve this slightly better than the other answer:
See the following question
Within this, the following projects are mentioned:
PagedDragDropGrid
Alternative View Drag and Drop
Google Project and some other 3rd party stuff
This may help you find some stuff other than GridViews as well.