How to set the drawableRight resource by code?
Sometimes we want to include a small icon inside a Button, how to achieve this? Prepare your PNG file and put it your res/drawable folder along with the other image resources in your application. just like any other view handling - this can be done by Code or by XML. By XML <Button android:id="@+id/buttonId" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:drawableRight="@drawable/timer_red" ...