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();
}
java类android.text.method.HideReturnsTransformationMethod的实例源码
LoginActivity.java 文件源码
项目:letv
阅读 24
收藏 0
点赞 0
评论 0
EditTextPasswordWithVisibilityToggle.java 文件源码
项目:oversec_crypto
阅读 30
收藏 0
点赞 0
评论 0
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);
}
LoginActivity.java 文件源码
项目:LoginRegisterFramework
阅读 40
收藏 0
点赞 0
评论 0
/**
* 初始化视图
*/
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;
}
});
}
LoginActivity.java 文件源码
项目:A-week-to-develop-android-app-plan
阅读 23
收藏 0
点赞 0
评论 0
/**
* 初始化视图
*/
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;
}
});
}
LoginActivity.java 文件源码
项目:A-week-to-develop-android-app-plan
阅读 24
收藏 0
点赞 0
评论 0
/**
* 初始化视图
*/
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;
}
});
}
SlideView.java 文件源码
项目:qksms
阅读 21
收藏 0
点赞 0
评论 0
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);
}
PasswordEditText.java 文件源码
项目:AndroidUI
阅读 24
收藏 0
点赞 0
评论 0
@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);
}
PasswordEdt.java 文件源码
项目:Nepenthes-Android
阅读 18
收藏 0
点赞 0
评论 0
@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);
}
MainActivity.java 文件源码
项目:AutoAP
阅读 17
收藏 0
点赞 0
评论 0
@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());
}
}
}
Regist3Activity.java 文件源码
项目:GomeOnline
阅读 23
收藏 0
点赞 0
评论 0
@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);
}
}
});
}
SlideView.java 文件源码
项目:sms_DualCard
阅读 20
收藏 0
点赞 0
评论 0
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);
}
SlideView.java 文件源码
项目:android-aosp-mms
阅读 21
收藏 0
点赞 0
评论 0
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);
}
MultiFuncEditText.java 文件源码
项目:MultiFuncViewLibrary
阅读 32
收藏 0
点赞 0
评论 0
/**
* 因为我们不能直接给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);
}
RegisterActivity.java 文件源码
项目:Huochexing12306
阅读 26
收藏 0
点赞 0
评论 0
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();
}
RegisterActivity.java 文件源码
项目:ChenYan
阅读 21
收藏 0
点赞 0
评论 0
@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;
}
ForgetPwdActivity.java 文件源码
项目:ChenYan
阅读 24
收藏 0
点赞 0
评论 0
@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;
}
LoginActivity.java 文件源码
项目:ChenYan
阅读 77
收藏 0
点赞 0
评论 0
@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;
}
LoginEditText.java 文件源码
项目:Coding-Android
阅读 21
收藏 0
点赞 0
评论 0
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());
}
AccountBindActivity.java 文件源码
项目:MyTravelingDiary
阅读 22
收藏 0
点赞 0
评论 0
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());
}
}
});
}
LoginActivity.java 文件源码
项目:MyTravelingDiary
阅读 30
收藏 0
点赞 0
评论 0
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());
}
}
});
}
PayPwdEditText.java 文件源码
项目:PayPwdEditText
阅读 17
收藏 0
点赞 0
评论 0
/**
* 是否显示明文
* @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());
}
}
}
MainActivity.java 文件源码
项目:Pijaret
阅读 19
收藏 0
点赞 0
评论 0
public void showkey() {
//get object
TextView keybox = (TextView) findViewById(R.id.editText2);
//Set InputType
keybox.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
}
PinViewBaseHelper.java 文件源码
项目:nono-android
阅读 22
收藏 0
点赞 0
评论 0
/**
* 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));
}
MdInputHolder.java 文件源码
项目:DialogUtil
阅读 26
收藏 0
点赞 0
评论 0
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());
}
}
}
IosAlertDialogHolder.java 文件源码
项目:DialogUtil
阅读 21
收藏 0
点赞 0
评论 0
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());
}
}
}
ModifyPasswdActivity.java 文件源码
项目:CuiTrip
阅读 17
收藏 0
点赞 0
评论 0
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showActionBar(R.string.ct_modify_pass);
setContentView(R.layout.ct_modify_password);
mOnce = (TextView) findViewById(R.id.ct_passwd_one);
mTwice = (TextView) findViewById(R.id.ct_passwd_twice);
mTwice.setImeOptions(EditorInfo.IME_ACTION_DONE);
mTwice.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
tryModify();
return true;
}
});
((CheckBox) findViewById(R.id.toggle_pw)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
if (checked) {
mOnce.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
mTwice.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
} else {
mOnce.setTransformationMethod(PasswordTransformationMethod.getInstance());
mTwice.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
}
});
}
LoginDialog.java 文件源码
项目:Flucso
阅读 27
收藏 0
点赞 0
评论 0
@Override
protected View onCreateDialogView() {
View view = super.onCreateDialogView();
mUsername = (EditText) view.findViewById(R.id.txt_login_username);
mPassword = (EditText) view.findViewById(R.id.txt_login_remotekey);
CheckBox mShowRKey = (CheckBox) view.findViewById(R.id.chk_login_showremkey);
mShowRKey.setOnCheckedChangeListener(new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
mPassword.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
} else {
mPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
}
});
Button mGoToRKey = (Button) view.findViewById(R.id.btn_login_gotoremkey);
mGoToRKey.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent browse = new Intent(Intent.ACTION_VIEW, Uri.parse("http://friendfeed.com/remotekey"));
v.getContext().startActivity(browse);
}
});
return view;
}
PasswordShow.java 文件源码
项目:commcare-android
阅读 19
收藏 0
点赞 0
评论 0
private void passwordShownState() {
isPasswordVisible = true;
showPasswordButton.setVisibility(View.VISIBLE);
showPasswordButton.setText(hideText);
passwordField.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
passwordField.setSelection(passwordField.getText().length());
}
ManagerUserServices.java 文件源码
项目:logmein-android
阅读 19
收藏 0
点赞 0
评论 0
/**
* Takes care if checked/unchecked box for showing/not showing password
*/
private void show_password() {
if (mChbShowPwd.isChecked()) {
mTextboxPassword.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
return;
}
mTextboxPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
SlideListItemView.java 文件源码
项目:sms_DualCard
阅读 24
收藏 0
点赞 0
评论 0
@Override
protected void onFinishInflate() {
mTextPreview = (TextView) findViewById(R.id.text_preview);
mTextPreview.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
mImagePreview = (ImageView) findViewById(R.id.image_preview);
mAttachmentName = (TextView) findViewById(R.id.attachment_name);
mAttachmentIcon = (ImageView) findViewById(R.id.attachment_icon);
}