【发布时间】:2016-11-27 12:48:25
【问题描述】:
这是我的 java 活动
public class word extends Activity implements View.OnClickListener{
EditText et;
Button btnz,btncopy;
TextView tv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.word);
et =(EditText)findViewById(R.id.et);
btnz =(Button)findViewById(R.id.btnz);
btncopy =(Button)findViewById(R.id.btnc);
tv =(TextView)findViewById(R.id.tv);
btnz.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String a ="a";
String b ="b";
String c ="c";
String d ="d";
String e ="e";
String f ="f";
String g ="g";
String h ="h";
String a1 ="\u24B6";
String b1 ="\u24B7";
String c1 ="\u24B7";
String d1 ="\u24B9";
String e1 ="\u24BB";
String f1 ="\u24BB";
String g1 ="\u24BD";
String h1 ="\u24BD";
String name =et.getText().toString();
name =name.replaceAll(a,a1);
name =name.replaceAll(b,b1);
name =name.replaceAll(c,c1);
name =name.replaceAll(d,d1);
name =name.replaceAll(e,e1);
name =name.replaceAll(f,f1);
name =name.replaceAll(g,g1);
name =name.replaceAll(h,h1);
tv.setText(name);
当在 avd 中运行并在 edittext 中写入时,它正在工作,但在我的智能手机中运行时,不显示所有内容 我非常努力并在互联网上搜索。 什么是解决方案? 对不起我的语法请不要解雇
【问题讨论】:
标签: java android xml unicode smartphone