One of the requirements of my code is that an alpha value is used. I want to program my application so that at some point in the future, I can easily change this value.
My understanding is that resources are built specifically for this purpose. Alpha needs to be between 0 and 1.
I wondered if there was a more elegant solution than setting the value to an integer between 1 and 100 in the integer resource folder, then dividing by 100 in the code.
Current code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- choose a value for alpha, it will be divided by 100.
valid values lie between 0 and 100.-->
<item name = "exponential_filter_alpha" format="">9</item>
</resources>
I saw a similar question here: https://stackoverflow.com/a/8780360/1014849 But that required floats, doubles are not available via that method.