Android Open Source - Dense-sms-sender-for-android My Edit Text






From Project

Back to project page Dense-sms-sender-for-android.

License

The source code is released under:

Apache License

If you think the Android project Dense-sms-sender-for-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package mrhs.ce.DenseSms;
/*from   w w w. j a v a2  s.  c  o m*/
import java.util.ArrayList;

import android.content.Context;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.widget.EditText;

public class MyEditText extends EditText {

  ArrayList<TextWatcher> list;
  public MyEditText(Context ctx)
    {
        super(ctx);
    }

    public MyEditText(Context ctx, AttributeSet attrs)
    {
        super(ctx, attrs);
    }

    public MyEditText(Context ctx, AttributeSet attrs, int defStyle)
    {       
        super(ctx, attrs, defStyle);
    }
  
  @Override
  public void addTextChangedListener(TextWatcher watcher) {
    // TODO Auto-generated method stub
    if(list==null){
      list=new ArrayList<TextWatcher>();
      list.add(null);
    }
    list.set(0, watcher);
    super.addTextChangedListener(watcher);
  }
  public void removeTextWatcher(){
    removeTextChangedListener(list.get(0));
    list.set(0, null);
  }

}




Java Source Code List

mrhs.ce.DenseSms.ContactPickerMulti.java
mrhs.ce.DenseSms.ContactsArrayAdaptor.java
mrhs.ce.DenseSms.DatabaseHandler.java
mrhs.ce.DenseSms.GroupEditorActivity.java
mrhs.ce.DenseSms.GroupEditorArrayAdaptor.java
mrhs.ce.DenseSms.MainActivity.java
mrhs.ce.DenseSms.MyEditText.java
mrhs.ce.DenseSms.PostMessageActivity.java
mrhs.ce.DenseSms.PostMessageArrayAdaptor.java
mrhs.ce.DenseSms.SdCardHandler.java