[英]How To Set Text In An EditText with Sting object
I have a String object and I would like to set the text in a EditText object. 我有一个String对象,我想在EditText对象中设置文本。 Can this be done 能做到吗
是的,可以这样做。
editText.setText(string);
myEditText.setText("some text")
That method is inherited from TextView 该方法是从TextView继承的
http://developer.android.com/reference/android/widget/TextView.html http://developer.android.com/reference/android/widget/TextView.html
I don't really know how you mean. 我真的不知道你的意思。 It looks a bit trivial.. 看起来有点琐碎。
Is this what you're looking for? 这是您要找的东西吗?
editTextObject.setText(stringObject.text);
If not please be more precise. 如果没有,请更精确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.