所以我在我的应用程序中有编辑文本首选项。我想在String path = getFullFilePath(getApplicationContext(), filename);
中使用EditText中的文本作为文件名我试过这个:
SharedPreferences getPrefs = PreferenceManager
.getDefaultSharedPreferences(getBaseContext());
SharedPreferences settings = getSharedPreferences("EditText",0);
String zipStr = settings.getString("ime", "");
sp = new SoundPool(5, AudioManager.STREAM_MUSIC, 0);
String path = getFullFilePath(getApplicationContext(), zipStr);
mSoundId = sp.load(path, 1);
它不起作用..