I am working on my app which has 3 spinners in one view. Some of my activities will need to use 3 spinners, some 2, some 1, so I would like to hide them depending on the activity, if that is even possible. I am trying to do it like this so I can be as efficient as possible, but I have no idea if it is even possible.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Call
setVisibility(View.INVISIBLE)
orsetVisibility(View.GONE)
on theSpinners
as needed to hide them.GONE
means totally gone;INVISIBLE
means they still take up space but no pixels are drawn.You can use a View's method setVisibility: You can hide or show views using setVisibility(int visibility).
Where the argument can be INVISIBLE or GONE, depending on whether you want it to take up any space when it's invisible.