2

I want to disable the annoying sound effects when switching between items in a RecyclerView with a D-PAD and just get rid of them if possible in the whole application.

I tried setting

  <item name="android:soundEffectsEnabled">false</item>

in the main AppTheme and also tried setting this property in each item of the recyclerview but it did NOT work.

I also tried setting this in OnResume

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    mAudioManager.adjustStreamVolume(AudioManager.STREAM_SYSTEM, AudioManager.ADJUST_MUTE, 0);
} else {
    mAudioManager.setStreamMute(AudioManager.STREAM_SYSTEM, true);
}

which worked in most devices that does not have the isVolumeFixed() in AudioManager set to true which is the case with Amazon FireTV.

If the volume is fixed it means that I cannot adjust the volume of any stream, is there a workaround to disable the sound effects in this case?

I was using a ListView previously and the sound effects where disabled just fine when I set soundEffectsEnabled to false, but I'm not sure why it isn't working with RecyclerView.

someone
  • 300
  • 1
  • 9

0 Answers0