I'm developing custom views for android, they are using gravity attributes but with different name for example hintGravity
currently in attrs.xml I copied below code and it works correctly:
<attr name="hintGravity">
<flag name="top" value="0x30"/>
<flag name="bottom" value="0x50"/>
<flag name="left" value="0x03"/>
<flag name="right" value="0x05"/>
<flag name="center_vertical" value="0x10"/>
<flag name="fill_vertical" value="0x70"/>
<flag name="center_horizontal" value="0x01"/>
<flag name="fill_horizontal" value="0x07"/>
<flag name="center" value="0x11"/>
<flag name="fill" value="0x77"/>
<flag name="clip_vertical" value="0x80"/>
<flag name="clip_horizontal" value="0x08"/>
<flag name="start" value="0x00800003"/>
<flag name="end" value="0x00800005"/>
</attr>
I need to use them with different names also such as dateHeaderTextGravity
Is there any way to DO NOT define flag values again and again?
User contributions licensed under CC BY-SA 3.0