I have an apklib which has a dimens.xml in it with some default values, but I want to use some other values based on my use-case. Is there any approach to do this without modifying the source of the library?
You don't have to touch the source code just define the values with same name in your dimens folder. When you use same name, it is always count the overridden
values. I think it will work.
Another approach may work like this way, get the viewgroup/layout
from your library, iterate the ChildView
and change the margin/padding
as your requirements.
late to the party but it will probably useful for other users:
you simply need to override the value in your dimens.xml inside app/src/main/res/layout/
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