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 | 
            
             Effect id for a navigation down  | 
        
| static Int | 
            
             Effect id for a navigation left  | 
        
| static Int | 
            
             Effect id for a repeatedly triggered navigation down, e.  | 
        
| static Int | 
            
             Effect id for a repeatedly triggered navigation left, e.  | 
        
| static Int | 
            
             Effect id for a repeatedly triggered navigation right, e.  | 
        
| static Int | 
            
             Effect id for a repeatedly triggered navigation up, e.  | 
        
| static Int | 
            
             Effect id for a navigation right  | 
        
| static Int | 
            
             Effect id for a navigation up  | 
        
| Public methods | |
|---|---|
| open static Int | 
            getConstantForFocusDirection(direction: Int, repeating: Boolean)Get the sonification constant for the focus directions  | 
        
| open static Int | 
            getContantForFocusDirection(direction: Int)Get the sonification constant for the focus directions.  | 
        
Constants
NAVIGATION_DOWN
static val NAVIGATION_DOWN: Int
Effect id for a navigation down
Value: 4NAVIGATION_LEFT
static val NAVIGATION_LEFT: Int
Effect id for a navigation left
Value: 1NAVIGATION_REPEAT_DOWN
static val NAVIGATION_REPEAT_DOWN: Int
Effect id for a repeatedly triggered navigation down, e.g. due to long pressing a button
Value: 8NAVIGATION_REPEAT_LEFT
static val NAVIGATION_REPEAT_LEFT: Int
Effect id for a repeatedly triggered navigation left, e.g. due to long pressing a button
Value: 5NAVIGATION_REPEAT_RIGHT
static val NAVIGATION_REPEAT_RIGHT: Int
Effect id for a repeatedly triggered navigation right, e.g. due to long pressing a button
Value: 7NAVIGATION_REPEAT_UP
static val NAVIGATION_REPEAT_UP: Int
Effect id for a repeatedly triggered navigation up, e.g. due to long pressing a button
Value: 6NAVIGATION_RIGHT
static val NAVIGATION_RIGHT: Int
Effect id for a navigation right
Value: 3NAVIGATION_UP
static val NAVIGATION_UP: Int
Effect id for a navigation up
Value: 2Public methods
getConstantForFocusDirection
open static fun getConstantForFocusDirection(
direction: Int,
repeating: Boolean
): Int
Get the sonification constant for the focus directions
| Parameters | |
|---|---|
direction | 
            Int: The direction of the focus. Value is android.view.View#FOCUS_BACKWARD, android.view.View#FOCUS_FORWARD, android.view.View#FOCUS_LEFT, android.view.View#FOCUS_UP, android.view.View#FOCUS_RIGHT, or android.view.View#FOCUS_DOWN | 
          
repeating | 
            Boolean: True if the user long-presses a direction | 
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException | 
            when the passed direction is not one of the documented values. | 
getContantForFocusDirection
open static fun getContantForFocusDirection(direction: Int): Int
Get the sonification constant for the focus directions.
| Parameters | |
|---|---|
direction | 
            Int: The direction of the focus. Value is android.view.View#FOCUS_BACKWARD, android.view.View#FOCUS_FORWARD, android.view.View#FOCUS_LEFT, android.view.View#FOCUS_UP, android.view.View#FOCUS_RIGHT, or android.view.View#FOCUS_DOWN | 
          
| Return | |
|---|---|
Int | 
            The appropriate sonification constant. | 
| Exceptions | |
|---|---|
 | 
            IllegalArgumentException when the passed direction is not one of the documented values. |