Home Package Class Method

Examples of TextWatcher


Examples of android.text.TextWatcher

  }

  public static TextWatcher getPasswordStrengthTextWatcher(final Context     context,
                                                           final ProgressBar progressBar)
  {
    return new TextWatcher() {

      @Override
      public void beforeTextChanged(CharSequence s, int start, int count, int after) { }

      @Override
View Full Code Here

Examples of android.text.TextWatcher

        mText.setSelection(sel + 9);
        mDrawer.closeDrawer(Gravity.RIGHT);
      }
    });
   
    mText.addTextChangedListener(new TextWatcher() {
      @Override
      public void beforeTextChanged(CharSequence s, int start, int count, int after) {
       
      }
View Full Code Here

Examples of android.text.TextWatcher

          return source;
        }
      } } );

    addTextChangedListener(
      new TextWatcher()
      {
        @Override
        public void onTextChanged(
          CharSequence s,
          int start,
View Full Code Here

Examples of android.text.TextWatcher

    });

    if (cardNumberTextWatcher != null)
      cardNumberView.removeTextChangedListener(cardNumberTextWatcher);

    cardNumberTextWatcher = new TextWatcher() {

      @Override
      public void beforeTextChanged(CharSequence s, int start, int count, int after) {

      }
View Full Code Here

Examples of android.text.TextWatcher

    });

    if (cardExpirationTextWatcher != null)
      cardExpirationView.removeTextChangedListener(cardExpirationTextWatcher);

    cardExpirationTextWatcher = new TextWatcher() {

      @Override
      public void beforeTextChanged(CharSequence s, int start, int count, int after) {

      }
View Full Code Here

Examples of android.text.TextWatcher

   
    mEditGmailAddr = (EditText) rootView.findViewById(R.id.edit_email_addr);
    String defaultAddr = Settings.getInstance(mContext).getGmailAddress();
    if(defaultAddr != null && !defaultAddr.isEmpty())
      mEditGmailAddr.setText(defaultAddr);
    mEditGmailAddr.addTextChangedListener(new TextWatcher() {
      @Override
      public void onTextChanged(CharSequence s, int start, int before, int count) {
        String addr = s.toString();
        if(addr != null && !addr.isEmpty()) {
          mFragmentListener.OnFragmentCallback(IFragmentListener.CALLBACK_REQUEST_SET_EMAIL_ADDRESS,
View Full Code Here

Examples of android.text.TextWatcher

        mSendBtn = (ImageButton) view.findViewById(R.id.discuss_comment_send_btn);
        mSendBtn.setEnabled(false);
        mSendBtn.setOnClickListener(mSendBtnClickListener);
        mCommentEdit = (EditText) view.findViewById(R.id.discuss_comment_edit);
        mCommentEdit.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {

            }
View Full Code Here

Examples of android.text.TextWatcher

   
    mEditGmailAddr = (EditText) rootView.findViewById(R.id.edit_email_addr);
    String defaultAddr = Settings.getInstance(mContext).getGmailAddress();
    if(defaultAddr != null && !defaultAddr.isEmpty())
      mEditGmailAddr.setText(defaultAddr);
    mEditGmailAddr.addTextChangedListener(new TextWatcher() {
      @Override
      public void onTextChanged(CharSequence s, int start, int before, int count) {
        String addr = s.toString();
        if(addr != null && !addr.isEmpty()) {
          mFragmentListener.OnFragmentCallback(IFragmentListener.CALLBACK_REQUEST_SET_EMAIL_ADDRESS,
View Full Code Here

Examples of android.text.TextWatcher

   
        /*------------------------------------------------
         *  FIRST BOX
         -------------------------------------------------*/
       
        mText1.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence s, int start, int before,
                    int count) {
            }

            @Override
            public void beforeTextChanged(CharSequence s, int start, int count,
                    int after) {
            }

            @Override
            public void afterTextChanged(Editable s) {
                if (s.length() > 0) {
                    if (!mConfirmingPinCode){
                       mTempText[0] = mText1.getText().toString();
                      
                    }
                    mText2.requestFocus();
                 }
            }
        });
       
       

        /*------------------------------------------------
         *  SECOND BOX
         -------------------------------------------------*/
        mText2.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence s, int start, int before,
                    int count) {
            }

            @Override
            public void beforeTextChanged(CharSequence s, int start, int count,
                    int after) {
            }

            @Override
            public void afterTextChanged(Editable s) {
                if (s.length() > 0) {
                    if (!mConfirmingPinCode){
                        mTempText[1] = mText2.getText().toString();
                    }
                   
                    mText3.requestFocus();
                }
            }
        });
        mText2.setOnKeyListener(new OnKeyListener() {

            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                if (keyCode == KeyEvent.KEYCODE_DEL && mBChange) {

                    mText1.setText("");
                    mText1.requestFocus();
                    if (!mConfirmingPinCode)
                       mTempText[0] = "";
                    mBChange= false;
               
                }else if(!mBChange){
                    mBChange=true;
                   
                }
                return false;
            }
        });       
        mText2.setOnFocusChangeListener(new OnFocusChangeListener() {
              
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                mText2.setCursorVisible(true);
                if (mText1.getText().toString().equals("")){
                    mText2.setSelected(false);
                    mText2.setCursorVisible(false);
                    mText1.requestFocus();
                    mText1.setSelected(true);
                    mText1.setSelection(0);
                }
               
            }
        });
       
       
        /*------------------------------------------------
         *  THIRD BOX
         -------------------------------------------------*/
        mText3.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence s, int start, int before,
                    int count) {
            }

            @Override
            public void beforeTextChanged(CharSequence s, int start, int count,
                    int after) {
            }

            @Override
            public void afterTextChanged(Editable s) {
                if (s.length() > 0) {
                    if (!mConfirmingPinCode){
                        mTempText[2] = mText3.getText().toString();
                    }
                    mText4.requestFocus();
                }
            }
        });
       
        mText3.setOnKeyListener(new OnKeyListener() {

            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                if (keyCode == KeyEvent.KEYCODE_DEL && mBChange) {
                    mText2.requestFocus();
                    if (!mConfirmingPinCode)
                        mTempText[1] = "";
                    mText2.setText("");
                    mBChange= false;
                   
                }else if(!mBChange){
                    mBChange=true;                       
                   
                }
                return false;
            }
        });
       
        mText3.setOnFocusChangeListener(new OnFocusChangeListener() {
           
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                mText3.setCursorVisible(true);
                if (mText1.getText().toString().equals("")){
                    mText3.setSelected(false);
                    mText3.setCursorVisible(false);
                    mText1.requestFocus();
                    mText1.setSelected(true);
                    mText1.setSelection(0);
                }else if (mText2.getText().toString().equals("")){
                    mText3.setSelected(false);
                    mText3.setCursorVisible(false);
                    mText2.requestFocus();
                    mText2.setSelected(true);
                    mText2.setSelection(0);
                }
               
            }
        });
       
        /*------------------------------------------------
         *  FOURTH BOX
         -------------------------------------------------*/
        mText4.addTextChangedListener(new TextWatcher() {

            @Override
            public void onTextChanged(CharSequence s, int start, int before,
                    int count) {
            }
View Full Code Here

Examples of android.text.TextWatcher

        size = (String) getIntent().getExtras().get("size");
       
        //playername       
        EditText spielername = (EditText)findViewById(R.id.editSpielername);
        spielername.setText(name);
        spielername.addTextChangedListener(new TextWatcher() {
     
      public void onTextChanged(CharSequence s, int start, int before, int count) {/* Nothing*/ }
      public void beforeTextChanged(CharSequence s, int start, int count, int after) {/* Nothing*/ }
     
      //after Text is changed
View Full Code Here
TOP
Copyright © 2015 www.androidadb.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.