[英]How can i change the position of a TextView through Java code?
在为该视图设置动画之后,我想更改A textView的位置(在Java代码中,归因于X和Y)。
软体:Android Studio。
布局:约束布局。
我怎样才能做到这一点?
假设“ mytext”是您的textView,然后:
TextView thetext = findViewById(R.id.mytext);
thetext.setX(115 or whatever your X position is);
thetext.setY(325 or whatever your Y position is);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.