不建议使用setDrawerListener方法 [英] Method setDrawerListener is deprecated

查看:157
本文介绍了不建议使用setDrawerListener方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序上做某事时,我发现应用程序上的导航抽屉减小了尺寸.但是我对此没有做任何事情.

While I'm doing something on my app, I see that the navigation drawer on my app reduced its size. But I'm not doing anything on that.

然后,在检查了代码之后,我发现setDrawerListener被弃用了.有人对此有解决方案吗?

Then, after checking the code, I saw that setDrawerListener is deprecated. Does anyone has a solution to this?

drawerLayout.setDrawerListener(actionBarDrawerToggle);

推荐答案

请改用addDrawerListener().

这篇关于不建议使用setDrawerListener方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆