开发者

Play sound without onClickListener

开发者 https://www.devze.com 2023-01-05 03:25 出处:网络
How can I play a sound in an activity without requiring the press of a button? I already know how to play the sound, but need to bypass the onClickListener. Thanks for any a开发者_如何学JAVAdvice.You

How can I play a sound in an activity without requiring the press of a button? I already know how to play the sound, but need to bypass the onClickListener. Thanks for any a开发者_如何学JAVAdvice.


You could tell the sound to play in onStart() or onResume(), which are methods of Activity inherited by your subclass.

0

精彩评论

暂无评论...
验证码 换一张
取 消