Android examples for java.lang:String XML
encode space to
import android.text.TextUtils; public class Main{ public static String encode(String string) { string = TextUtils.htmlEncode(string); return string.replace(" ", " "); }/*from ww w . ja v a 2 s. c o m*/ }