其实讲的就是Edittext的setTransmationMethod()方法 。
1.布局文件
<FrameLayout
android:id="@+id/ll_container_et"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="100dp">
<EditText
android:id="@+id/et_login_password"
style="?android:attr/textViewStyle"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center_vert