XML : I have made radio buttons in a preference screen and am trying to make them play a different sound depending on which one I click on

I have three different radio buttons inside a list preference in my preference screen. I have a button on my home screen that plays a sound when I click it. The radio buttons are supposed to change which sound is played when I click the button. I had this working with checkboxes, but ran into a bug because you could click more than one sound. I have not found anything to help me on this topic at all. Thanks :)

Here is what I have so far...

My list preference

My radio buttons

  <resources>  <string-array name="soundOptions">      <item>Standard Fan</item>      <item>Alternate Fan</item>      <item>White Noise</item>  </string-array>    <String-array name="soundValues">      <item>Standard is selected</item>      <item>Alternate is selected</item>      <item>White is selected</item>  </String-array>    

I am just not sure how to reference the radio buttons in the MainActivity

No comments:

Post a Comment