"click" sound on button tap

Hi,

Is there a way to get the audible "click" sound on SF controls, like SfButton and SfRadioButton?

I was able  to get it working on a plain Xamarin Forms button (at least on an Android platform) by using a custom renderer, but from reading the documentation and forums, it's not clear to me how to do the same thing with SF controls.

Thanks!

5 Replies

SJ Suyamburaja Jayakumar Syncfusion Team May 28, 2020 08:34 AM UTC

Hi Jon,  
 
Greetings from Syncfusion. 
 
We have checked the reported query “click sound on button tap” from our side. We would like to let you know that you can achieve your requirement using Xamarin-Plugin SimpleAudioPlayer. You can refer the below blog for further details.  
  
  
For your assistance, we have created a sample to make click sound in SfButton and you can download it from the below link.  
  
 
Please let us know if you require further assistance.  
 
Regards,  
Suyamburaja J. 



JO Jon May 28, 2020 03:02 PM UTC

Thanks for sending this.

I was hoping for something that I could apply globally across the project.

I was able to get the click working properly for radio buttons by creating a custom renderer derived from SfRadioButtonRenderer, and creating an event handler for the Touch event that plays the Click sound effect.

However, I was unable to find the corresponding SfButtonRenderer to do the same with SfButton. Is there a renderer that can be used as a base class for a custom SfButton renderer?


DD Devakumar Dhanapoosanam Syncfusion Team May 29, 2020 11:01 AM UTC

Hi Jon, 
 
We are glad to hear that you have achieved your requirement in RadioButton using its custom renderer.  
 
We would like to let you know that we have some limitation in achieving your requirement through SfButtonRenderer. SfButton is implemented completely through PCL not like a mapping control to have a native control. It has base as Syncfusion Border control. So, all its customization happens through drawing. Hence only we have suggested the previous solution for you. 
 
Please let us know if you have any other query. 
 
Regards, 
Devakumar D 



JO Jon May 29, 2020 07:29 PM UTC

Thanks for the response. I had actually started by using the SimpleAudioPlayer, but the delay is noticeable, so I moved to custom renderers. I'll move back to SimpleAudioPlayer in a derived type, and check back in future releases to see if the situation changes for SfButton.

Thanks!


HM Hemalatha Marikumar Syncfusion Team June 1, 2020 06:58 AM UTC

Hi Jon, 
 
Thanks for your update. 
 
We are glad to hear that you have managed this with already provided solution. We will let you know if any other feature consideration to correct those limitation. 
 
Regards,
Hemalatha M.
 
 


Loader.
Up arrow icon