如何在Sim Text上动态添加simbol成为句子

问题描述

如问题所述……“如何在编辑文本中添加元素符号?”

我正在制作食品食谱应用程序,并且试图在每个句子中动态添加这个“·”符号……我将展示我想做的事情。

example of what i need

正在尝试使用此代码。

ingredientesEdit.addTextChangedListener(new TextWatcher() {
         @Override
           public void onTextChanged(CharSequence s,int start,int before,int count) {
               //durante

               // TODO Auto-generated method stub
           }

           @Override
           public void beforeTextChanged(CharSequence s,int count,int after) {
               //antes
               // TODO Auto-generated method stub
           }

           @SuppressLint("SetTextI18n")
           @Override
           public void afterTextChanged(Editable s) {

               ingredientesEdit.setSelection(1);
               ingredientesEdit.removeTextChangedListener(this);
               ingredientesEdit.setText("· " + ingredientesEdit.getText().toString());
               ingredientesEdit.addTextChangedListener(this);
           }
       });

但这就是它的作用 Example of what the code does

如果您能帮助我解决这个问题,我将非常感谢...谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)