I'm trying to create an accordion in Android that has the following features:

  • Slide animation when opening a tab
  • Alignment to the top when opening a tab
  • The ability to be used inside a fragment and not inside an activity

Any idea to how to accomplish all these points? I've seen a lot of libraries that however luck of one or more of this points (and I cannot fix the remaining myself :( ).

Any idea? Also pointers to how-to-guides to how to fix the missing points would be really useful! Thanks

有帮助吗?

解决方案

If you are interested on how I solved the problem, you can find the code here: https://github.com/filnik/AndroidSmoothAccordion

It is "quick-and-dirty" but it does the job.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top