Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input type number not working in android 9 api 28 #32

Open
hafiz013 opened this issue Apr 13, 2019 · 2 comments
Open

Input type number not working in android 9 api 28 #32

hafiz013 opened this issue Apr 13, 2019 · 2 comments

Comments

@hafiz013
Copy link

below here sample code input type number but in keyboard still has text

<com.goodiebag.pinview.Pinview android:id="@+id/pinview1" android:layout_width="0dp" android:layout_height="wrap_content" android:background="@drawable/bg_tag_rect" android:layout_marginLeft="35dp" android:layout_marginRight="35dp" android:layout_marginTop="20dp" app:cursorVisible="false" app:hint="" app:pinBackground="@drawable/bg_box_tag" app:inputType="number" app:forceKeyboard="true" app:password="false" app:pinHeight="28dp" app:pinLength="6" app:pinWidth="28dp" app:layout_constraintTop_toBottomOf="@+id/lbl2" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"/>

Android 9 api 28 honor 8 pro

@nihar89
Copy link

nihar89 commented Sep 7, 2019

@hafiz013 did you get the solution of this?

@0x384c0
Copy link

0x384c0 commented Sep 20, 2019

My solution was:
disabling forceKeyboard
app:forceKeyboard="true"

Then focusing pinView manually

val view = pinView.requestPinEntryFocus() as? EditText
Handler().postDelayed({
        if (view.requestFocus()) {
            val imm = context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager?
            imm?.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT)
        }
    }, 500)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants