最終更新:2021-10-18 (月) 13:53:00 (45d)  

AudioManager.adjustStreamVolume
Top / AudioManager.adjustStreamVolume

AudioManager.adjustStreamVolume(int streamType, int direction, int flags)

Adjusts the volume of a particular stream by one step in a direction.

https://developer.android.com/reference/android/media/AudioManager#adjustStreamVolume(int, int, int)

パラメータ

direction

  • AudioManager.ADJUST_LOWER?-1
    AudioManager.ADJUST_RAISE?1
    AudioManager.ADJUST_SAME?0
    AudioManager.ADJUST_TOGGLE_MUTE?101
    AudioManager.ADJUST_MUTE-100
    AudioManager.ADJUST_UNMUTE?100

AudioManager.setStreamMuteがdeprecated