I\'m currently using this code but the background is not changing.It is still showing accent-color as background.
To set background you need to make your base theme extend
Theme.AppCompat.Light.NoActionBar
and not
Theme.MaterialComponents.Light.NoActionBar