Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

problem with search bar or string contain only on iOS ?

$
0
0

Hello,

My program has a FAQ with a search bar : If you type words it does refresh a stacklayout containing all the questions to only the questions that contains the specified word / character.

This works perfectly on Android but seems to ignore words with special characters like ê, à, ', or - etc... in iOS

any idea why ?

here is my code

    public void FilterFaq(string text){
        stack.Children.Clear ();

        foreach(Faq faq in faqList){
            if(faq.Name.ToLower().Contains(text.ToLower())){
                var stackText = new StackLayout () {
                    Padding = new Thickness (10, 10, 10, 10),
                    Children = {
                        new Label { 
                            Text = faq.Name,
                            FontSize = 19,
                            TextColor = Color.FromHex("#5e7da0"),
                        }
                    },
                };
                stackText.GestureRecognizers.Add (new TapGestureRecognizer{
                    Command = new Command(() => {
                        Content.Navigation.PushAsync(new QuestionPage(faq));
                    })
                });
                stack.Children.Add (stackText);

                Image limiter = new Image{
                    Source = ImageSource.FromFile("separationBar"),
                };
                stack.Children.Add (limiter);
            }
        }
    }

Faq object are simple object with 2 string params "name" & "description" that are localised.

Could it be the localisation that is not working for this in iOS ?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>