Horizo​​ntalScrollView 的滚动起点

发布于 2024-09-24 06:41:59 字数 236 浏览 3 评论 0原文

在onCreate方法中,我尝试将一系列TextView放入Horizo​​ntalScrollView中,然后尝试将滚动的值设置为TextView。不工作。当我找到我需要的 TextView 时,我把它放在一个类字段中,当 TextViex 膨胀的循环结束时,我向我的好 TextViev 询问它的 getLeft() ,它总是返回 0。如果我尝试滚动通过 onCreate 中的任意测量,即使这样也不起作用。 会发生什么?我怎样才能实现我正在寻找的东西?

In the method onCreate, I tried to put a series of TextView in HorizontalScrollView and then I tried to set the value of the scroll to a TextView. Not working. When I find the TextView I need, i put it in a class field and when the cycle that inflates the TextViex is over, i ask to my good one TextViev its getLeft(), and it return me always 0. If I try to scroll by arbitrary measure in onCreate, even that does not work.
What happens? How can i accomplish what i'm looking for?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文