在我的应用程序中,我有一个滚动视图与n个数据列出。有两个按钮被命名为UP,位于滚动视图上方,另一个按钮位于滚动视图下方。 使用UP and DOWN buttons the list of views can be scrolled.
安卓支票要么滚动视图滚动或不滚动
当scroll bar is in top the Up button will be invisible
并且当scroll bar reaches the bottom the DOWN button will become invisible
,我已经写逻辑此使用getScrollX()
方法。
现在我的问题是,当例如3的数据非常少,the scroll bar will not be visible and the layout cannot be scrolled, in such a case both the UP and DOWN buttons need to be in invisible
。如何做到这一点,请给我一个方法?