mukeshsolanki / android-otpview-pinview

A custom view to enter otp of different sizes used usually in cases of authentication.
MIT License
707 stars 207 forks source link

Can't change the itemBackground programmatically #86

Closed whkumar closed 4 years ago

whkumar commented 4 years ago

Subject of the issue

Can't change the itemBackground

Steps to reproduce

otpView.setItemBackgroundResources(R.drawable.new_background).

Expected behaviour

Item background should change

Actual behaviour

Nothing happens

mukeshsolanki commented 4 years ago

@whkumar you can do this by using otpView.setItemBackground(ResourcesCompat.getDrawable(getResources(),R.drawable.test_drawable,null));