private void setBackground ( boolean filled ) { if ( filled ) { final int background = styledAttributes . getResourceId ( R . styleable . PinLock_statusFilledBackground , R . drawable . dot_filled ) ; setBackgroundResource ( background ) ; } else { final int background = styledAttributes . getResourceId ( R . styleable . PinLock_statusEmptyBackground , R . drawable . dot_empty ) ; setBackgroundResource ( background ) ; } }
Setting up background for the view . Should pass shapes for both filled and empty dots . Otherwise will use the default backgrounds