zoukankan      html  css  js  c++  java
  • Android自定义属性

    找到 “D:eclispe_androideclipse_en_32_4.4sdkplatformsandroid-22data esvalues” Android SDK自带的属性文件,截取一段Android的自定义属性:

        <declare-styleable name="TextView">
            <!-- Determines the minimum type that getText() will return.
                 The default is "normal".
                 Note that EditText and LogTextBox always return Editable,
                 even if you specify something less powerful here. -->
            <attr name="bufferType">
                <!-- Can return any CharSequence, possibly a
                 Spanned one if the source text was Spanned. -->
                <enum name="normal" value="0" />
                <!-- Can only return Spannable. -->
                <enum name="spannable" value="1" />
                <!-- Can only return Spannable and Editable. -->
                <enum name="editable" value="2" />
            </attr>
            <!-- Text to display. -->
            <attr name="text" format="string" localization="suggested" />
            <!-- Hint text to display when the text is empty. -->
            <attr name="hint" format="string" />
            <!-- Text color. -->
            <attr name="textColor" />
            <!-- Color of the text selection highlight. -->
            <attr name="textColorHighlight" />
            <!-- Color of the hint text. -->
            <attr name="textColorHint" />
            <!-- Base text color, typeface, size, and style. -->
            <attr name="textAppearance" />
            <!-- Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp). -->
            <attr name="textSize" />
            <!-- Sets the horizontal scaling factor for the text. -->
            <attr name="textScaleX" format="float" />
            <!-- Typeface (normal, sans, serif, monospace) for the text. -->
            <attr name="typeface" />
            <!-- Style (bold, italic, bolditalic) for the text. -->
            <attr name="textStyle" />
            <!-- Font family (named by string) for the text. -->
            <attr name="fontFamily" />
            <!-- Text color for links. -->
            <attr name="textColorLink" />
            <!-- Makes the cursor visible (the default) or invisible. -->
            <attr name="cursorVisible" format="boolean" />

    其他的还有比如:

        <declare-styleable name="LinearLayout">
            <!-- Should the layout be a column or a row?  Use "horizontal"
                 for a row, "vertical" for a column.  The default is
                 horizontal. -->
            <attr name="orientation" />
            <attr name="gravity" />
            <!-- When set to false, prevents the layout from aligning its children's
                 baselines. This attribute is particularly useful when the children
                 use different values for gravity. The default value is true. -->
            <attr name="baselineAligned" format="boolean" />
            <!-- When a linear layout is part of another layout that is baseline
              aligned, it can specify which of its children to baseline align to
              (that is, which child TextView).-->
            <attr name="baselineAlignedChildIndex" format="integer" min="0"/>
            <!-- Defines the maximum weight sum. If unspecified, the sum is computed
                 by adding the layout_weight of all of the children. This can be
                 used for instance to give a single child 50% of the total available
                 space by giving it a layout_weight of 0.5 and setting the weightSum
                 to 1.0. -->
            <attr name="weightSum" format="float" />
            <!-- When set to true, all children with a weight will be considered having
                 the minimum size of the largest child. If false, all children are
                 measured normally. -->
            <attr name="measureWithLargestChild" format="boolean" />
            <!-- Drawable to use as a vertical divider between buttons. -->
            <attr name="divider" />
            <!-- Setting for which dividers to show. -->
            <attr name="showDividers">
                <flag name="none" value="0" />
                <flag name="beginning" value="1" />
                <flag name="middle" value="2" />
                <flag name="end" value="4" />
            </attr>
            <!-- Size of padding on either end of a divider. -->
            <attr name="dividerPadding" format="dimension" />
        </declare-styleable>
  • 相关阅读:
    ubuntu lvm模式进行扩容
    Kickstart Round G 2018
    AtCoder Regular Contest 102 D
    论文阅读 | Clustrophile 2: Guided Visual Clustering Analysis
    Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) E. Down or Right
    SQL语句报错:Incorrect string value: 'xE9x98xBFxE6x96xAF...'
    SQL语句报错:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near
    WAMP集成环境虚拟路径修改
    L2-025 分而治之(图)
    L2-024 部落(并查集)
  • 原文地址:https://www.cnblogs.com/CVstyle/p/6399203.html
Copyright © 2011-2022 走看看