私は EditText を持っており、ユーザーがこの editText に入力する文字ごとに、EditText のテキスト全体に関数を適用したいと考えていますFarsi class
。ユーザーが 21 を入力したい場合の簡単な例を示します。関数を適用したいoutput=3*editText.getText();
ので、1 を入力すると関数が適用され、editText に表示される結果は次のようになります。
output = 3*1 = 3
そして彼が2を入力したとき、私は表示したい12*3 = 36
編集
06-30 12:30:38.547: E/AndroidRuntime(276): FATAL EXCEPTION: main
06-30 12:30:38.547: E/AndroidRuntime(276): java.lang.StackOverflowError
06-30 12:30:38.547: E/AndroidRuntime(276): at android.text.DynamicLayout.reflow(DynamicLayout.java:261)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.text.DynamicLayout.<init>(DynamicLayout.java:150)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.makeNewLayout(TextView.java:4851)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.checkForRelayout(TextView.java:5348)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2688)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChanged(TextView.java:6131)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2691)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2556)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.EditText.setText(EditText.java:75)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.setText(TextView.java:2531)
06-30 12:30:38.547: E/AndroidRuntime(276): at com.localizedbasedcompetition.AnswerQuestion$3.onTextChanged(AnswerQuestion.java:149)
06-30 12:30:38.547: E/AndroidRuntime(276): at android.widget.TextView.sendOnTextChang