在Android中,如果想要输入密码时显示为星号,您需要在EditText中设置inputType属性为"textPassword"。具体代码如下:
```xml
android:id="@+id/password_edittext" android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textPassword"/> ``` 这样设置后,当用户在这个EditText中输入文本时,文本就会动态地以星号(*)的形式显示出来。