Xml文件  |  129行  |  4.9 KB

<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright (C) 2008 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 -->

<resources>
    <declare-styleable name="Style1">
        <attr name="Type1" format="integer">
            <enum name="type" value="28" />
            <enum name="data" value="0xff00ff00" />
            <enum name="asset_cookie" value="0" />
            <enum name="resource_id" value="0" />
            <enum name="changing_config" value="0" />
        </attr>
        <attr name="Type2" format="integer">
            <enum name="type" value="28" />
            <enum name="data" value="0xff0000ff" />
            <enum name="asset_cookie" value="0" />
            <enum name="resource_id" value="0" />
            <enum name="changing_config" value="0" />
        </attr>
    </declare-styleable>
    <attr name="type1" format="boolean"/>
    <attr name="type2" format="boolean"/>
    <attr name="type3" format="color"/>
    <attr name="type4" format="reference|color"/>
    <attr name="type5" format="dimension"/>
    <attr name="type6" format="dimension"/>
    <attr name="type7" format="dimension"/>
    <attr name="type8" format="reference"/>
    <attr name="type9" format="float"/>
    <attr name="type10" format="fraction"/>
    <attr name="type11" format="integer"/>
    <attr name="type12" format="integer"/>
    <attr name="type13" format="reference|string"/>
    <attr name="type14" format="string"/>
    <attr name="type15" format="reference"/>
    <attr name="type16" format="string"/>
    <declare-styleable name="style1">
        <attr name="type1"/>
        <attr name="type2"/>
        <attr name="type3"/>
        <attr name="type4"/>
        <attr name="type5"/>
        <attr name="type6"/>
        <attr name="type7"/>
        <attr name="type8"/>
        <attr name="type9"/>
        <attr name="type10"/>
        <attr name="type11"/>
        <attr name="type12"/>
        <attr name="type13"/>
        <attr name="type14"/>
        <attr name="type15"/>
        <attr name="type16"/>
    </declare-styleable>
    <attr name="testEnum">
        <enum name="val1" value="1" />
        <enum name="val2" value="2" />
        <enum name="val10" value="10" />
    </attr>
    <attr name="testFlags">
        <flag name="bit1" value="0x1" />
        <flag name="bit2" value="0x2" />
        <flag name="bit31" value="0x40000000" />
    </attr>
    <attr name="testString" format="string" />
    <declare-styleable name="EnumStyle">
        <attr name="testEnum" />
    </declare-styleable>
    <declare-styleable name="FlagStyle">
        <attr name="testFlags" />
    </declare-styleable>
    <declare-styleable name="TestConfig">
        <attr name="testString" />
    </declare-styleable>
    <!-- Size of text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp).
         Supported values include the following:<p/>
    <ul>
        <li><b>px</b> Pixels</li>
        <li><b>sp</b> Scaled pixels (scaled to relative pixel size on screen). See {@link android.util.DisplayMetrics} for more information.</li>
        <li><b>pt</b> Points</li>
        <li><b>dip</b> Device independent pixels. See {@link android.util.DisplayMetrics} for more information.</li>
    </ul>
    -->
    <attr name="textSize" format="dimension" />
    <attr name="typeface">
        <enum name="normal" value="0" />
        <enum name="sans" value="1" />
        <enum name="serif" value="2" />
        <enum name="monospace" value="3" />
    </attr>
    <!-- Default text typeface style. -->
    <attr name="textStyle">
        <flag name="normal" value="0" />
        <flag name="bold" value="1" />
        <flag name="italic" value="2" />
    </attr>
    <!-- Color of text (usually same as colorForeground). -->
    <attr name="textColor" format="reference|color" />
    <!-- Color of highlighted text. -->
    <attr name="textColorHighlight" format="reference|color" />
    <!-- Color of hint text (displayed when the field is empty). -->
    <attr name="textColorHint" format="reference|color" />
    <!-- Color of link text (URLs). -->
    <attr name="textColorLink" format="reference|color" />
    <declare-styleable name="TextAppearance">
        <attr name="textColor"/>
        <attr name="textSize"/>
        <attr name="textStyle"/>
        <attr name="typeface"/>
        <attr name="textColorHighlight"/>
        <attr name="textColorHint"/>
        <attr name="textColorLink"/>
    </declare-styleable>
</resources>