当前位置: 首页>>代码示例>>Java>>正文


Java EditText.setTransformationMethod方法代码示例

本文整理汇总了Java中android.widget.EditText.setTransformationMethod方法的典型用法代码示例。如果您正苦于以下问题:Java EditText.setTransformationMethod方法的具体用法?Java EditText.setTransformationMethod怎么用?Java EditText.setTransformationMethod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.EditText的用法示例。


在下文中一共展示了EditText.setTransformationMethod方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeViewComponents

import android.widget.EditText; //导入方法依赖的package包/类
private void initializeViewComponents() {
    logInGoogleBtn = (Button) findViewById(R.id.log_in_google_btn);
    logInDefaultBtn = (Button) findViewById(R.id.log_in_default_btn);
    registerBtn = (TextView) findViewById(R.id.register_btn);
    forgotPasswordBtn = (TextView) findViewById(R.id.forgot_password_btn);
    regulations = (TextView) findViewById(R.id.regulations_btn);

    emailText = (EditText) findViewById(R.id.email_login_text);
    emailText.setSelected(false);

    updateRememberedEmail();

    passwordText = (EditText) findViewById(R.id.password_login_text);
    passwordText.setTypeface(Typeface.DEFAULT);
    passwordText.setTransformationMethod(new PasswordTransformationMethod());
    passwordText.setSelected(false);
}
 
开发者ID:lmnpWmi,项目名称:wirtualnaApteczka,代码行数:18,代码来源:LogInActivity.java

示例2: onCreate

import android.widget.EditText; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_registration);

    registerRegulationsBtn = (TextView) findViewById(R.id.register_regulations_btn);
    registerRegulationsBtn.setOnClickListener(new RegulationsOnClickListener());

    registerNewUserBtn = (Button) findViewById(R.id.register_new_user_btn);
    registerNewUserBtn.setOnClickListener(new RegisterNewUserOnClickListener());

    passwordEditText = (EditText) findViewById(R.id.register_password_text);
    passwordEditText.setTypeface(Typeface.DEFAULT);
    passwordEditText.setTransformationMethod(new PasswordTransformationMethod());

    repeatPasswordEditText = (EditText) findViewById(R.id.register_password_repeat_text);
    repeatPasswordEditText.setTypeface(Typeface.DEFAULT);
    repeatPasswordEditText.setTransformationMethod(new PasswordTransformationMethod());
}
 
开发者ID:lmnpWmi,项目名称:wirtualnaApteczka,代码行数:20,代码来源:RegistrationActivity.java

示例3: onCheckedChanged

import android.widget.EditText; //导入方法依赖的package包/类
@Override
public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
    final TransformationMethod transformationMethod = isChecked ? null : PasswordTransformationMethod.getInstance();

    for (final EditText passwordView : passwordViews)
        passwordView.setTransformationMethod(transformationMethod);
}
 
开发者ID:guodroid,项目名称:okwallet,代码行数:8,代码来源:ShowPasswordCheckListener.java

示例4: setupEditText

import android.widget.EditText; //导入方法依赖的package包/类
protected void setupEditText(EditText editText) {
	editText.setInputType(InputType.TYPE_NULL);
	editText.setFilters(filters);
	editText.setOnTouchListener(touchListener);
	editText.setTransformationMethod(PasswordTransformationMethod
			.getInstance());
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:8,代码来源:AppLockActivity.java

示例5: showDialog

import android.widget.EditText; //导入方法依赖的package包/类
private void showDialog(List<EncdroidProviderParameter> questions){
	
	if (questions==null || questions.size()==0) {
       	//if (activity instanceof Fillable){
       		try {
       			//this.init("/");*
       			finishFileProviderInit();
       		} catch (Exception e){
       			e.printStackTrace();
       			String exceptionLabel = e.getMessage();
       			if (exceptionLabel==null) exceptionLabel=e.toString();
       			Toast.makeText(this.getApplicationContext(),exceptionLabel, Toast.LENGTH_LONG).show();
       			//ask again parameters question to the user
       			if (instance.getParamsToAsk()!=null && instance.getParamsToAsk().size()>0){
       				this.showDialog( instance.getParamsToAsk());
       			}
       			return;
       		}
       	//}			
   		//this.ready=true;
  			//((Fillable)activity).launchFillTask();			
		return;
	}
	
    AlertDialog.Builder alert = new AlertDialog.Builder(this);                 
    alert.setTitle(questions.get(0).getTitle());  
    alert.setMessage(questions.get(0).getLabel());
     

     // Set an EditText view to get user input   
     final EditText input = new EditText(this);
     if (questions.get(0).isPassword()) {
    	 input.setTransformationMethod(PasswordTransformationMethod.getInstance());
    	 input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); 
     }
     alert.setView(input);
        alert.setPositiveButton("Ok", new ClickListener(this,instance,input,questions));  
        alert.show();
}
 
开发者ID:starn,项目名称:encdroidMC,代码行数:40,代码来源:FileProviderActivity.java

示例6: onCreate

import android.widget.EditText; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_config_sync);
	

	
	volumeName = (EditText) findViewById(R.id.volumeName);
	//volumeName.setFocusable(false);
	
	volumePath = (EditText) findViewById(R.id.volumePath);
	//volumePath.setFocusable(false);
	
	password = (EditText) findViewById(R.id.volumePassword);
	password.setTransformationMethod(PasswordTransformationMethod.getInstance());
	password.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); 
	
	onlyWifiCheckBox = ((CheckBox) findViewById(R.id.onlyWifi));
	removeAfterCheckBox = ((CheckBox) findViewById(R.id.removeAfter));
	localFolder = ((EditText) findViewById(R.id.localFolder));
	syncID = ((EditText) findViewById(R.id.syncID));
	syncID.setFocusable(false);
	
	
	spin1=(Spinner) findViewById(R.id.selectedRule);
	ArrayAdapter<String> adapter=new ArrayAdapter<String>(ConfigSyncActivity.this, android.R.layout.simple_spinner_item, rules);
	adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
	spin1.setAdapter(adapter);
	spin1.setOnTouchListener(this);
	spin1.setOnItemSelectedListener((OnItemSelectedListener) this);
	
	refresh(null);

	
}
 
开发者ID:starn,项目名称:encdroidMC,代码行数:36,代码来源:ConfigSyncActivity.java

示例7: onCreate

import android.widget.EditText; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    final EditText usernameEditText = (EditText) findViewById(R.id.editText_username);
    final EditText passwordEditText = (EditText) findViewById(R.id.editText_password);
    passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());

    findViewById(R.id.button_login).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(final View v) {
            String username = usernameEditText.getText().toString();
            String password = passwordEditText.getText().toString();
            LoginRequest loginRequest = new LoginRequest(username, password);

            Atom.with(LoginActivity.this)
                    .load("https://reqres.in/api/login")
                    .setJsonPojoBody(loginRequest)
                    .as(LoginResponse.class)
                    .setCallback(new FutureCallback<LoginResponse>() {
                        @Override
                        public void onCompleted(Exception e, LoginResponse result) {
                            if (e != null) {
                                e.printStackTrace();
                            } else if (result.token != null) {
                                Snackbar.make(v, "Pass : " + result.token, Snackbar.LENGTH_LONG).show();
                            } else if (result.error != null) {
                                Snackbar.make(v, "Fail : " + result.error, Snackbar.LENGTH_LONG).show();
                            }
                        }
                    });



        }
    });


}
 
开发者ID:shiburagi,项目名称:Atomic,代码行数:41,代码来源:LoginActivity.java


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