如何使用手机输入和隐藏字符串的功能获取Edittext.我知道
android:inputType="textPassword"
Run Code Online (Sandbox Code Playgroud)
隐藏字符串,而
android:inputType="phone"
Run Code Online (Sandbox Code Playgroud)
打开拨号盘界面.
如何将两者结合起来?
我有以下内容:
<EditText
android:inputType="number"
android:password="true"
....
</EditText>
Run Code Online (Sandbox Code Playgroud)
我收到一条警告,"android:password"已被弃用,我应该使用inputType.有没有办法将inputType指定为数字和密码?
我想使用AlertDialog作为登录或密码或密码对话框.这是我的代码 -
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Login");
alert.setMessage("Enter Pin :");
// Set an EditText view to get user input
final EditText input = new EditText(this);
alert.setView(input);
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
String value = input.getText().toString();
Log.d( TAG, "Pin Value : " + value);
return;
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
return;
}
});
alert.show();
Run Code Online (Sandbox Code Playgroud)
如何编码所有输入文本将显示为'***' - 星号
虽然它显示为星号,但我无法得到我的密码.我的代码如下
private void accessPinCode_2() …Run Code Online (Sandbox Code Playgroud)