SlidingDrawer deprecated

26,698

Solution 1

does this mean I should import the code into my project to be sure that it will be supported in the future?

Personally, I would dump SlidingDrawer and do something else for all new app development.

That being said, SlidingDrawer should be in the Android SDK for the foreseeable future. As the docs note, Google is not supporting it any more, which means, potentially, sometime, it may no longer work at all and will have to be dropped. If you are still using it at that time, then you will have a decision to make. For example, AbsoluteLayout was deprecated in late 2008 IIRC, and it is still available for use.

There is nothing stopping you from trying to fork SlidingDrawer to make one in a library project, though you will need to copy some resources and make code changes to point to your resources rather than ones internal to the framework.

Solution 2

To reiterate @MarioLenci's comment, there is a library that implements it: https://github.com/umano/AndroidSlidingUpPanel

via https://stackoverflow.com/a/16866284/57490

Share:
26,698

Related videos on Youtube

Mario Lenci
Author by

Mario Lenci

Android developer

Updated on July 09, 2022

Comments

  • Mario Lenci
    Mario Lenci about 2 years

    I just noticed that since API 17 the SlidingDrawer it's been deprecated.

    the comment on it says:

    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.

    does this mean I should import the code into my project to be sure that it will be supported in the future?

    are there already some open-source project that extends the slidingDrawer out there?

    • jumper0k
      jumper0k over 11 years
      Yes, it is. Or write your own implementation.
    • Edward Falk
      Edward Falk almost 9 years
      Does anybody know why it was deprecated?
    • powder366
      powder366 over 8 years
      Could be due to copyright issues and the inflexible full screen solution. Looks like DrawerLayout is replacing it.
  • Mario Lenci
    Mario Lenci over 11 years
    I considered to dump the Drawer and follow the new APIs, but the fact is that the features that the drawer give are pretty usefull if extended properly and i would end up implementing the same thing by myself so i think that for the moment I'll keep it. Thx
  • karl
    karl over 11 years
    @CommonsWare, What do you recommend as an alternative? I just discovered SlidingDrawer, and it looks like exactly the UI interaction I want. What's wrong with it?
  • CommonsWare
    CommonsWare over 11 years
    @karl: What's wrong is that it is deprecated. :-) Various sliding menu implementations seem to be the current approach -- see implementations on AndroidViews.net.
  • karl
    karl over 11 years
    @CommonsWare, well yes, of course : ) What I meant was, what is wrong with it that caused them to deprecate it? Thanks for the suggestions - do any of them support vertical sliding?
  • CommonsWare
    CommonsWare over 11 years
    @karl: "what is wrong with it that caused them to deprecate it?" -- I am not certain. "do any of them support vertical sliding?" -- the ones I have seen are designed to slide in from the left.
  • yeahman
    yeahman about 11 years
    i also just discovered slidingdrawer and i find it neat and quite useful and intuitive.. i am using the vertical mode... i don't understand why google has deprecated it
  • Mario Lenci
    Mario Lenci almost 11 years
    In the last version of my app i finally dumped the SlidingDrawer. I insted used the custom implementation of the new DrawerLayout suggested here stackoverflow.com/questions/16790129/…
  • Happy Dev
    Happy Dev over 6 years
    @commonsWare What bug in Android 5.0 You mentioned: "Also note that SlidingDrawer is broken on Android 5.0, and so you definitely should be considering alternative widgets at this time." at commonsware.com/Android/previews/widget-catalog-slidingdrawe‌​r ?
  • CommonsWare
    CommonsWare over 6 years
    @HappyDev: To be honest, I do not remember.