lightbulb_outline Please take our October 2018 developer survey. Start survey

SoundEffectConstants

public class SoundEffectConstants
extends Object

java.lang.Object
   ↳ android.view.SoundEffectConstants


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

Summary

Constants

int CLICK

int NAVIGATION_DOWN

int NAVIGATION_LEFT

int NAVIGATION_RIGHT

int NAVIGATION_UP

Public methods

static int getContantForFocusDirection(int direction)

Get the sonification constant for the focus directions.

Inherited methods

Constants

CLICK

added in API level 1
public static final int CLICK

Constant Value: 0 (0x00000000)

added in API level 1
public static final int NAVIGATION_DOWN

Constant Value: 4 (0x00000004)

added in API level 1
public static final int NAVIGATION_LEFT

Constant Value: 1 (0x00000001)

added in API level 1
public static final int NAVIGATION_RIGHT

Constant Value: 3 (0x00000003)

added in API level 1
public static final int NAVIGATION_UP

Constant Value: 2 (0x00000002)

Public methods

getContantForFocusDirection

added in API level 1
public static int getContantForFocusDirection (int direction)

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

Returns
int The appropriate sonification constant.

Throws
IllegalArgumentException} when the passed direction is not one of the documented values.