setBackgroundDrawable can easily be replaced by setDrawable see documentation here.Understanding deprecated in Android4044Nilesh DeokarMayank Mohan UpadhyayFollowAug 23, 2017 · 1 min readForgot to add link? :)