TextView addTextChangedListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView addTextChangedListener method.

This code example shows how to use the following methods:getText, addTextChangedListener, setTextColor
 
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
 
		okButton = getButton(BUTTON_POSITIVE);
		afterTextChanged(userInputField.getText());
 
		userInputField.addTextChangedListener(this);
	} 
 
	public void onClick(DialogInterface dialog, int which) {
		mServiceAdapter.addRosterItem(userInputField.getText()
				.toString(), aliasInputField.getText().toString(),
				mGroupNameView.getGroupName());
	} 
 
	public void afterTextChanged(Editable s) {
		try { 
			XMPPHelper.verifyJabberID(s);
			okButton.setEnabled(true);

8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setLayoutParams, addTextChangedListener, setMaxLines, setMinLines, setOnEditorActionListener
		mContainer = ( LinearLayoutIMETrap ) new LinearLayoutIMETrap ( sContext );
		mContainer.setLayoutParams ( new LinearLayout.LayoutParams ( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT ));
		mContainer.setOrientation ( LinearLayout.VERTICAL );
		mContainer.setMainActivity ( activity );
 
		mKeyInTextView = new EditText ( activity );
 
		mKeyInTextView.setText ( "" );
		mKeyInTextView.setMinLines ( 1 );
		mKeyInTextView.setMaxLines ( 1 );
		 
		mKeyInTextView.addTextChangedListener ( new TextWatcher () {
 
			public void afterTextChanged ( Editable s ) {
 
   				mKeyString = s.toString ();
			} 
 
			public void beforeTextChanged ( CharSequence s, int start, int count, int after ) {
 

9
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOnKeyListener, setAdapter, setOnItemClickListener, setThreshold, addTextChangedListener
	public StationSelectorAdapter( Context context, AutoCompleteTextView view, StationSearchService service, List<Station> history, ChangeListener listener ) {
		this.context = context;
		this.listener = listener;
		this.history = history;
 
		view.setAdapter( new StationsAdapter( context, service, history ) );
		view.setMaxLines( 1 );
		view.setThreshold( 1 );
		view.addTextChangedListener( this );
		view.setOnItemClickListener( this );
		view.setOnKeyListener( this );
	} 
 
	@Override 
	public void afterTextChanged( Editable paramEditable ) {
		station = null;
		listener.stationChanged();
	} 
 
	@Override 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setText, addTextChangedListener, setView
import net.miginfocom.layout.IDEUtil; 
 
public class ComponentResizer { 
    public static void openResizer(final View view){
        final MigLayout.LayoutParams oldParams = (MigLayout.LayoutParams) view.getLayoutParams();
        final EditText input = new EditText(view.getContext());
        input.setText(oldParams.getConstraintString());
        final AlertDialog alert = new AlertDialog.Builder(view.getContext())
            .setTitle("Update Layout")
            .setView(input)
            .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int whichButton) {}
            }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                if (view.getLayoutParams() != oldParams) {
                    view.setLayoutParams(oldParams);
                } 
            } 
        }).show();
        input.addTextChangedListener(new TextWatcher() {

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:addTextChangedListener, setImeOptions, setInputType, setText
 
		lbl = new TextView(context);
		lbl.setText("Field: ");
		addView(lbl, new LinearLayout.LayoutParams(WIDTH, LayoutParams.WRAP_CONTENT, 1));
 
		edit = new EditText(context);
		edit.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);
		edit.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
 
		addView(edit,  new LinearLayout.LayoutParams(WIDTH, LayoutParams.WRAP_CONTENT, 1));
		// Update the value when the edit box changes 
		edit.addTextChangedListener(new TextWatcher() {
 
			@Override 
			public void afterTextChanged(Editable s) {
				value = Double.parseDouble(s.toString());
				if (changeListener != null && localUpdate == false)
					changeListener.run();
			} 
 

7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:addTextChangedListener
   *          the text box being bound. 
   */ 
  public EditTextTextProperty(EditText target) {
    final WeakReference<EditText> weakTarget = new WeakReference<EditText>(target);
    this.propertyType = String.class;
    target.addTextChangedListener(new TextWatcher() {
      @Override 
      public void afterTextChanged(Editable s) {
        EditTextTextProperty.this.notifier.updateTrackers();
      } 
 
      @Override 
      public void beforeTextChanged(CharSequence s, int start, int count, int after) {
      } 
 
      @Override 
      public void onTextChanged(CharSequence s, int start, int before, int count) {
      } 
    }); 
    this.getter = new Function<String>() {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOnFocusChangeListener, addTextChangedListener, setImeOptions
 
		cancelButton = (ImageButton) mainView.findViewById(RHelper.getId("cancel_button"));
		cancelButton.setOnClickListener(this);
		 
		searchBar = (EditText) mainView.findViewById(RHelper.getId("search_bar"));		
		searchBar.setImeOptions(EditorInfo.IME_ACTION_DONE);
		searchBar.addTextChangedListener(this);
		searchBar.setOnFocusChangeListener(this);
		setNativeView(mainView);		
	} 
	 
	public void setType(int _type) {
		type = _type;
	} 
	 
	@SuppressWarnings("unchecked") 
	public void setData(Object[] _data) {
		data = new ArrayList<HashMap<String,Object>>();
		 
		for(int i = 0, len = _data.length; i < len; i++) {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOnKeyListener, getText, addTextChangedListener, setOnEditorActionListener
	private void updateEnablement() { 
		connect.setEnabled(loginEnabled());
	} 
 
	private boolean loginEnabled() { 
		return login.getText().length() > 0 && password.getText().length() > 0;
	} 
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getSupportActionBar().setDisplayShowTitleEnabled(false); 
		getSupportActionBar().setDisplayShowHomeEnabled(false); 
 
		UpdateUiTextWatcher watcher = new UpdateUiTextWatcher();
		login.addTextChangedListener(watcher);
		password.addTextChangedListener(watcher);
 
		signupLink.setMovementMethod(LinkMovementMethod.getInstance());
 

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setLayoutParams, addTextChangedListener, setCursorVisible, setFilters, setGravity
        this.tvColorLabel.setLayoutParams(lp2);
 
        lp2 = new LinearLayout.LayoutParams(
                android.view.ViewGroup.LayoutParams.WRAP_CONTENT,
                android.view.ViewGroup.LayoutParams.WRAP_CONTENT);
        this.etColor = new EditText(getContext());
        this.etColor.setSingleLine();
        this.etColor.setGravity(Gravity.TOP | Gravity.LEFT);
        this.etColor.setCursorVisible(true);
        this.etColor.setImeOptions(
                EditorInfo.IME_ACTION_DONE | EditorInfo.IME_FLAG_NO_FULLSCREEN);
        this.etColor.setInputType(
                InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
        this.etColor.setLayoutParams(lp2);
        InputFilter[] filters = new InputFilter[2];
        filters[0] = new InputFilter.LengthFilter(8);
        filters[1] = new InputFilter() {
            @Override 
            public CharSequence filter(CharSequence source, int start,
                    int end, Spanned dest, int dstart, int dend) {

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getText, addTextChangedListener, removeTextChangedListener
    @Override 
    public AlertDialog show() {
        dialog = super.show();
        updateButton(); 
 
        input.removeTextChangedListener(this);
        input.addTextChangedListener(this);
 
        return dialog;
    } 
 
    abstract public void onOkClicked(final String input);
 
    @Override 
    public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
 
    } 
 
    @Override 
    public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {

6
CodeRank
Experience pair programming with AI  Get Codota for Java

Related TextView addTextChangedListener Questions & Answers:

Other TextView addTextChangedListener Examples

46:	         * Enabling Search Filter
47:	         * */
48:	        inputSearch.addTextChangedListener(new TextWatcher() {
49:				
50:				@Override

Read More

addTextChangedListener Method Overview
Adds a TextWatcher to the list of those whose methods are called whenever this TextView's text changes.
See Code Examples for other Android TextView Methods: