I am developing small android application in which I set drawable resource as background for linear layout. Now what I want to do change background color of linear layout dy
The following works great for setting the color of the drawable programmatically without changing its shape:
parentLayout.getBackground().setColorFilter( Color.BLACK, PorterDuff.Mode.SRC_ATOP );