-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
Description
Some attributes like i.e. barThickness
are not accepting dimentions ("dp") values, just raw values. This is bad and unnecesary, and can be easily corrected by fixing faulty definition of the attributes. Instead of
<attr name="barThickness" format="integer"/>
it should rather be
<attr name="barThickness" format="dimension"/>
or even better
<attr name="barThickness" format="dimension|reference"/>
The same for majority of other attributes. All of then should be extended by adding |reference
. As this is small change I do not bother doing PR, but imho attr.xml
should be looking like this:
<resources>
<declare-styleable name="MaterialScrollBar">
<attr name="recyclerView" format="reference"/>
<attr name="lightOnTouch" format="boolean|reference"/>
<attr name="handleColour" format="color|reference"/>
<attr name="barColour" format="color|reference"/>
<attr name="handleOffColour" format="color|reference"/>
<attr name="textColour" format="color|reference"/>
<attr name="barThickness" format="dimension|reference"/>
</declare-styleable>
<declare-styleable name="TouchScrollBar">
<attr name="hideDelayInMilliseconds" format="integer|reference"/>
<attr name="autoHide" format="boolean|reference"/>
</declare-styleable>
</resources>