We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Clear button

I have successfully achuieved the clear button in iOS but facing trouble to add in Android. Please guide me how can i add the clear button in Android.

This works nice in iOS  
 public class TextboxRenderer : EntryRenderer
    {
        protected override void OnElementChanged (ElementChangedEventArgs<Entry> e)
        {
            base.OnElementChanged (e);

            if (this.Control == null) {
                return;
            }

            var entry = this.Control as UITextField;

            entry.ClearButtonMode = UITextFieldViewMode.WhileEditing;

        }
    }

3 Replies

HM Hemalatha Marikumar Syncfusion Team June 24, 2016 12:16 PM UTC

Hi Atif,

Thanks for contacting Syncfusion support.

Currently there is no direct support for achieving the clear button in Android Entry Control. We cannot provide support for customizing the Xamarin Native control. Please contact Xamarin Support team regarding this support. In Syncfusion we have a similar control named “SfAutoComplete” control which will have a Clear button and suggestions will be listed based on search. Please have the details from the below UG documentation.

Syncfusion UG Link: http://help.syncfusion.com/xamarin/sfautocomplete/getting-started

Xamarin support link with same query :  https://forums.xamarin.com/discussion/32647/entry-with-clear-button 

Regards,
Hemalatha M.R 



AT Atif June 24, 2016 06:43 PM UTC

Thanks and appreciated.


VV Vignesh V Syncfusion Team June 27, 2016 05:53 AM UTC

Hi Atif,

Thanks for the update.

We are glad to help you on this. Please let us know if you have any other query.

Regards,
Vignesh V 


Loader.
Up arrow icon