Home | History | Annotate | Download | only in values
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3     Copyright (C) 2015 The Android Open Source Project
      4 
      5     Licensed under the Apache License, Version 2.0 (the "License");
      6     you may not use this file except in compliance with the License.
      7     You may obtain a copy of the License at
      8 
      9          http://www.apache.org/licenses/LICENSE-2.0
     10 
     11     Unless required by applicable law or agreed to in writing, software
     12     distributed under the License is distributed on an "AS IS" BASIS,
     13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14     See the License for the specific language governing permissions and
     15     limitations under the License
     16     -->
     17 
     18 <resources>
     19     <declare-styleable name="PreferenceTheme">
     20 
     21         <!-- =================== -->
     22         <!-- Preference styles   -->
     23         <!-- =================== -->
     24         <eat-comment />
     25 
     26         <!-- Theme for inflating Preference objects -->
     27         <attr name="preferenceTheme" format="reference" />
     28 
     29         <!-- Default style for PreferenceScreen. -->
     30         <attr name="preferenceScreenStyle" format="reference" />
     31         <!-- Default style for the PreferenceActivity. -->
     32         <attr name="preferenceActivityStyle" format="reference" />
     33         <!-- Default style for Headers pane in PreferenceActivity. -->
     34         <attr name="preferenceFragmentStyle" format="reference" />
     35         <!-- Default style for Headers pane in PreferenceActivity. -->
     36         <attr name="preferenceFragmentCompatStyle" format="reference" />
     37         <!-- Default style for PreferenceCategory. -->
     38         <attr name="preferenceCategoryStyle" format="reference" />
     39         <!-- Default style for Preference. -->
     40         <attr name="preferenceStyle" format="reference" />
     41         <!-- Default style for informational Preference. -->
     42         <attr name="preferenceInformationStyle" format="reference" />
     43         <!-- Default style for CheckBoxPreference. -->
     44         <attr name="checkBoxPreferenceStyle" format="reference" />
     45         <!-- Default style for YesNoPreference. -->
     46         <attr name="yesNoPreferenceStyle" format="reference" />
     47         <!-- Default style for DialogPreference. -->
     48         <attr name="dialogPreferenceStyle" format="reference" />
     49         <!-- Default style for EditTextPreference. -->
     50         <attr name="editTextPreferenceStyle" format="reference" />
     51         <!-- Default style for RingtonePreference. -->
     52         <attr name="ringtonePreferenceStyle" format="reference" />
     53         <!-- Default style for DropDownPreference. -->
     54         <attr name="dropdownPreferenceStyle" format="reference" />
     55         <!-- The preference layout that has the child/tabbed effect. -->
     56         <attr name="preferenceLayoutChild" format="reference" />
     57         <!-- Preference panel style -->
     58         <attr name="preferencePanelStyle" format="reference" />
     59         <!-- Preference headers panel style -->
     60         <attr name="preferenceHeaderPanelStyle" format="reference" />
     61         <!-- Preference list style -->
     62         <attr name="preferenceListStyle" format="reference" />
     63         <!-- Preference fragment list style -->
     64         <attr name="preferenceFragmentListStyle" format="reference" />
     65         <!-- Preference fragment padding side -->
     66         <attr name="preferenceFragmentPaddingSide" format="dimension" />
     67         <!-- Default style for switch preferences. -->
     68         <attr name="switchPreferenceStyle" format="reference" />
     69         <!-- Default style for switch compat preferences. -->
     70         <attr name="switchPreferenceCompatStyle" format="reference" />
     71         <!-- Default style for seekbar preferences. -->
     72         <attr name="seekBarPreferenceStyle" format="reference" />
     73     </declare-styleable>
     74 
     75     <!-- Base attributes available to PreferenceFragment. -->
     76     <declare-styleable name="PreferenceFragmentCompat">
     77         <!-- The layout for the PreferenceFragment. This should rarely need to be changed. -->
     78         <attr name="android:layout" />
     79         <!-- List separator to draw between preference views -->
     80         <attr name="android:divider" />
     81         <!-- List separator height -->
     82         <attr name="android:dividerHeight" />
     83         <!-- Whether a divider is allowed to draw after the last item -->
     84         <attr name="allowDividerAfterLastItem" format="boolean" />
     85     </declare-styleable>
     86 
     87     <!-- Base attributes available to PreferenceGroup. -->
     88     <declare-styleable name="PreferenceGroup">
     89         <!-- Whether to order the Preference under this group as they appear in the XML file.
     90              If this is false, the ordering will follow the Preference order attribute and
     91              default to alphabetic for those without the order attribute. -->
     92         <attr name="orderingFromXml" format="boolean" />
     93         <attr name="android:orderingFromXml" />
     94         <!-- The maximal number of children that are shown when the preference group is launched
     95              where the rest of the children will be hidden. If some children are hidden an expand
     96              button will be provided to show all the hidden children.
     97              Any child in any level of the hierarchy that is also a preference group (e.g.
     98              preference category) will not be counted towards the limit. But instead the children of
     99              such group will be counted.
    100              By default, all children will be shown, so the default value of this attribute is equal
    101              to Integer.MAX_VALUE.
    102              The group should have a key defined if an expandable preference is present to correctly
    103              persist state. -->
    104         <attr name="initialExpandedChildrenCount" format="integer" />
    105     </declare-styleable>
    106 
    107     <!-- Base attributes available to Preference. -->
    108     <declare-styleable name="Preference">
    109         <!-- The optional icon for the preference -->
    110         <attr name="icon" />
    111         <attr name="android:icon" />
    112         <!-- The key to store the Preference value. -->
    113         <attr name="key" format="string" />
    114         <attr name="android:key" />
    115         <!-- The title for the Preference in a PreferenceActivity screen. -->
    116         <attr name="title" />
    117         <attr name="android:title" />
    118         <!-- The summary for the Preference in a PreferenceActivity screen. -->
    119         <attr name="summary" format="string" />
    120         <attr name="android:summary" />
    121         <!-- The order for the Preference (lower values are to be ordered first). If this is not
    122              specified, the default ordering will be alphabetic. -->
    123         <attr name="order" format="integer" />
    124         <attr name="android:order" />
    125         <!-- When used inside of a modern PreferenceActivity, this declares
    126              a new PreferenceFragment to be shown when the user selects this item. -->
    127         <attr name="fragment" format="string" />
    128         <attr name="android:fragment" />
    129         <!-- The layout for the Preference in a PreferenceActivity screen. This should
    130              rarely need to be changed, look at widgetLayout instead. -->
    131         <attr name="layout" />
    132         <attr name="android:layout" />
    133         <!-- The layout for the controllable widget portion of a Preference. This is inflated
    134              into the layout for a Preference and should be used more frequently than
    135              the layout attribute. For example, a checkbox preference would specify
    136              a custom layout (consisting of just the CheckBox) here. -->
    137         <attr name="widgetLayout" format="reference" />
    138         <attr name="android:widgetLayout" />
    139         <!-- Whether the Preference is enabled. -->
    140         <attr name="enabled" format="boolean" />
    141         <attr name="android:enabled" />
    142         <!-- Whether the Preference is selectable. -->
    143         <attr name="selectable" format="boolean" />
    144         <attr name="android:selectable" />
    145         <!-- The key of another Preference that this Preference will depend on.  If the other
    146              Preference is not set or is off, this Preference will be disabled. -->
    147         <attr name="dependency" format="string" />
    148         <attr name="android:dependency" />
    149         <!-- Whether the Preference stores its value to the shared preferences. -->
    150         <attr name="persistent" format="boolean" />
    151         <attr name="android:persistent" />
    152         <!-- The default value for the preference, which will be set either if persistence
    153              is off or persistence is on and the preference is not found in the persistent
    154              storage.  -->
    155         <attr name="defaultValue" format="string|boolean|integer|reference|float" />
    156         <attr name="android:defaultValue" />
    157         <!-- Whether the view of this Preference should be disabled when
    158              this Preference is disabled. -->
    159         <attr name="shouldDisableView" format="boolean" />
    160         <attr name="android:shouldDisableView" />
    161 
    162         <!-- Whether the preference allows displaying divider on top -->
    163         <attr name="allowDividerAbove" format="boolean" />
    164 
    165         <!-- Whether the preference allows displaying divider below it -->
    166         <attr name="allowDividerBelow" format="boolean" />
    167 
    168         <!-- Whether to use single line for the preference title text. By default, preference title
    169              will be constrained to one line, so the default value of this attribute is true. -->
    170         <attr name="singleLineTitle" format="boolean" />
    171         <attr name="android:singleLineTitle" />
    172 
    173         <!-- Whether the space for the preference icon view will be reserved. If set to true, the
    174              preference will be offset as if it would have the icon and thus aligned with other
    175              preferences having icons. By default, preference icon view visibility will be set to
    176              GONE when there is no icon provided, so the default value of this attribute is false.
    177              -->
    178         <attr name="iconSpaceReserved" format="boolean" />
    179         <attr name="android:iconSpaceReserved" />
    180 
    181         <!-- Whether the Preference is visible. By default, this is set to true. -->
    182         <attr name="isPreferenceVisible" format="boolean" />
    183 
    184     </declare-styleable>
    185 
    186     <!-- Base attributes available to CheckBoxPreference. -->
    187     <declare-styleable name="CheckBoxPreference">
    188         <!-- The summary for the Preference in a PreferenceActivity screen when the
    189              CheckBoxPreference is checked. If separate on/off summaries are not
    190              needed, the summary attribute can be used instead. -->
    191         <attr name="summaryOn" format="string" />
    192         <attr name="android:summaryOn" />
    193         <!-- The summary for the Preference in a PreferenceActivity screen when the
    194              CheckBoxPreference is unchecked. If separate on/off summaries are not
    195              needed, the summary attribute can be used instead. -->
    196         <attr name="summaryOff" format="string" />
    197         <attr name="android:summaryOff" />
    198         <!-- The state (true for on, or false for off) that causes dependents to be disabled. By default,
    199              dependents will be disabled when this is unchecked, so the value of this preference is false. -->
    200         <attr name="disableDependentsState" format="boolean" />
    201         <attr name="android:disableDependentsState" />
    202     </declare-styleable>
    203 
    204     <!-- Base attributes available to DialogPreference. -->
    205     <declare-styleable name="DialogPreference">
    206         <!-- The title in the dialog. -->
    207         <attr name="dialogTitle" format="string" />
    208         <attr name="android:dialogTitle" />
    209         <!-- The message in the dialog. If a dialogLayout is provided and contains
    210              a TextView with ID android:id/message, this message will be placed in there. -->
    211         <attr name="dialogMessage" format="string" />
    212         <attr name="android:dialogMessage" />
    213         <!-- The icon for the dialog. -->
    214         <attr name="dialogIcon" format="reference" />
    215         <attr name="android:dialogIcon" />
    216         <!-- The positive button text for the dialog. Set to @null to hide the positive button. -->
    217         <attr name="positiveButtonText" format="string" />
    218         <attr name="android:positiveButtonText" />
    219         <!-- The negative button text for the dialog. Set to @null to hide the negative button. -->
    220         <attr name="negativeButtonText" format="string" />
    221         <attr name="android:negativeButtonText" />
    222         <!-- A layout to be used as the content View for the dialog. By default, this shouldn't
    223              be needed. If a custom DialogPreference is required, this should be set. For example,
    224              the EditTextPreference uses a layout with an EditText as this attribute. -->
    225         <attr name="dialogLayout" format="reference" />
    226         <attr name="android:dialogLayout" />
    227     </declare-styleable>
    228 
    229     <!-- Base attributes available to ListPreference. -->
    230     <declare-styleable name="ListPreference">
    231         <!-- The human-readable array to present as a list. Each entry must have a corresponding
    232              index in entryValues. -->
    233         <attr name="entries" format="reference" />
    234         <attr name="android:entries" />
    235         <!-- The array to find the value to save for a preference when an entry from
    236              entries is selected. If a user clicks on the second item in entries, the
    237              second item in this array will be saved to the preference. -->
    238         <attr name="entryValues" format="reference" />
    239         <attr name="android:entryValues" />
    240     </declare-styleable>
    241 
    242     <declare-styleable name="MultiSelectListPreference">
    243         <!-- The human-readable array to present as a list. Each entry must have a corresponding
    244              index in entryValues. -->
    245         <attr name="entries" />
    246         <attr name="android:entries" />
    247         <!-- The array to find the value to save for a preference when an entry from
    248              entries is selected. If a user clicks the second item in entries, the
    249              second item in this array will be saved to the preference. -->
    250         <attr name="entryValues" />
    251         <attr name="android:entryValues" />
    252     </declare-styleable>
    253 
    254     <declare-styleable name="SwitchPreferenceCompat">
    255         <!-- The summary for the Preference in a PreferenceActivity screen when the
    256              SwitchPreference is checked. If separate on/off summaries are not
    257              needed, the summary attribute can be used instead. -->
    258         <attr name="summaryOn" />
    259         <attr name="android:summaryOn" />
    260         <!-- The summary for the Preference in a PreferenceActivity screen when the
    261              SwitchPreference is unchecked. If separate on/off summaries are not
    262              needed, the summary attribute can be used instead. -->
    263         <attr name="summaryOff" />
    264         <attr name="android:summaryOff" />
    265         <!-- The text used on the switch itself when in the "on" state.
    266              This should be a very SHORT string, as it appears in a small space. -->
    267         <attr name="switchTextOn" format="string" />
    268         <attr name="android:switchTextOn" />
    269         <!-- The text used on the switch itself when in the "off" state.
    270              This should be a very SHORT string, as it appears in a small space. -->
    271         <attr name="switchTextOff" format="string" />
    272         <attr name="android:switchTextOff" />
    273         <!-- The state (true for on, or false for off) that causes dependents to be disabled. By default,
    274              dependents will be disabled when this is unchecked, so the value of this preference is false. -->
    275         <attr name="disableDependentsState" />
    276         <attr name="android:disableDependentsState" />
    277     </declare-styleable>
    278 
    279     <declare-styleable name="PreferenceImageView">
    280         <attr name="maxWidth" format="dimension" />
    281         <attr name="android:maxWidth" />
    282         <attr name="maxHeight" format="dimension" />
    283         <attr name="android:maxHeight" />
    284     </declare-styleable>
    285 
    286     <!-- Used to access some android attrs -->
    287     <declare-styleable name="BackgroundStyle">
    288         <attr name="android:selectableItemBackground" />
    289         <!-- Need a non-android: attr here so that gradle doesn't remove it -->
    290         <attr name="selectableItemBackground" />
    291     </declare-styleable>
    292 
    293     <declare-styleable name="SeekBarPreference">
    294         <attr name="min" format="integer"/>
    295         <attr name="android:max"/>
    296         <attr name="android:layout" />
    297         <!--Attribute controlling the amount to increment or decrement the seekbar when the user
    298         presses the arrow keys-->
    299         <attr name="seekBarIncrement" format="integer" />
    300         <!-- Attribute indicating whether the slider within this preference can be adjusted, that is
    301         pressing left/right keys when this preference is focused will move the slider accordingly
    302         (e.g. inline adjustable preferences). False, if the slider within the preference is
    303         read-only and cannot be adjusted. By default, the seekbar is adjustable. -->
    304         <attr name="adjustable" format="boolean" />
    305         <!-- Flag indicating whether the TextView next to the seekbar that shows the current seekbar
    306         value will be displayed. If true, the view is VISIBLE; if false, the view will be GONE.
    307         By default, this view is VISIBLE. -->
    308         <attr name="showSeekBarValue" format="boolean" />
    309     </declare-styleable>
    310 
    311     <declare-styleable name="SwitchPreference">
    312         <!-- The summary for the Preference in a PreferenceActivity screen when the
    313              SwitchPreference is checked. If separate on/off summaries are not
    314              needed, the summary attribute can be used instead. -->
    315         <attr name="summaryOn" />
    316         <attr name="android:summaryOn" />
    317         <!-- The summary for the Preference in a PreferenceActivity screen when the
    318              SwitchPreference is unchecked. If separate on/off summaries are not
    319              needed, the summary attribute can be used instead. -->
    320         <attr name="summaryOff" />
    321         <attr name="android:summaryOff" />
    322         <!-- The text used on the switch itself when in the "on" state.
    323              This should be a very SHORT string, as it appears in a small space. -->
    324         <attr name="switchTextOn"/>
    325         <attr name="android:switchTextOn"/>
    326         <!-- The text used on the switch itself when in the "off" state.
    327              This should be a very SHORT string, as it appears in a small space. -->
    328         <attr name="switchTextOff" />
    329         <attr name="android:switchTextOff" />
    330         <!-- The state (true for on, or false for off) that causes dependents to be disabled. By default,
    331              dependents will be disabled when this is unchecked, so the value of this preference is false. -->
    332         <attr name="disableDependentsState" />
    333         <attr name="android:disableDependentsState" />
    334     </declare-styleable>
    335 
    336     <!-- Base attributes available to PreferenceFragment. -->
    337     <declare-styleable name="PreferenceFragment">
    338         <!-- The layout for the PreferenceFragment. This should rarely need to be changed. -->
    339         <attr name="android:layout" />
    340         <!-- List separator to draw between preference views -->
    341         <attr name="android:divider" />
    342         <!-- List separator height -->
    343         <attr name="android:dividerHeight" />
    344         <!-- Whether a divider is allowed to draw after the last item -->
    345         <attr name="allowDividerAfterLastItem" />
    346     </declare-styleable>
    347 </resources>
    348