Book Image

Mastering Android Game Development

By : Raul Portales
Book Image

Mastering Android Game Development

By: Raul Portales

Overview of this book

Table of Contents (18 chapters)
Mastering Android Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
API Levels for Android Versions
Index

Disabling system sounds


Android has default sounds for button clicks. If you want to use your own sounds for the click action, you also have to disable the system sounds. This is something that we will want almost every time. Luckily it is very easy to do. We just have to modify the application style we have already defined in res/styles.xml and tell it that we want to disable sound effects:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
  <item name="android:soundEffectsEnabled">false</item>
</style>