我有一个班子:
public class MainActivity2 extends AppCompatActivity {
Button button5;
TextInputEditText textoinput;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addpriority);
textoinput = findViewById(R.id.texto);
String dados = textoinput.getText().toString();
button5 = findViewById(R.id.button5);
button5.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(), MainActivityMenu.class);
intent.putExtra("chave", dados);
startActivity(intent);
}
});
}
}
缩略语改为案文。 如果我从德劳改成“测试”,它就会发挥作用。
请告诉我什么是错的?
祝福