Animar ListView de Android para deslizarse hacia arriba y hacia abajo como la lista de notificaciones

I want to include a ListView in my Android (2.2) application similar to the notification list that is coming from the top. Here I want it from bottom. The list should show always the top part and when slided up enlarge to 80% of the screen. When slided down, it should go back in its original size.

I tried several alternatives which did not work:

  • Tweed animations always enlarge the part that is visible, not the real content
  • Manual slide up in steps with an animation loop with onAnimationRepeat as it each time has to calculate the full layout after resizing, each step is slow and so the moving is quite bad
  • Layout animations seem not to be a solution as the view is always visible and so it can not be animated during showing up.

Gracias por tu ayuda.

preguntado el 26 de agosto de 12 a las 12:08

1 Respuestas

Mira el Cajón deslizante de Android:

It will slide from the bottom, and you can place a ListView inside it.

Debería verse algo como esto:

enter image description here

Aquí is a tutorial:

respondido 26 nov., 13:15

thanks a lot. I was working for days on that. As I wanted to have a part of the list view visible, I changed the handle to a RelativeLayout containing the first list entry and my real handle image as background. I guess this is the best way as I did not find anything for that in the docu for SlidingDrawer - cristiano

actually I found that my above to put the first list entry in the idea was not the best. So I took the solution aquí actually struggling a bit with all the modifications - but it worked and is great... - cristiano

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.