开发者

How to scroll views whithn view in android?

开发者 https://www.devze.com 2022-12-13 03:44 出处:网络
What I want to do is to scroll view after listening a button. Simply use开发者_开发问答r taps button and view is scrolled to specific id below.

What I want to do is to scroll view after listening a button. Simply use开发者_开发问答r taps button and view is scrolled to specific id below.

I tried to use scrollto and scrollby passing as an argument reference to object to which I want to scroll with no effect.

Anyone solved this problem yet?


I have spent many hours on this.

Try something like this. It makes sure that the item selected it the one in view:

ListView listView;
int positionSelected = listView.getSelectedItemPosition(); listView.setSelection(positionSelected);

0

精彩评论

暂无评论...
验证码 换一张
取 消