I want to change the foreground color of a linearlayout.
This is my code:layout.setForeground(new ColorDrawable(getResources().getColor(R.color.svbackclr)));
But this call require minimum api level 23.So how to do the same on pre 23 api.
As @Gaurav suggested FrameLayout you can use the forground color by programatically in the following way
int color = R.color.black_trans_60;
frm.setForeground(new ColorDrawable(ContextCompat.getColor(mContext, color)));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With