Home | History | Annotate | Download | only in values
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2014 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 <resources>
     17 
     18     <declare-styleable name="CanvasSettings">
     19         <attr name="preference" format="reference" />
     20     </declare-styleable>
     21 
     22     <declare-styleable name="FrameLayoutWithShadows">
     23         <!-- default shadow drawable -->
     24         <attr name="defaultShadow" format="reference"/>
     25         <!-- drawable on bottom of content, note: it requires intrinsic height,
     26              so ColorDrawable does not work,  use ShapeDrawable with solid color
     27              instead -->
     28         <attr name="drawableBottom" format="reference"/>
     29         </declare-styleable>
     30 
     31     <declare-styleable name="ScrollAdapterView">
     32 
     33         <attr name="orientation">
     34             <enum name="horizontal" value="0" />
     35             <enum name="vertical" value="1" />
     36         </attr>
     37 
     38         <!-- indicate whether the ScrollAdapterView's child can have focus,
     39         default is true -->
     40         <attr name="itemFocusable" format="boolean" />
     41 
     42         <!--
     43           set to 1 (default value) for single row/column, set to > 1 for grid view,
     44           set to 0 for auto adjust rows/columns by widget size.
     45         -->
     46         <attr name="gridSetting" format="integer" />
     47 
     48         <!-- space between two items -->
     49         <attr name="space" format="dimension" />
     50 
     51         <!-- alternative space size of a selected item, ScrollAdapterView may assign
     52         more (or less) space to the selected item and animate the transition between
     53         multiple items.  In a more complicated case: if each item has a different
     54         selectedSize,  use ScrollAdapterCustomSize. <p>
     55         The value can be used in two cases: <p>
     56         - when selectedTakesMoreSpace is true:  ScrollAdapterView will allocate more
     57         spaces surrounding the focused item.  The extra spaces is added to start/end
     58         depending on "scrollItemAlign". <p>
     59         - when selectedTakesMoreSpace is false: ScrollAdapterView will not allocate
     60         more spaces for focused item,  but will align the focused item using the value. <p>
     61         In any case, ScrollAdapterView never scale the View or change its width or height,
     62         the view itself is responsible doing the scale in ScrollAdapterTransform or
     63         ScrollAdapterView.OnScrollListener
     64         -->
     65         <attr name="selectedSize" format="dimension" />
     66 
     67         <!-- if ScrollAdapterView will use "selectedSize" or ScrollAdapterCustomSize
     68         to add more spaces for selected item-->
     69         <attr name="selectedTakesMoreSpace" format="boolean" />
     70 
     71         <!-- describe how to put scroll center in the viewport -->
     72         <attr name="scrollCenterStrategy">
     73 
     74             <!-- keep scroll center in center of viewport, the middle point is 1/2 inside
     75             client area (size - padding) by default.  But you can also use scrollCenterOffset
     76             or scrollCenterOffsetPercent to customize it-->
     77             <enum name="keepCenter" value="0" />
     78             <!-- keep scroll center as a fixed distance from start/top -->
     79             <enum name="fixed" value="1" />
     80             <!-- keep scroll center offset from the center of the view -->
     81             <enum name="fixedPercent" value="2"/>
     82             <!-- keep scroll center as a fixed distance from end/bottom -->
     83             <enum name="fixedToEnd" value="3" />
     84         </attr>
     85 
     86         <!-- only used when scrollCenterStrategy is fixed or fixedPercent -->
     87         <attr name="scrollCenterOffset" format="dimension" />
     88 
     89         <!-- only used when scrollCenterStrategy is fixedPercent -->
     90         <attr name="scrollCenterOffsetPercent" format="integer" />
     91 
     92         <!-- how to align the selected item -->
     93         <attr name="scrollItemAlign">
     94             <!-- align the center of selected item -->
     95             <enum name="center" value="0" />
     96             <!-- align the start/up edge of selected item -->
     97             <enum name="low" value="1" />
     98             <!-- align the end/down edge of selected item -->
     99             <enum name="high" value="2" />
    100         </attr>
    101 
    102         <!-- divisor (>=1) for view to chasing the scrolling target pos, set to 1.0 for
    103         immediately fill the gap of current pos and target, default value 2.0 fills half
    104         of the gap every time.  The reason that we use Lerper model is for smoothing out
    105         transitions between two different animations. -->
    106         <attr name="lerperDivisor" format="float" />
    107 
    108         <!--
    109           distance based transform for the views on the start/top of center position,
    110           the duration is interpreted as "dip" instead of milliseconds
    111         -->
    112         <attr name="lowItemTransform" format="reference" />
    113 
    114         <!--
    115           distance based transform for the views on the end/down of center position,
    116           the duration is interpreted as "dip" instead of milliseconds
    117         -->
    118         <attr name="highItemTransform" format="reference" />
    119 
    120         <!-- animation for showing expanded item -->
    121         <attr name="expandedItemInAnim" format="reference" />
    122 
    123         <!-- animation for hiding expanded item -->
    124         <attr name="expandedItemOutAnim" format="reference" />
    125 
    126         <!--  allow DPAD key to navigate out of scrollAdapterView, default is true -->
    127         <attr name="navigateOutAllowed" format="boolean" />
    128 
    129         <!--  allow DPAD key to navigate out of off axis of scrollAdapterView, default is true -->
    130         <attr name="navigateOutOfOffAxisAllowed" format="boolean" />
    131 
    132         <!--  allow DPAD key during animation, default is true -->
    133         <attr name="navigateInAnimationAllowed" format="boolean" />
    134 
    135     </declare-styleable>
    136 
    137     <declare-styleable name="RadioPreference">
    138         <attr name="radioGroup" format="string" />
    139     </declare-styleable>
    140 
    141 </resources>
    142