aabhasr1 / OtpView

A custom view to enter otp/pin of different sizes used usually in cases of authentication.
MIT License
382 stars 99 forks source link

[NotAnIssue][HelpWanted] How can i toggle the visibility of the numbers? #56

Closed dunaevigils closed 1 year ago

dunaevigils commented 1 year ago

How can i toggle the visibility of the numbers?

I need to toggle between numbers and bullets, when user do not want to show the numbers in the rectangles.

Thank you

dunaevigils commented 1 year ago

I created a fork and did the following change on OtpTextView

    fun setTypeface(typeface: Typeface?) {
        itemViews?.let { itemViews ->
            for (itemView in itemViews) {
                itemView.textView!!.typeface = typeface
            }
        }
    }

And I set a blank font like the one below.

passwordregular.ttf.zip