自定义组件

http://www.cnblogs.com/TerryBlog/archive/2010/11/03/1868431.html

 

 

<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <attr name="bottombar_send_pic" format="reference|color" />
    <declare-styleable name="EditTextExt">
        <attr name="Text" format="reference|string"></attr>
        <attr name="Oriental">
            <enum name="Horizontal" value="1"></enum>
            <enum name="Vertical" value="0"></enum>
        </attr>
    </declare-styleable>

    
</resources>

R.id....

 public static final class attr {
        /** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>Horizontal</code></td><td>1</td><td></td></tr>
<tr><td><code>Vertical</code></td><td>0</td><td></td></tr>
</table>
         */
        public static final int Oriental=0x7f010023;
        /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
<p>May be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
         */
        public static final int Text=0x7f010022;

 

  到页面xml

xmlns:terry="http://schemas.android.com/apk/res/com.android.test.login"

 

 

 

 

 

 

 

 

你可能感兴趣的:(android,xml)