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

调大声:

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);
posted on 2011-04-08 17:24  月vs枫  阅读(463)  评论(0编辑  收藏  举报