title: Convert Android Java code to Xamarin C#
body: <p>I get a problem with converting code from native Android JAVA code to Xamarin C# Android code</p>
  
  <p>I have a class which shall help me to delay start in my custom <code>AutoComleteTextView</code> searching:</p>
  
  <pre><code>public class DelayAutoCompleteTextView : AutoCompleteTextView
  {
      public static Context _Context {get; set;}
      private static Android.Util.IAttributeSet _Attrs { get; set; }
  
  public DelayAutoCompleteTextView(Context context, Android.Util.IAttributeSet attrs) : base(context, attrs)
  {
      _Context = context;
      _Attrs = attrs;
  }
  
  private static int MESSAGE_TEXT_CHANGED = 100;
  private static int DEFAULT_AUTOCOMPLETE_DELAY = 750;
  
  private int mAutoCompleteDelay = DEFAULT_AUTOCOMPLETE_DELAY;
  private ProgressBar mLoadingIndicator;
  
  public class mHandler : Handler
  {
      public override void HandleMessage(Message msg)
      {
          DelayAutoCompleteTextView.base.PerformFiltering((Java.Lang.ICharSequence)msg.Obj, msg.Arg1);
      }
  }
  
  public void setLoadingIndicator(ProgressBar progressBar)
  {
      mLoadingIndicator = progressBar;
  }
  
  public void setAutoCompleteDelay(int autoCompleteDelay)
  {
      mAutoCompleteDelay = autoCompleteDelay;
  }
  
  protected override void PerformFiltering(Java.Lang.ICharSequence text, int keyCode)
  {
      if (mLoadingIndicator != null)
      {
          mLoadingIndicator.Visibility = ViewStates.Visible;
      }
  
      mHandler.removeMessages(MESSAGE_TEXT_CHANGED);
      mHandler.sendMessageDelayed(mHandler.obtainMessage(MESSAGE_TEXT_CHANGED, text), mAutoCompleteDelay);
  }
  
  public override void OnFilterComplete(int count)
  {
      if (mLoadingIndicator != null)
      {
          mLoadingIndicator.Visibility = ViewStates.Gone;
      }
  
      base.OnFilterComplete(count);
  }}
  </code></pre>
  
  <p>But have 3 error messages:</p>
  
  <ul>
  <li><p>1) <code>DelayAutoCompleteTextView.base.PerformFiltering((Java.Lang.ICharSequence)msg.Obj, msg.Arg1);</code></p></li>
  <li><p>2) <code>mHandler.removeMessages(MESSAGE_TEXT_CHANGED);</code></p></li>
  <li><p>3) <code>mHandler.sendMessageDelayed(mHandler.obtainMessage(MESSAGE_TEXT_CHANGED, text), mAutoCompleteDelay);</code></p></li>
  </ul>
  
  <p>Original code on Java I <a href="https://github.com/davidbeloo/CitiesAutoComplete/blob/master/app/src/main/java/com/thepinkandroid/citiesautocomplete/general/DelayAutoCompleteTextView.java" rel="nofollow">copied from github</a></p>
  
  <p>Please help me to convert. 
  Sorry for my bad English )</p>