반응형
안드로이드, view 기본 click 소리 내는 방법. |
VIew attribute 설정
먼저 view 가 sound effect 를 낼 수 있는 조건을 만들어야 한다.
code ( programatically ) 로도 만들 수 있고, xml 로도 만들 수 있다.
<xml>
android:soundEffectsEnabled="true"
<java>
view.setSoundEffectsEnabled (true );
소리 내기
view.playSoundEffect( SoundEffectConstants.CLICK );
반응형
'프로그래밍 놀이터 > 안드로이드, Java' 카테고리의 다른 글
[android] intra app communication method statistics. ( localbroadcastmanager, eventbus, otto ) (0) | 2013.11.04 |
---|---|
[android] Bitmap too large to be uploaded into a texture (0) | 2013.10.31 |
[android]The library 'lombok2.jar' contains native libraries that will not run on the device. (0) | 2013.10.28 |
[android] TaskStackBuilder Tutorial (0) | 2013.10.27 |
[android] Google Map V2 manifest 설정 (0) | 2013.10.24 |
댓글