fix merge
authorStephane Delcroix <stephane@delcroix.org>
Mon, 14 Jan 2019 11:35:29 +0000 (12:35 +0100)
committerStephane Delcroix <stephane@delcroix.org>
Mon, 14 Jan 2019 11:35:29 +0000 (12:35 +0100)
Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs

index 13f28e4..8e422d2 100644 (file)
@@ -34,6 +34,13 @@ namespace Xamarin.Forms.Platform.Android
                }
 
                protected override EditText EditText => Control;
+
+               protected override void UpdateIsReadOnly()
+               {
+                       base.UpdateIsReadOnly();
+                       bool isReadOnly = !Element.IsReadOnly;
+                       Control.SetCursorVisible(isReadOnly);
+               }
        }
 
        public abstract class EntryRendererBase<TControl> : ViewRenderer<Entry, TControl>, ITextWatcher, TextView.IOnEditorActionListener
@@ -462,13 +469,12 @@ namespace Xamarin.Forms.Platform.Android
                        }
                }
 
-               void UpdateIsReadOnly()
+               protected virtual void UpdateIsReadOnly()
                {
                        bool isReadOnly = !Element.IsReadOnly;
 
                        Control.FocusableInTouchMode = isReadOnly;
                        Control.Focusable = isReadOnly;
-                       Control.SetCursorVisible(isReadOnly);
                }
        }
 }