longClickAlert.setNegativeButton("Rename", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
renameAlert.setMessage("New name:");
renameAlert.setView(input);
renameAlert.setPositiveButton("Enter", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
renameLine(externalStoragePath + "/Android/data/com.whizzappseasyvoicenotepad/recorded files.txt", recordedFilesArray.get(toDelete), input.getText().toString());
currentFilePath = externalStoragePath + File.separator + "/Android/data/com.whizzappseasyvoicenotepad/" + recordedFilesArray.get(toDelete) + ".mp3";
renameFile(input.getText().toString());
recordedFilesArray.set(toDelete, input.getText().toString());
listAdapter.notifyDataSetChanged();
dialog.dismiss();
}
});
renameAlert.show();
dialog.dismiss();
}
});