[英]Android Studio doesn't see the FloatingActionButton hide()/show() methods
我正在尝试创建然后隐藏FloatingActionButton
:
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.hide(); //This method should hide it, right?
我可以看到,有一个hide()
方法在这里 ,但是当我尝试调用Android Studio中的方法,它似乎并没有看到hide
和show
在所有的方法!
该方法实际上不存在吗? 是否存在并且Android Studio无法正常工作? 这是怎么回事?
因此,事实证明我只需要更新支持设计库即可。 我使用的是旧版本。 (感谢@Daniel Nugent!)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.