• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java HideReturnsTransformationMethod类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中android.text.method.HideReturnsTransformationMethod的典型用法代码示例。如果您正苦于以下问题:Java HideReturnsTransformationMethod类的具体用法?Java HideReturnsTransformationMethod怎么用?Java HideReturnsTransformationMethod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HideReturnsTransformationMethod类属于android.text.method包,在下文中一共展示了HideReturnsTransformationMethod类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: beautyView

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void beautyView() {
    beautyEditText(this.mInputAccount, L10NString.getString("umgr_please_input_username"), this.mAccountTextWatcher);
    beautyCleanButton(this.mClearInputAccount, this);
    this.mInputAccountLayout.setOnClickListener(this);
    beautyCleanButton(this.mClearInputPassword, this);
    this.mInputPassword.setOnClickListener(this);
    beautyEditText(this.mInputPassword, L10NString.getString("umgr_please_input_password"), this.mPasswordTextWatcher);
    beautyColorTextView(this.mRegister, "#007dc4", false, L10NString.getString("umgr_whether_register_ornot"), this);
    beautyColorTextView(this.mFindpwd, "#007dc4", false, L10NString.getString("umgr_whether_forget_password"), this);
    beautyColorTextView(this.mSwitchAccount, "#007dc4", false, L10NString.getString("umgr_third_login_qihoo_tip"), this);
    beautyButtonGreen(this.mLogin, L10NString.getString("umgr_login"), this);
    beautyTextView(this.mAgreeClause1, L10NString.getString("umgr_login_agree_clause_1"));
    beautyTextView(this.mAgreeClauseUser, L10NString.getString("umgr_agree_clause_2_user"));
    beautyColorTextView(this.mAgreement, "#0099e5", true, L10NString.getString("umgr_agree_clause_2_agreement"), this);
    beautyTextView(this.mAnd, L10NString.getString("umgr_agree_clause_2_and"));
    beautyColorTextView(this.mPrivacy, "#0099e5", true, L10NString.getString("umgr_agree_clause_2_privacy"), this);
    beautyCheckButton(this.mShowPwd, new OnCheckedChangeListener() {
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            LoginActivity.this.mInputPassword.setTransformationMethod(LoginActivity.this.mShowPwd.isChecked() ? HideReturnsTransformationMethod.getInstance() : PasswordTransformationMethod.getInstance());
        }
    });
    loadPrivateConfig();
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:24,代码来源:LoginActivity.java


示例2: updatePasswordVisibility

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void updatePasswordVisibility() {

        if (mPasswordVisible) {
            setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        } else {
            setTransformationMethod(PasswordTransformationMethod.getInstance());
        }


        Drawable drawable = ContextCompat.getDrawable(getContext(),R.drawable.ic_remove_red_eye_black_18dp);
        Drawable wrap = DrawableCompat.wrap(drawable);
        if (mPasswordVisible) {

            DrawableCompat.setTint(wrap, ContextCompat.getColor(getContext(), R.color.colorPrimary));
            DrawableCompat.setTintMode(wrap, PorterDuff.Mode.SRC_IN);
            wrap = wrap.mutate();
        } else {
            DrawableCompat.setTint(wrap, Color.BLACK);
            DrawableCompat.setTintMode(wrap, PorterDuff.Mode.SRC_IN);
            wrap = wrap.mutate();
        }
        setCompoundDrawablesWithIntrinsicBounds(null, null, wrap, null);
        setCompoundDrawablePadding(10);
    }
 
开发者ID:oversecio,项目名称:oversec_crypto,代码行数:25,代码来源:EditTextPasswordWithVisibilityToggle.java


示例3: initViews

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
/**
 * 初始化视图
 */
private void initViews() {
    accountEdit = (CleanEditText) this.findViewById(R.id.et_email_phone);
    accountEdit.setImeOptions(EditorInfo.IME_ACTION_NEXT);
    accountEdit.setTransformationMethod(HideReturnsTransformationMethod
            .getInstance());
    passwordEdit = (CleanEditText) this.findViewById(R.id.et_password);
    passwordEdit.setImeOptions(EditorInfo.IME_ACTION_DONE);
    passwordEdit.setImeOptions(EditorInfo.IME_ACTION_GO);
    passwordEdit.setTransformationMethod(PasswordTransformationMethod
            .getInstance());
    passwordEdit.setOnEditorActionListener(new TextView.OnEditorActionListener() {

        @Override
        public boolean onEditorAction(TextView v, int actionId,
                                      KeyEvent event) {
            if (actionId == EditorInfo.IME_ACTION_DONE
                    || actionId == EditorInfo.IME_ACTION_GO) {
                clickLogin();
            }
            return false;
        }
    });
}
 
开发者ID:shenhuanet,项目名称:LoginRegisterFramework,代码行数:27,代码来源:LoginActivity.java


示例4: setText

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
public void setText(String name, String text) {
    if (!mConformanceMode) {
        if (null == mScrollText) {
            mScrollText = new ScrollView(mContext);
            mScrollText.setScrollBarStyle(SCROLLBARS_OUTSIDE_INSET);
            addView(mScrollText, new LayoutParams(
                    LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0, 0));
            if (DEBUG) {
                mScrollText.setBackgroundColor(0xFF00FF00);
            }
        }
        if (null == mTextView) {
            mTextView = new TextView(mContext);
            mTextView.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            mScrollText.addView(mTextView);
        }
        mScrollText.requestFocus();
    }
    mTextView.setVisibility(View.VISIBLE);
    mTextView.setText(text);
    // Let the text in Mms can be selected.
    mTextView.setTextIsSelectable(true);
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:24,代码来源:SlideView.java


示例5: onTouchEvent

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_UP) {
        boolean touchable = ( getWidth() - mWidth - Interval < event.getX() ) && (event.getX() < getWidth() - Interval);
        if (touchable) {
            isVisible = !isVisible;
            if (isVisible){
                //设置EditText文本为可见的
                setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            }else{
                //设置EditText文本为隐藏的
                setTransformationMethod(PasswordTransformationMethod.getInstance());
            }
        }
    }
    return super.onTouchEvent(event);
}
 
开发者ID:tyzlmjj,项目名称:AndroidUI,代码行数:18,代码来源:PasswordEditText.java


示例6: onTouchEvent

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
    final int lens = this.getText().toString().length();
    switch (event.getAction()) {
        case MotionEvent.ACTION_DOWN: {
            boolean isClean = (event.getX() > (getWidth() - getTotalPaddingRight())) && (event.getX() < (getWidth() - getPaddingRight()));
            if (isClean) {
                this.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
                setSelection(lens);
            }
        }
        break;
        case MotionEvent.ACTION_UP: {
            this.setTransformationMethod(PasswordTransformationMethod.getInstance());
            setSelection(lens);
        }
        break;
        default:
            break;
    }
    return super.onTouchEvent(event);
}
 
开发者ID:qbeenslee,项目名称:Nepenthes-Android,代码行数:23,代码来源:PasswordEdt.java


示例7: onCheckedChanged

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    switch (buttonView.getId()) {
        case R.id.ap_button:
            if (isChecked) {
                //Turn on AP
                enableAP();
            } else {
                //Turn off AP
                disableAP();
            }
            break;
        case R.id.checkBox:
            if (!isChecked) {
                passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
            } else {
                passwordEditText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            }
    }
}
 
开发者ID:hoang8f,项目名称:AutoAP,代码行数:21,代码来源:MainActivity.java


示例8: init

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
@AfterViews
	protected void init() {
		setTitle(R.string.regist3);
//		phone="11112345685";
		passwdCheck.setOnCheckedChangeListener(new OnCheckedChangeListener() {
			@Override
			public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
				if(isChecked){
//					mEditTextPw.setInputType(InputType.TYPE_TEXT_VARIATION_NORMAL);
					mEditTextPw.setTransformationMethod(HideReturnsTransformationMethod.getInstance());  
					mEditTextPw.setSelection(mEditTextPw.getText().length());
				}else{
					mEditTextPw.setTransformationMethod(PasswordTransformationMethod.getInstance());  
					mEditTextPw.setSelection(mEditTextPw.getText().length());
//					mEditTextPw.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
				}
			}
		});
	}
 
开发者ID:simplelifetian,项目名称:GomeOnline,代码行数:20,代码来源:Regist3Activity.java


示例9: setText

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
public void setText(String name, String text) {
    if (!mConformanceMode) {
        if (null == mScrollText) {
            mScrollText = new ScrollView(mContext);
            mScrollText.setScrollBarStyle(SCROLLBARS_OUTSIDE_INSET);
            addView(mScrollText, new LayoutParams(
                    LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 0, 0));
            if (DEBUG) {
                mScrollText.setBackgroundColor(0xFF00FF00);
            }
        }
        if (null == mTextView) {
            mTextView = new TextView(mContext);
            mTextView.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            mScrollText.addView(mTextView);
        }
        mScrollText.requestFocus();
    }
    mTextView.setVisibility(View.VISIBLE);
    mTextView.setText(text);
}
 
开发者ID:CommonQ,项目名称:sms_DualCard,代码行数:22,代码来源:SlideView.java


示例10: onTouchEvent

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
/**
 * 因为我们不能直接给EditText设置点击事件,所以我们用记住我们按下的位置来模拟点击事件
 * 当我们按下的位置在 EditText的宽度 - 图标到控件右侧的间距 - 图标的宽度 和
 * EditText的宽度 - 图标到控件右侧的间距 之间我们就算点击了图标,竖直方向没有考虑
 * @param event
 * @return
 */
@Override
public boolean onTouchEvent(MotionEvent event) {
    if(event.getAction() == MotionEvent.ACTION_UP){
        if(getCompoundDrawables()[2] != null){
            boolean isTouched = event.getX() > (getWidth() - getTotalPaddingRight())
                    && (event.getX() < (getWidth() - getPaddingLeft()));
            if(isTouched){
                if(mRightClickListener == null){
                    if(funcType == TYPE_CAN_CLEAR){
                        this.setText("");
                    }else if(funcType == TYPE_CAN_WATCH_PWD){
                        if(eyeOpen){
                            //变为密文,TYPE_CLASS_TEXT 和 TYPE_TEXT_VARIATION_PASSWORD 必须一起使用
                            this.setTransformationMethod(PasswordTransformationMethod.getInstance());
                            eyeOpen = false;
                        }else{
                            //变为明文
                            this.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
                            eyeOpen = true;
                        }
                        switchWatchPwdIcon();
                    }
                }else {
                    //如果没有则回调
                    mRightClickListener.onClick(this);
                }
            }
        }
    }
    return super.onTouchEvent(event);
}
 
开发者ID:jianjun0425,项目名称:MultiFuncViewLibrary,代码行数:39,代码来源:MultiFuncEditText.java


示例11: setPwdVisible

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void setPwdVisible(boolean b) {
	if (!b){
		ivEye.setBackgroundResource(R.drawable.eye_close);
		ivEye.setTag(false);
		etPwd.setTransformationMethod(PasswordTransformationMethod.getInstance());
	}else{
		ivEye.setBackgroundResource(R.drawable.eye_open);
		ivEye.setTag(true);
		etPwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
	}
	etPwd.invalidate();
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:13,代码来源:RegisterActivity.java


示例12: showPwd

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
@OnClick(R.id.iv_pwd)
    public void showPwd() {
//        明文显示
        if (isShow) {
            etPwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            ivPwd.setImageResource(R.drawable.ic_visibility_blue_500_24dp);
        } else {
//         密码显示
            etPwd.setTransformationMethod(PasswordTransformationMethod.getInstance());
            ivPwd.setImageResource(R.drawable.ic_visibility_off_grey_500_24dp);
        }
        isShow = !isShow;
    }
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:14,代码来源:RegisterActivity.java


示例13: togglePassword

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void togglePassword() {
    showPassword = !showPassword;

    if (showPassword) {
        imageValidfy.setImageResource(R.drawable.ic_password_show);
        editText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
    } else {
        imageValidfy.setImageResource(R.drawable.ic_password_normal);
        editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
    }

    editText.setSelection(editText.length());
}
 
开发者ID:huang303513,项目名称:Coding-Android,代码行数:14,代码来源:LoginEditText.java


示例14: initListener

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void initListener() {
    mainLayout.setOnSoftKeyboardVisibilityChangeListener(
            new SoftKeyboardHandledLinearLayout.SoftKeyboardVisibilityChangeListener() {
                @Override
                public void onSoftKeyboardShow() {
                    avatarLayout.setVisibility(View.GONE);
                    listenerSoftInput();
                }

                @Override
                public void onSoftKeyboardHide() {
                    avatarLayout.setVisibility(View.VISIBLE);
                    listenerSoftInput();
                }
            });

    mShow.setOnToggleChanged(new SwitchButton.OnToggleChanged() {
        @Override
        public void onToggle(boolean isChecked) {
            if (isChecked) {
                //如果选中,显示密码
                mPasswordEditText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            } else {
                //否则隐藏密码
                mPasswordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
            }
        }
    });
}
 
开发者ID:LegendKe,项目名称:MyTravelingDiary,代码行数:30,代码来源:AccountBindActivity.java


示例15: initListener

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void initListener() {
    mainLayout.setOnSoftKeyboardVisibilityChangeListener(
            new SoftKeyboardHandledLinearLayout.SoftKeyboardVisibilityChangeListener() {
                @Override
                public void onSoftKeyboardShow() {
                    avatarLayout.setVisibility(View.GONE);
                    bottomLayout.setVisibility(View.VISIBLE);
                    listenerSoftInput();
                }

                @Override
                public void onSoftKeyboardHide() {
                    avatarLayout.setVisibility(View.VISIBLE);
                    bottomLayout.setVisibility(View.VISIBLE);
                    listenerSoftInput();
                }
            });

    mShow.setOnToggleChanged(new SwitchButton.OnToggleChanged() {
        @Override
        public void onToggle(boolean isChecked) {
            if (isChecked) {
                //如果选中,显示密码
                mPasswordEditText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            } else {
                //否则隐藏密码
                mPasswordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
            }
        }
    });
}
 
开发者ID:LegendKe,项目名称:MyTravelingDiary,代码行数:32,代码来源:LoginActivity.java


示例16: setShowPwd

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
/**
 * 是否显示明文
 * @param showPwd
 */
public void setShowPwd(boolean showPwd) {
    int length = textViews.length;
    for(int i = 0; i < length; i++) {
        if (showPwd) {
            textViews[i].setTransformationMethod(PasswordTransformationMethod.getInstance());
        } else {
            textViews[i].setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        }
    }
}
 
开发者ID:wanliyang1990,项目名称:PayPwdEditText,代码行数:15,代码来源:PayPwdEditText.java


示例17: showkey

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
public void showkey() {
    //get object
    TextView keybox = (TextView) findViewById(R.id.editText2);

    //Set InputType
    keybox.setTransformationMethod(HideReturnsTransformationMethod.getInstance());

}
 
开发者ID:MrFlyingToasterman,项目名称:Pijaret,代码行数:9,代码来源:MainActivity.java


示例18: setStylePinBox

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
/**
 * Set a PinBox with all attributes
 *
 * @param editText to set attributes
 */
private void setStylePinBox(EditText editText) {
    editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mNumberCharacters)});

    if (mMaskPassword) {
        editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
    }
    else{
        editText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
    }

    if (mNativePinBox) {
        if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
            //noinspection deprecation
            editText.setBackgroundDrawable(new EditText(getContext()).getBackground());
        } else {
            editText.setBackground(new EditText(getContext()).getBackground());
        }
    } else {
        editText.setBackgroundResource(mCustomDrawablePinBox);
    }

    if (mColorTextPinBoxes != PinViewSettings.DEFAULT_TEXT_COLOR_PIN_BOX) {
        editText.setTextColor(mColorTextPinBoxes);
    }
    editText.setTextSize(PinViewUtils.convertPixelToDp(getContext(), mTextSizePinBoxes));
}
 
开发者ID:tianyuan168326,项目名称:nono-android,代码行数:32,代码来源:PinViewBaseHelper.java


示例19: setInputStyle

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void setInputStyle(Context context, ConfigBean bean) {
    if (TextUtils.isEmpty(bean.hint1)) {
        et1.setVisibility(View.GONE);
    } else {
        bean.setNeedSoftKeyboard(true);

        et1.setVisibility(View.VISIBLE);
        et1.setHint(bean.hint1);

        et1.setTextColor(Tool.getColor(et1.getContext(), bean.inputTxtColor));
        et1.setTextSize(bean.inputTxtSize);

    }

    if (TextUtils.isEmpty(bean.hint2)) {
        et2.setVisibility(View.GONE);
    } else {
        bean.setNeedSoftKeyboard(true);
        et2.setVisibility(View.VISIBLE);
        et2.setHint(bean.hint2);
        et2.setTextColor(Tool.getColor(et2.getContext(), bean.inputTxtColor));
        et2.setTextSize(bean.inputTxtSize);
        if (bean.isInput2HideAsPassword) {
            //设置EditText文本为可见的
            et2.setTransformationMethod(PasswordTransformationMethod.getInstance());
        } else {
            //设置EditText文本为隐藏的
            et2.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        }
    }
}
 
开发者ID:hss01248,项目名称:DialogUtil,代码行数:32,代码来源:MdInputHolder.java


示例20: setInputStyle

import android.text.method.HideReturnsTransformationMethod; //导入依赖的package包/类
private void setInputStyle(Context context, ConfigBean bean) {
    if (TextUtils.isEmpty(bean.hint1)) {
        et1.setVisibility(View.GONE);
    } else {
        bean.setNeedSoftKeyboard(true);
        LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) sv.getLayoutParams();
        params.height = LinearLayout.LayoutParams.WRAP_CONTENT;
        params.weight = 0;
        sv.setLayoutParams(params);
        et1.setVisibility(View.VISIBLE);
        et1.setHint(bean.hint1);

        et1.setTextColor(Tool.getColor(et1.getContext(),bean.inputTxtColor));
        et1.setTextSize(bean.inputTxtSize);

    }

    if (TextUtils.isEmpty(bean.hint2)) {
        et2.setVisibility(View.GONE);
    } else {
        bean.setNeedSoftKeyboard(true);
        et2.setVisibility(View.VISIBLE);
        et2.setHint(bean.hint2);
        et2.setTextColor(Tool.getColor(et2.getContext(),bean.inputTxtColor));
        et2.setTextSize(bean.inputTxtSize);
        if (bean.isInput2HideAsPassword) {
            //设置EditText文本为可见的
            et2.setTransformationMethod(PasswordTransformationMethod.getInstance());
        } else {
            //设置EditText文本为隐藏的
            et2.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        }
    }
}
 
开发者ID:hss01248,项目名称:DialogUtil,代码行数:35,代码来源:IosAlertDialogHolder.java



注:本文中的android.text.method.HideReturnsTransformationMethod类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ScrollableResults类代码示例发布时间:2022-05-21
下一篇:
Java DHCPOptionCode类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap