简体   繁体   中英

Android 8.0 Oreo InputType numberPassword not working - visible

I've got some issue which is kind of weird.

There's an EditText with android:inputType="numberPassword" but I can input also numbers and characters. Also whole text is visible and not marked by "•••".

Does anyone have the same issue? It was reported by user in Google Play Store and it also occurs in Android 8.0.0 emulator system. It doesn't occur on my OnePlus 5T also with Oreo 8.0.0 (OxygenOS 5.0.3) .

Any ideas?

UPDATE The solution is changing device security options "show password" to OFF.

android:inputType="numberPassword"

OR

android:inputType="textPassword"

Both will working fine.

May be you have older version of some components, make sure you have newer ones.

<android.support.design.widget.TextInputLayout
        android:layout_width="273dp"
        android:layout_height="59dp"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.507"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.667"
        tools:ignore="MissingConstraints">

        <EditText
            android:id="@+id/idGetPsw"
            android:layout_width="301dp"
            android:layout_height="43dp"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:ems="10"
            android:hint="@string/password"
            android:inputType="textPassword"
            android:textColorLink="#FF3649AE"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.507"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/idGetEmail"
            app:layout_constraintVertical_bias="0.052"
            tools:ignore="NotSibling" />


    </android.support.design.widget.TextInputLayout>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM