Android的 - 对点击滚动按钮的观点顶部 [英] Android - button on click scroll to top of view

查看:114
本文介绍了Android的 - 对点击滚动按钮的观点顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望把我的观点的底面(ExpandableListView下)一个按钮,点击该按钮时,它应该滚动到视图的顶部。这可能吗?

I want to place a button at the bottom of my view (under the ExpandableListView) and the when the button is clicked, it should scroll to the top of the view. Is this possible?

推荐答案

尝试把下面一行在onclick为底部按钮

Try putting the following line in the onClick for that bottom button

yourScrollView.fullScroll(ScrollView.FOCUS_UP);

这篇关于Android的 - 对点击滚动按钮的观点顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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