Join us for ⁠#Android11: The Beta Launch Show on June 3!
Added in API level 1

SoundEffectConstants

open class SoundEffectConstants
kotlin.Any
   ↳ android.view.SoundEffectConstants

Constants to be used to play sound effects via View#playSoundEffect(int)

Summary

Constants

static Int

static Int

static Int

static Int

static Int

Public methods

open static Int

Get the sonification constant for the focus directions.

Constants

CLICK

Added in API level 1
static val CLICK: Int
Value: 0
Added in API level 1
static val NAVIGATION_DOWN: Int
Value: 4
Added in API level 1
static val NAVIGATION_LEFT: Int
Value: 1
Added in API level 1
static val NAVIGATION_RIGHT: Int
Value: 3
Added in API level 1
static val NAVIGATION_UP: Int
Value: 2

Public methods

getContantForFocusDirection

Added in API level 1
open static fun getContantForFocusDirection(direction: Int): Int

Get the sonification constant for the focus directions.

Parameters
direction Int: One of View#FOCUS_UP, View#FOCUS_DOWN, View#FOCUS_LEFT, View#FOCUS_RIGHT, View#FOCUS_FORWARD or View#FOCUS_BACKWARD
Return
Int The appropriate sonification constant.
Exceptions
IllegalArgumentException when the passed direction is not one of the documented values.