static int GetCursorStartPosition(EditorHandler editorHandler)
        {
            var control = GetNativeEditor(editorHandler);

            return(control.SelectionStart);
        }
Ejemplo n.º 2
0
 string GetNativeText(EditorHandler editorHandler) =>
 GetNativeEditor(editorHandler).Text;
Ejemplo n.º 3
0
 Task <string> GetPlatformText(EditorHandler handler)
 {
     return(InvokeOnMainThreadAsync(() => GetPlatformControl(handler).Text));
 }
 public static void MapIsTextPredictionEnabled(EditorHandler handler, IEditor editor)
 {
 }
 public static void MapKeyboard(EditorHandler handler, IEditor editor)
 {
 }
 public static void MapTextColor(EditorHandler handler, IEditor editor)
 {
 }
 public static void MapFont(EditorHandler handler, IEditor editor)
 {
 }
Ejemplo n.º 8
0
 bool GetNativeIsTextPredictionEnabled(EditorHandler editorHandler) =>
 !GetNativeEditor(editorHandler).InputType.HasFlag(InputTypes.TextFlagNoSuggestions);
Ejemplo n.º 9
0
 MauiTextView GetNativeEditor(EditorHandler editorHandler) =>
 (MauiTextView)editorHandler.NativeView;
Ejemplo n.º 10
0
 Color GetNativePlaceholderColor(EditorHandler editorHandler) =>
 ((uint)GetNativeEditor(editorHandler).CurrentHintTextColor).ToColor();
Ejemplo n.º 11
0
 bool GetNativeIsReadOnly(EditorHandler editorHandler) =>
 !GetNativeEditor(editorHandler).Focusable;
Ejemplo n.º 12
0
        double GetNativeUnscaledFontSize(EditorHandler editorHandler)
        {
            var textView = GetNativeEditor(editorHandler);

            return(textView.TextSize / textView.Resources.DisplayMetrics.Density);
        }
 static void SetNativeText(EditorHandler editorHandler, string text) =>
 GetNativeEditor(editorHandler).Text = text;
        static void UpdateCursorStartPosition(EditorHandler editorHandler, int position)
        {
            var control = GetNativeEditor(editorHandler);

            control.SetSelection(position);
        }
Ejemplo n.º 15
0
 UITextView GetNativeEditor(EditorHandler editorHandler) =>
 (UITextView)editorHandler.View;
Ejemplo n.º 16
0
 string GetNativePlaceholderText(EditorHandler editorHandler) =>
 GetNativeEditor(editorHandler).PlaceholderText;
Ejemplo n.º 17
0
 void SetPlatformText(EditorHandler editorHandler, string text) =>
 GetPlatformControl(editorHandler).Text = text;
Ejemplo n.º 18
0
 Color GetNativePlaceholderColor(EditorHandler editorHandler) =>
 GetNativeEditor(editorHandler).PlaceholderTextColor.ToColor();
 public static void MapCharacterSpacing(EditorHandler handler, IEditor editor)
 {
 }
Ejemplo n.º 20
0
        double GetNativeCharacterSpacing(EditorHandler editorHandler)
        {
            var editor = GetNativeEditor(editorHandler);

            return(editor.AttributedText.GetCharacterSpacing());
        }
 public static void MapIsReadOnly(EditorHandler handler, IEditor editor)
 {
 }
Ejemplo n.º 22
0
 double GetNativeUnscaledFontSize(EditorHandler editorHandler) =>
 GetNativeEditor(editorHandler).Font.PointSize;
 public static void MapMaxLength(EditorHandler handler, IEditor editor)
 {
 }
Ejemplo n.º 24
0
 bool GetNativeIsReadOnly(EditorHandler editorHandler) =>
 !GetNativeEditor(editorHandler).UserInteractionEnabled;
Ejemplo n.º 25
0
 EditText GetNativeEditor(EditorHandler editorHandler) =>
 (EditText)editorHandler.View;
Ejemplo n.º 26
0
 bool GetNativeIsTextPredictionEnabled(EditorHandler editorHandler) =>
 GetNativeEditor(editorHandler).AutocorrectionType == UITextAutocorrectionType.Yes;
Ejemplo n.º 27
0
 AppCompatEditText GetNativeEditor(EditorHandler editorHandler) =>
 (AppCompatEditText)editorHandler.View;
Ejemplo n.º 28
0
 public static void MapText(EditorHandler handler, Editor editor)
 {
     Platform.TextBoxExtensions.UpdateText(handler.PlatformView, editor);
 }
Ejemplo n.º 29
0
 MauiTextView GetPlatformControl(EditorHandler handler) =>
 handler.PlatformView;
Ejemplo n.º 30
0
 bool GetNativeIsUrlKeyboard(EditorHandler editorHandler) =>
 GetNativeEditor(editorHandler).KeyboardType == UIKeyboardType.Url;