Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
APIによると、returnのgetText()メソッド。その目的は何ですか?それは単に戻り値の型だったのでしょうか?EditTextEditableString
getText()
EditText
Editable
String
そしてEditable APIに従って:
これは、コンテンツとマークアップを変更できるテキストのインターフェイスです (文字列のような不変テキストとは対照的です)。
不変の機能を実現するために、代わりにStringBuilderorを使用してみませんか?StringBuffer
StringBuilder
StringBuffer
public interface Editable implements GetChars, Spannable, Appendable, CharSequence
他の機能の中でも、Editable は Strings と StringBuilders ができない Spannable データを保持します。