Design + Code an Android App from Scratch
This video shows you how to toggle the compound drawables when it is in a pressed state vs. normal state. We use a layer list drawable for the increment and decrement button in any state. There are two separate layer list drawables for each state: normal and pressed. After detecting whether the top or bottom button is pressed, we use the setCompoundDrawablesWithIntrinsicBounds method to change the drawable for that button corresponding to the desired state.