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     </declare-styleable>
     84 
     85     <!-- Base attributes available to PreferenceGroup. -->
     86     <declare-styleable name="PreferenceGroup">
     87         <!-- Whether to order the Preference under this group as they appear in the XML file.
     88              If this is false, the ordering will follow the Preference order attribute and
     89              default to alphabetic for those without the order attribute. -->
     90         <attr name="orderingFromXml" format="boolean" />
     91         <attr name="android:orderingFromXml" />
     92     </declare-styleable>
     93 
     94     <!-- Base attributes available to Preference. -->
     95     <declare-styleable name="Preference">
     96         <!-- The optional icon for the preference -->
     97         <attr name="icon" />
     98         <attr name="android:icon" />
     99         <!-- The key to store the Preference value. -->
    100         <attr name="key" format="string" />
    101         <attr name="android:key" />
    102         <!-- The title for the Preference in a PreferenceActivity screen. -->
    103         <attr name="title" />
    104         <attr name="android:title" />
    105         <!-- The summary for the Preference in a PreferenceActivity screen. -->
    106         <attr name="summary" format="string" />
    107         <attr name="android:summary" />
    108         <!-- The order for the Preference (lower values are to be ordered first). If this is not
    109              specified, the default ordering will be alphabetic. -->
    110         <attr name="order" format="integer" />
    111         <attr name="android:order" />
    112         <!-- When used inside of a modern PreferenceActivity, this declares
    113              a new PreferenceFragment to be shown when the user selects this item. -->
    114         <attr name="fragment" format="string" />
    115         <attr name="android:fragment" />
    116         <!-- The layout for the Preference in a PreferenceActivity screen. This should
    117              rarely need to be changed, look at widgetLayout instead. -->
    118         <attr name="layout" />
    119         <attr name="android:layout" />
    120         <!-- The layout for the controllable widget portion of a Preference. This is inflated
    121              into the layout for a Preference and should be used more frequently than
    122              the layout attribute. For example, a checkbox preference would specify
    123              a custom layout (consisting of just the CheckBox) here. -->
    124         <attr name="widgetLayout" format="reference" />
    125         <attr name="android:widgetLayout" />
    126         <!-- Whether the Preference is enabled. -->
    127         <attr name="enabled" format="boolean" />
    128         <attr name="android:enabled" />
    129         <!-- Whether the Preference is selectable. -->
    130         <attr name="selectable" format="boolean" />
    131         <attr name="android:selectable" />
    132         <!-- The key of another Preference that this Preference will depend on.  If the other
    133              Preference is not set or is off, this Preference will be disabled. -->
    134         <attr name="dependency" format="string" />
    135         <attr name="android:dependency" />
    136         <!-- Whether the Preference stores its value to the shared preferences. -->
    137         <attr name="persistent" format="boolean" />
    138         <attr name="android:persistent" />
    139         <!-- The default value for the preference, which will be set either if persistence
    140              is off or persistence is on and the preference is not found in the persistent
    141              storage.  -->
    142         <attr name="defaultValue" format="string|boolean|integer|reference|float" />
    143         <attr name="android:defaultValue" />
    144         <!-- Whether the view of this Preference should be disabled when
    145              this Preference is disabled. -->
    146         <attr name="shouldDisableView" format="boolean" />
    147         <attr name="android:shouldDisableView" />
    148     </declare-styleable>
    149 
    150     <!-- Base attributes available to CheckBoxPreference. -->
    151     <declare-styleable name="CheckBoxPreference">
    152         <!-- The summary for the Preference in a PreferenceActivity screen when the
    153              CheckBoxPreference is checked. If separate on/off summaries are not
    154              needed, the summary attribute can be used instead. -->
    155         <attr name="summaryOn" format="string" />
    156         <attr name="android:summaryOn" />
    157         <!-- The summary for the Preference in a PreferenceActivity screen when the
    158              CheckBoxPreference is unchecked. If separate on/off summaries are not
    159              needed, the summary attribute can be used instead. -->
    160         <attr name="summaryOff" format="string" />
    161         <attr name="android:summaryOff" />
    162         <!-- The state (true for on, or false for off) that causes dependents to be disabled. By default,
    163              dependents will be disabled when this is unchecked, so the value of this preference is false. -->
    164         <attr name="disableDependentsState" format="boolean" />
    165         <attr name="android:disableDependentsState" />
    166     </declare-styleable>
    167 
    168     <!-- Base attributes available to DialogPreference. -->
    169     <declare-styleable name="DialogPreference">
    170         <!-- The title in the dialog. -->
    171         <attr name="dialogTitle" format="string" />
    172         <attr name="android:dialogTitle" />
    173         <!-- The message in the dialog. If a dialogLayout is provided and contains
    174              a TextView with ID android:id/message, this message will be placed in there. -->
    175         <attr name="dialogMessage" format="string" />
    176         <attr name="android:dialogMessage" />
    177         <!-- The icon for the dialog. -->
    178         <attr name="dialogIcon" format="reference" />
    179         <attr name="android:dialogIcon" />
    180         <!-- The positive button text for the dialog. Set to @null to hide the positive button. -->
    181         <attr name="positiveButtonText" format="string" />
    182         <attr name="android:positiveButtonText" />
    183         <!-- The negative button text for the dialog. Set to @null to hide the negative button. -->
    184         <attr name="negativeButtonText" format="string" />
    185         <attr name="android:negativeButtonText" />
    186         <!-- A layout to be used as the content View for the dialog. By default, this shouldn't
    187              be needed. If a custom DialogPreference is required, this should be set. For example,
    188              the EditTextPreference uses a layout with an EditText as this attribute. -->
    189         <attr name="dialogLayout" format="reference" />
    190         <attr name="android:dialogLayout" />
    191     </declare-styleable>
    192 
    193     <!-- Base attributes available to ListPreference. -->
    194     <declare-styleable name="ListPreference">
    195         <!-- The human-readable array to present as a list. Each entry must have a corresponding
    196              index in entryValues. -->
    197         <attr name="entries" format="reference" />
    198         <attr name="android:entries" />
    199         <!-- The array to find the value to save for a preference when an entry from
    200              entries is selected. If a user clicks on the second item in entries, the
    201              second item in this array will be saved to the preference. -->
    202         <attr name="entryValues" format="reference" />
    203         <attr name="android:entryValues" />
    204     </declare-styleable>
    205 
    206     <declare-styleable name="MultiSelectListPreference">
    207         <!-- The human-readable array to present as a list. Each entry must have a corresponding
    208              index in entryValues. -->
    209         <attr name="entries" />
    210         <attr name="android:entries" />
    211         <!-- The array to find the value to save for a preference when an entry from
    212              entries is selected. If a user clicks the second item in entries, the
    213              second item in this array will be saved to the preference. -->
    214         <attr name="entryValues" />
    215         <attr name="android:entryValues" />
    216     </declare-styleable>
    217 
    218     <declare-styleable name="SwitchPreferenceCompat">
    219         <!-- The summary for the Preference in a PreferenceActivity screen when the
    220              SwitchPreference is checked. If separate on/off summaries are not
    221              needed, the summary attribute can be used instead. -->
    222         <attr name="summaryOn" />
    223         <attr name="android:summaryOn" />
    224         <!-- The summary for the Preference in a PreferenceActivity screen when the
    225              SwitchPreference is unchecked. If separate on/off summaries are not
    226              needed, the summary attribute can be used instead. -->
    227         <attr name="summaryOff" />
    228         <attr name="android:summaryOff" />
    229         <!-- The text used on the switch itself when in the "on" state.
    230              This should be a very SHORT string, as it appears in a small space. -->
    231         <attr name="switchTextOn" format="string" />
    232         <attr name="android:switchTextOn" />
    233         <!-- The text used on the switch itself when in the "off" state.
    234              This should be a very SHORT string, as it appears in a small space. -->
    235         <attr name="switchTextOff" format="string" />
    236         <attr name="android:switchTextOff" />
    237         <!-- The state (true for on, or false for off) that causes dependents to be disabled. By default,
    238              dependents will be disabled when this is unchecked, so the value of this preference is false. -->
    239         <attr name="disableDependentsState" />
    240         <attr name="android:disableDependentsState" />
    241     </declare-styleable>
    242 
    243     <declare-styleable name="PreferenceImageView">
    244         <attr name="maxWidth" format="dimension" />
    245         <attr name="android:maxWidth" />
    246         <attr name="maxHeight" format="dimension" />
    247         <attr name="android:maxHeight" />
    248     </declare-styleable>
    249 
    250     <!-- Used to access some android attrs -->
    251     <declare-styleable name="BackgroundStyle">
    252         <attr name="android:selectableItemBackground" />
    253         <!-- Need a non-android: attr here so that gradle doesn't remove it -->
    254         <attr name="selectableItemBackground" />
    255     </declare-styleable>
    256 
    257 </resources>
    258