我有一个文本视图,它应该在意图(目录选择器)完成后更改文本。这不起作用。继承人的代码:
text = (TextView) findViewById(R.id.choose3);
text.setText(globalconstant.path);
当意图返回路径时应该更改文本:
private void addListenerOnButton() {
choose_button = (Button) findViewById(R.id.button1);
choose_button.setEnabled(true);
choose_button.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
// DirectoryPicker.START_DIR = "/mnt/";
Intent intent = new Intent(settings.this, DirectoryPicker.class);
startActivityForResult(intent, DirectoryPicker.PICK_DIRECTORY);
// text.setText(globalconstant.path);
text = (TextView) findViewById(R.id.choose3);
text.setText(globalconstant.path);
;
}
});
}
它出什么问题了?请帮我!非常感谢你