How can I escape any Unicode in android OnTextChanged event?? Like "price" to "\u0070\u0072\u0069\u0063\u0065
". I tried it but I cant find any solution. This is my textwatcher
price.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {
}
public void beforeTextChanged(CharSequence s, int start,
int count, int after) {
}
@SuppressLint("NewApi")
public void onTextChanged(CharSequence s, int start,
int before, int count) {
MainActivity.this.priceshow(s);
}
});
and this is my CharSequence
private String priceshow (CharSequence s) {
String priceshowstring= "";
priceshowstring = s.toString().replace("","");
System.out.println(priceshowstring);
return priceshowstring;
}