[英]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.