[英]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.