开发者

android edittext and textview scroll together

开发者 https://www.devze.com 2023-03-29 02:29 出处:网络
I have a edittext and textview next to each other. I\'d like, when I scroll with the edittext(either 开发者_JS百科with finger or by adding new content to edittext) that the textview scroll the same di

I have a edittext and textview next to each other. I'd like, when I scroll with the edittext(either 开发者_JS百科with finger or by adding new content to edittext) that the textview scroll the same distance. I've tried querying the getScrollY


I am not sure if I understand your question perfectly, but if I do, then I would suggest putting these two elements side by side in a Horizontal linear layout within a Scroll View. This way if / when either of the elements are moved, they will stay with each other.

0

精彩评论

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