SlidingDrawer deprecated
Asked Answered
O

2

22

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?

Onstage answered 20/11, 2012 at 17:45 Comment(3)
Yes, it is. Or write your own implementation.Waylan
Does anybody know why it was deprecated?Demonetize
Could be due to copyright issues and the inflexible full screen solution. Looks like DrawerLayout is replacing it.Dobbs
B
18

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.

Brickle answered 20/11, 2012 at 17:53 Comment(9)
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. ThxOnstage
@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?Cartesian
@karl: What's wrong is that it is deprecated. :-) Various sliding menu implementations seem to be the current approach -- see implementations on AndroidViews.net.Brickle
@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?Cartesian
@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.Brickle
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 itKnox
In the last version of my app i finally dumped the SlidingDrawer. I insted used the custom implementation of the new DrawerLayout suggested here #16790629Onstage
@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-slidingdrawer ?Fortress
@HappyDev: To be honest, I do not remember.Brickle
R
1

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

via https://mcmap.net/q/388388/-vertical-drawerlayout-or-slidingpanelayout

Reversible answered 21/7, 2014 at 23:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.