简体   繁体   中英

How to add a view into a EditText in android?

This is an mms app. i'm new here, so i can't upload a picture. i'm so sorry about that.

the question is : when user attach a picture to send an mms, i must create a view in the IputBox(EditText) to show the image's info like size, type and so on.

So, How can I create a view in EditText ?

I konw How to insert a image into a EditText by ImageSpan , but I don't know how to insert a view.

Thank u!!

您不能在EditText内创建视图,但是可以在布局XML中创建隐藏视图,并仅在相关时显示所需信息。

You can use this I think:

setText(CharSequence)

To set some text that appears within the EditText. Not used it myself however so can't say for certain it will work.

Got it from here: http://developer.android.com/reference/android/widget/EditText.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM