调用系统的媒体音量控制显示

调大声:

  
    
1 AudioManager audioMa = (AudioManager) this .getSystemService(Context.AUDIO_SERVICE);
2 audioMa.adjustStreamVolume(AudioManager.STREAM_MUSIC,AudioManager.ADJUST_RAISE,
AudioManager.FX_FOCUS_NAVIGATION_UP);

调小声:

  
    
1 AudioManager audioMa = (AudioManager) this .getSystemService(Context.AUDIO_SERVICE);
2 audioMa.adjustStreamVolume(AudioManager.STREAM_MUSIC,AudioManager.ADJUST_LOWER,
AudioManager.FX_FOCUS_NAVIGATION_UP);

你可能感兴趣的:(系统)