使用Preference EditText文本作为文件名

时间:2012-11-05 15:25:11

标签: android

所以我在我的应用程序中有编辑文本首选项。我想在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);

它不起作用..

0 个答案:

没有答案
相关问题