Skip to content

Most visited

Recently visited

navigation

SoundEffectConstants

public class SoundEffectConstants
extends Object

java.lang.Object
   ↳ android.view.SoundEffectConstants


Constants to be used to play sound effects via 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

From class java.lang.Object

Constants

CLICK

added in API level 1
int CLICK

Constant Value: 0 (0x00000000)

NAVIGATION_DOWN

added in API level 1
int NAVIGATION_DOWN

Constant Value: 4 (0x00000004)

NAVIGATION_LEFT

added in API level 1
int NAVIGATION_LEFT

Constant Value: 1 (0x00000001)

NAVIGATION_RIGHT

added in API level 1
int NAVIGATION_RIGHT

Constant Value: 3 (0x00000003)

NAVIGATION_UP

added in API level 1
int NAVIGATION_UP

Constant Value: 2 (0x00000002)

Public methods

getContantForFocusDirection

added in API level 1
int getContantForFocusDirection (int direction)

Get the sonification constant for the focus directions.

Parameters
direction int: One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_FORWARD or FOCUS_BACKWARD

Returns
int The appropriate sonification constant.

Throws
IllegalArgumentException} when the passed direction is not one of the documented values.
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)