Android: Is it possible to make a list with drawables, 1 on top and others underneath?
I'd like to know, if it is possible to make a custom list in android, which will consist of items with text and images.
Main idea 开发者_C百科is that there will be 3 items vissible at a time, the first one on top, others beneath. When user swipes on touchscreen they should move and animate.
If it's not possible, maybe I can apply animation (transition) on drawables?
Tnx in advance.
Yes. It is possible. You will have to make following steps:
build custom ViewGroup which will display your 3 items ( other Views ) with nice transformation. Please read this tutorial: http://blogs-stage.extranet.sonyericsson.com/developerblog/2010/05/31/android-tutorial-making-your-own-3d-list-part-2/ which describes how to apply transformation to ViewGroup's children. The ViewGroup which you will build will be used as ListView's row.
detect horizontal touch events. You can use GestureDetector to detect swipes, than send commands to appropriate rows.
精彩评论