Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.dns.translateapp;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.text.Editable;
- import android.text.TextWatcher;
- import android.view.View;
- import android.widget.EditText;
- import android.widget.TextView;
- import org.w3c.dom.Text;
- public class TestActivity extends AppCompatActivity {
- EditText et;
- TextView tv;
- TextView txt;
- GoGoGo gg;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_test);
- et = (EditText)findViewById(R.id.textEditor);
- tv = (TextView)findViewById(R.id.getWordPlease);
- txt = (TextView)findViewById(R.id.checkThread);
- et.addTextChangedListener(new TextWatcher() {
- @Override
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
- }
- @Override
- public void onTextChanged(CharSequence s, int start, int before, int count) {
- tv.setText(s);
- }
- @Override
- public void afterTextChanged(Editable s) {
- }
- });
- }
- public void pushButt(View view) {
- gg = new GoGoGo();
- txt.setText(Integer.toString(gg.a));//уже лучше
- gg.start();
- }
- }
Add Comment
Please, Sign In to add comment