![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android/Ophone
文章平均质量分 68
sprite1225
这个作者很懒,什么都没留下…
展开
-
Android平台游戏声音播放实践
大部分游戏都有音效,不然游戏乐趣会降低很多,而几乎所有音效都是重复播放的。下面的代码只加载一次音频文件,但是却可以被多次使用。请将音频文件放置在/res/raw路径中。 public static final int SOUND_EXPLOSION = 1; private SoundPool soundPool;private HashMap soundPoolMap;原创 2009-12-16 16:46:00 · 551 阅读 · 1 评论 -
Android平台屏幕软键盘关闭
当EditText被选择,将会自动获得焦点,并且屏幕中会显示一个软键盘。下面的代码将演示,如何关闭软键盘。 InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editTextField.get原创 2010-01-06 15:02:00 · 801 阅读 · 0 评论