开发者

How To Set Text In An EditText with Sting object

开发者 https://www.devze.com 2023-02-08 19:11 出处:网络
I have a String object and I would l开发者_Go百科ike to set the text in a EditText object.Can this be doneYes, this can be done.

I have a String object and I would l开发者_Go百科ike to set the text in a EditText object. Can this be done


Yes, this can be done.

editText.setText(string);


myEditText.setText("some text")

That method is inherited from TextView

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.

0

精彩评论

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