Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
212 views
in Technique[技术] by (71.8m points)

c# - Custom Editor does not allow spell check

I have a small custom editor (only to remove the subline in android):

    protected override void OnElementChanged(ElementChangedEventArgs<Editor> e)
    {
        base.OnElementChanged(e);

        if (Control != null)
        {
            GradientDrawable gd = new GradientDrawable();
            gd.SetColor(global::Android.Graphics.Color.Transparent);
            this.Control.SetBackgroundDrawable(gd);
            this.Control.SetRawInputType(InputTypes.TextFlagAutoComplete);
            this.Control.SetRawInputType(InputTypes.TextFlagAutoCorrect);
            //Control.SetHintTextColor(ColorStateList.ValueOf(global::Android.Graphics.Color.Black));
        }
    }

As you can see, I gave it both flags I could find in order to allow auto correct or auto complete.

Even more, I also did this in the XAML:

 <icustomcomponents:IEditor 
                                    Keyboard="Default"
                                    x:Name="editor_desc"
                                    IsSpellCheckEnabled="True"
                                    MaxLength="1500"
                                    IsTextPredictionEnabled="True"
                                    TextColor="#424242"
                                    FontFamily="Font_11"
                                    Margin="5,0,0,5"
                                    BackgroundColor="#00000000"
                                    PlaceholderColor="#9b9b9b"
                                    Placeholder="Beschreibung" />

Again giving it all the attributes I could find in regards to spellchecking.

But it is pointless: spellchecking or autocomplete or whatever - nothing is enabled and it is really annoying.

What am I missing? A flag?

question from:https://stackoverflow.com/questions/65831880/custom-editor-does-not-allow-spell-check

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...