SlidingDrawer deprecated

坚强是说给别人听的谎言 提交于 2019-11-30 22:28:21

问题


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?


回答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.




回答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



来源:https://stackoverflow.com/questions/13478993/slidingdrawer-deprecated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!