Browse Source

增加提交提示音

master
FoxV 2 years ago
parent
commit
92ef840830
  1. 27
      app/src/main/java/com/icssoft/icspda/util/SoundPoolUtil.java

27
app/src/main/java/com/icssoft/icspda/util/SoundPoolUtil.java

@ -0,0 +1,27 @@
package com.icssoft.icspda.util;
import android.content.Context;
import android.media.AudioManager;
import android.media.SoundPool;
import com.icssoft.icspda.R;
public class SoundPoolUtil {
private static SoundPoolUtil soundPoolUtil;
private SoundPool soundPool;
private SoundPoolUtil(Context context){
soundPool = new SoundPool(10, AudioManager.STREAM_SYSTEM,0);
//加载音频文件
// soundPool.load(context, R,1);
}
private static SoundPoolUtil getInstance(Context context){
if (soundPoolUtil == null){
soundPoolUtil = new SoundPoolUtil(context);
}
return soundPoolUtil;
}
}
Loading…
Cancel
Save