private EditText input;
private Button click;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
input = (EditText) findViewById(R.id.editText1);
click = (Button) findViewById(R.id.button1);
click.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
Toast.makeText(getApplicationContext(), input.getText().toString,
Toast.LENGTH_SHORT).show();
}
});
}
solved Android toast text when I click button on type in edit text