void ITextWatcher.OnTextChanged(Java.Lang.ICharSequence?s, int start, int before, int count)
            {
                // We are replacing 0 characters with 0 characters, so skip
                if (before == 0 && count == 0)
                {
                    return;
                }

                Handler?.OnTextChanged(s?.ToString());
            }
            protected override FilterResults PerformFiltering(Java.Lang.ICharSequence constraint)
            {
                var results = new FilterResults();

                var count = adapter.PerformFiltering(constraint?.ToString());

                results.Count = count;

                return(results);
            }
            protected override Filter.FilterResults PerformFiltering(Java.Lang.ICharSequence constraint)
            {
                FilterResults results = new FilterResults();

                if (constraint != null)
                {
                    var searchFor = constraint.ToString();
                    Console.WriteLine("searchFor:" + searchFor);
                    var matchList = new List <string>();

                    // find matches, IndexOf means look for the input anywhere in the items
                    // but it isn't case-sensitive by default!
                    var matches = from i in customAdapter.AllItems
                                  where i.IndexOf(searchFor) >= 0
                                  select i;

                    foreach (var match in matches)
                    {
                        matchList.Add(match);
                    }

                    customAdapter.MatchItems = matchList.ToArray();
                    Console.WriteLine("resultCount:" + matchList.Count);

// not sure if the Java array/FilterResults are used
                    Java.Lang.Object[] matchObjects;
                    matchObjects = new Java.Lang.Object[matchList.Count];
                    for (int i = 0; i < matchList.Count; i++)
                    {
                        matchObjects[i] = new Java.Lang.String(matchList[i]);
                    }

                    results.Values = matchObjects;
                    results.Count  = matchList.Count;
                }
                return(results);
            }
Exemple #4
0
    public Java.Lang.ICharSequence FilterFormatted(
        Java.Lang.ICharSequence source,
        int start,
        int end,
        ISpanned dest,
        int dstart,
        int dend)
    {
        try
        {
            string val   = dest.ToString().Insert(dstart, source.ToString());
            int    input = int.Parse(val);
            if (IsInRange(_min, _max, input))
            {
                return(null);
            }
        }
        catch (Exception ex)
        {
            Debug.WriteLine("FilterFormatted Error: " + ex.Message);
        }

        return(new Java.Lang.String(string.Empty));
    }
Exemple #5
0
 public void OnTextChanged(Java.Lang.ICharSequence s, int start, int before, int count)
 {
     Owner?.OnTextChanged(s.ToString());
 }
 protected override void PublishResults(Java.Lang.ICharSequence constraint, FilterResults results)
 {
     adapter.PublishResults(constraint?.ToString());
 }
            protected override FilterResults PerformFiltering
                (Java.Lang.ICharSequence constraint)
            {
                DB.Open();
                var     returnObj = new FilterResults();
                ICursor newCursor =
                    DB.ReadableDatabase.RawQuery
                        ("select * from productInfo where product_title like :constrStr ", new string[] { "%" + constraint.ToString() + "%" });

                returnObj.Values = (Java.Lang.Object)newCursor;
                returnObj.Count  = newCursor.Count;
                return(returnObj);
            }
Exemple #8
0
 /// <summary>
 /// Sets the title.
 /// </summary>
 /// <returns>The title.</returns>
 /// <param name="title">Title.</param>
 public override AlertDialog.Builder SetTitle(Java.Lang.ICharSequence title)
 {
     this.title = title.ToString();
     return(this);
 }
 protected override void OnTextChanged(Java.Lang.ICharSequence text, int start, int before, int after)
 {
     RefitText(text.ToString(), Width);
 }
Exemple #10
0
        //		private void SetTitle (string title)
        //		{
        //			this.Title = title;
        //			this.ActionBar.Title = title;
        //		}

        protected override void OnTitleChanged(Java.Lang.ICharSequence title, Android.Graphics.Color color)
        {
            //base.OnTitleChanged (title, color);
            this.ActionBar.Title = title.ToString();
        }
 public override void OnAuthenticationHelp(int helpMsgId, Java.Lang.ICharSequence helpString)
 {
     base.OnAuthenticationHelp(helpMsgId, helpString);
     _fingerprintAuthenticator._authenticationCallback.AuthenticationHelp((AuthenticationHelpCodes)helpMsgId, helpString.ToString());
 }
            public override void OnAuthenticationError(int errMsgId, Java.Lang.ICharSequence errString)
            {
                base.OnAuthenticationError(errMsgId, errString);

                var error = (AuthenticationErrorCodes)errMsgId;

                if (error != AuthenticationErrorCodes.ErrorCanceled)
                {
                    _fingerprintAuthenticator._authenticationCallback.AuthenticationError(error, errString.ToString());
                }
            }
 public void OnTextChanged(Java.Lang.ICharSequence s, int start, int before, int count)
 {
     filterData(s.ToString());
 }
Exemple #14
0
 void ITextWatcher.OnTextChanged(Java.Lang.ICharSequence?s, int start, int before, int count)
 {
     Handler?.OnTextChanged(s?.ToString());
 }
Exemple #15
0
            protected override FilterResults PerformFiltering(Java.Lang.ICharSequence constraint)
            {
                var     returnObj = new FilterResults();
                ICursor newCursor = dbb.ReadableDatabase.RawQuery("select * from Vendors where vname like :constrStr ", new string[] { "%" + constraint.ToString() + "%" });

                returnObj.Values = (Java.Lang.Object)newCursor;
                returnObj.Count  = newCursor.Count;
                return(returnObj);
            }
Exemple #16
0
 protected override void OnTitleChanged(Java.Lang.ICharSequence title, Android.Graphics.Color color)
 {
     this.SupportActionBar.Title = title.ToString();
 }
 public override void OnAuthenticationHelp(int helpMsgId, Java.Lang.ICharSequence helpString)
 {
     // Notify the user that the scan failed and display the provided hint.
     AuthManager.OnAuthenticationHelp?.Invoke(helpMsgId, helpString.ToString());
 }
Exemple #18
0
 public override void OnAuthenticationHelp(int helpMsgId, Java.Lang.ICharSequence helpString)
 {
     ShowError(helpString.ToString());
 }
Exemple #19
0
 public override void OnAuthenticationHelp(FingerprintState helpCode, Java.Lang.ICharSequence helpString)
 {
     ShowError(helpString.ToString());
 }
Exemple #20
0
 public void OnTextChanged(Java.Lang.ICharSequence s, int start, int before, int count)
 {
     Value = s.ToString();
 }
 /// <summary>
 /// To be added.
 /// </summary>
 /// <param name="state"></param>
 /// <param name="err"></param>
 public AuthenticationEventArgs(FingerprintState state, Java.Lang.ICharSequence err) : this(state, err.ToString())
 {
 }