I found this question while working with autoCompleteTextView in android.
It seems like it does not allow the autoCompleteTextView to fetch data through getEditableText method as the data is selected by autoCompleteList .
What i understand is that when user edit the data by using inputType (using android keyboard) than that changes are saved somewhere through editable interface but when we select the data through autocomplete list it does not consider it as editable data.
How to find that which method to use with which component.Or i can use any of these two method with any of editable and nonEditable component.Do these methods work same for all of the components or have any differences.
I am asking for conceptual clarification.It will be best if you provide some example.
thank you for your time in advance.
getEditableText()
Return the text that TextView is displaying as an Editable object. If the text is not editable, null is returned.
getText()
Return the text that TextView is displaying.
Edit Text:- EditText is a thin veneer over TextView that configures itself to be editable. For more info:- http://developer.android.com/reference/android/widget/EditText.html
Editable Text:- This is the interface for text whose content and markup can be changed (as opposed to immutable text like Strings). If you make a DynamicLayout of an Editable, the layout will be reflowed as the text is changed. for more info:- http://developer.android.com/reference/android/text/Editable.html
It will Solve your confusion .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With