a = (EditText) findViewById(R.id.ab);
a.getText().toString();
Button writeButton = (Button) findViewById(R.id.bb);
writeButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
File file = new File(getExternalFilesDir(null), a+".txt");
try {
OutputStream os = new FileOutputStream(file);
os.write(edit.getText().toString().getBytes());
Toast.makeText(BluetoothChat.this, "저장완료", Toast.LENGTH_SHORT).show();
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
});
요런식으로 쓰면 a값에 에디트텍스트에 받은 값을 제목으로 저장해야돼는거 아닌가요?ㅜㅜ
자꾸 android.widget어쩌구 파일로 저장돼요 ㅠㅠㅠ