'android declare-styleable attr format like an alias

in some attrs.xml

    <declare-styleable name="ListItemDescNavigation">
        <attr name="descGravity" format="I want refer format from android:gravity"/>
    </declare-styleable>

I don't want decleare the android:gravity agiain. Like this:

<declare-styleable name="ListItemDescNavigation">
   <attr name="descGravity">
<!-- value from andriod:gravity --->
        <flag name="top" value="0x30" />
        <!-- Push object to the bottom of its container, not changing its size. -->
        <flag name="bottom" value="0x50" />
<-- ... have some more like abvoe -->

   </attr>
</declare-styleable>

How can I declare descGravity like an alias of android:gravity...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source