- Feb 10, 2017
- 1
- 0
- 0
i have to tokenize the sentences in token. By giving the input from edittext field ,clicking on radiobutton of tokenization and clicking on submit button,after that the output will be generate in other edittext field. how this can be perform?
here is the code :-
String s2 = String.valueOf((EditText) findViewById(R.id.editText));
editText2 = ((TextView) findViewById(R.id.editText2));
button1 = (Button) findViewById(R.id.button1);
rg1= (RadioGroup) findViewById(R.id.radioGroup2);
button1.setOnClickListener(this);
public void onClick(View v) {
int selectedId=rg1.getCheckedRadioButtonId();
rb1=(RadioButton)findViewById(selectedId);
void OnClick(View v){
StringTokenizer s1 = new StringTokenizer(s2,"");
while (s1.hasMoreTokens()) {
}
editText2.setText((CharSequence) s2);
}
here is the code :-
String s2 = String.valueOf((EditText) findViewById(R.id.editText));
editText2 = ((TextView) findViewById(R.id.editText2));
button1 = (Button) findViewById(R.id.button1);
rg1= (RadioGroup) findViewById(R.id.radioGroup2);
button1.setOnClickListener(this);
public void onClick(View v) {
int selectedId=rg1.getCheckedRadioButtonId();
rb1=(RadioButton)findViewById(selectedId);
void OnClick(View v){
StringTokenizer s1 = new StringTokenizer(s2,"");
while (s1.hasMoreTokens()) {
}
editText2.setText((CharSequence) s2);
}