Android中文API(96)——SoundEffectConstants


 

前言

  本章内容是android.view.SoundEffectConstants,版本为Android 2.3 r1,翻译来自"凌云健笔",欢迎大家访问他的博客:http://www.cnblogs.com/lijian2010/,再次感谢"凌云健笔" !期待你一起参与Android 中文API的翻译,联系我over140@gmail.com。

 

声明

  欢迎转载,但请保留文章原始出处:)

    博客园:http://www.cnblogs.com/

    Android中文翻译组:http://goo.gl/6vJQl

 

正文

  一、结构

public class SoundEffectConstants extends Object

 

java.lang.Object

android.view.SoundEffectConstants

 

  二、概述

    playSoundEffect(int)所需的播放声效设定常量。

 

  三、常量

public static final int CLICK

(译者注:单击事件)常量,取值0 (0x00000000)

 

public static final int NAVIGATION_DOWN

(译者注:View.FOCUS_DOWN)常量,取值4 (0x00000004)

 

public static final int NAVIGATION_LEFT

(译者注:View.FOCUS_LEFT)常量,取值1 (0x00000001)

 

public static final int NAVIGATION_RIGHT

(译者注:View.FOCUS_RIGHT)常量,取值3 (0x00000003)

 

public static final int NAVIGATION_UP

(译者注:View.FOCUS_UP)常量,取值2 (0x00000002)

 

  四、公共方法

  public static int getContantForFocusDirection(int direction)

  针对不同声音方向,获得相应的发声常数。

  参数

                  direction 参数取值为以下常量之一:FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_FORWARD , FOCUS_BACKWARD.

                 返回值

                   合适的发声常数

 

  五、补充

 

  文章链接

      触感反馈和声音反馈的效果实现

 

 

 

posted @ 2011-01-24 01:25  农民伯伯  阅读(1854)  评论(0编辑  收藏  举报