3

I want to develop a panel with animation same as notification panel. I mean to say the notification panel is a cool control where you grab and slide down the notification bar and see all the notifications.

Actually, I am having 2 UI , 1st should be shown with Button at top, when user click on that button, the 2nd UI with listview items should be slide down same as notification panel and again when user click or drag the 2nd UI at the top side, then 2nd UI should be become invisible. I hope i made clear my question.

From Christian's answer, I am trying to use a sliding drawer that will display a list of options. I need this to expand over the current ListView on the page.

So if anybody know how to implement such layout or UI with sliding down animation then please share it.

Please suggest how to build with such control or layout? any ideas or suggestions

Thanx

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295

3 Answers3

10

Have you tried the SlidingDrawer widget?

Cristian
  • 198,401
  • 62
  • 356
  • 264
  • Thanx for the support, Can SlidingDrawer slides from top to down? i have seen example where slidingdrawer slides from botton to top-half of the screen. – Paresh Mayani Jan 27 '11 at 05:40
  • Android docs say "SlidingDrawer can be used vertically or horizontally." – Heiko Rupp Jan 27 '11 at 06:31
  • 2
    For those looking at this answer after the release of API 17: "This class was deprecated in API level 17. This class is not supported anymore. It is recommended you base your own implementation on the source code for the Android Open Source Project if you must use it in your application." – mawcsco May 14 '13 at 19:48
2

Paresh I found a solution in this post about sliding drawers.

android misc widgets has it implemented , though it still has some flaws but it will definitely prove helpful.

Though in the same SO post CommonsWare has quoted :

... You similarly cannot make a SlidingDrawer that descends from the top.

Good Luck.

Community
  • 1
  • 1
100rabh
  • 6,156
  • 5
  • 27
  • 41
  • thanx for the support, but i am not finding anything at http://code.google.com/p/android-misc-widgets/ as you suggested this link – Paresh Mayani Jan 27 '11 at 06:34
  • @Paresh just do a svn checkout of the project & you are done! I am currently playing with the awesome stuff I found there. Here is the checkout link 'http://android-misc-widgets.googlecode.com/svn/trunk/' – 100rabh Jan 27 '11 at 06:48
0

You can use SlidingTray from: http://aniqroid.sileria.com to make this happen

http://aniqroid.sileria.com/doc/api/com/sileria/android/view/SlidingTray.html

Alternatively you can also use a custom PopupWindow class which is part of Android API.

Sileria
  • 15,223
  • 4
  • 49
  • 28