0

Is there a way to outsource values for xml sheets with a custom resource file holding floats/integers? It's a huge pain manually tweaking things such as stroke values for a mass amount of vector elements.

Example:

android:strokeWidth="@custom_resource/stroke_size"

As opposed to hard coding the same value every time like so:

android:strokeWidth="0.1"

2
  • 1
    Check this if it helps. stackoverflow.com/a/19297523/11855654 Commented May 23, 2021 at 5:08
  • This is a bit different from my problem since it's strictly XML related and not being done programmatically. I'm trying to see if there is way to replicate the functionality of using "@color/name" or a similar way of referencing values strictly between XML files. Even if I could generate the vector programmatically, it would defeat the entire point of what I want to accomplish. Commented May 23, 2021 at 5:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.