1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 Copyright (C) 2014 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="lbBaseGridView"> 20 <!-- Allow DPAD key to navigate out at the front of the View (where position = 0), 21 default is false --> 22 <attr name="focusOutFront" format="boolean" /> 23 <!-- Allow DPAD key to navigate out at the end of the view, default is false --> 24 <attr name="focusOutEnd" format="boolean" /> 25 <!-- Defining margin between two items horizontally --> 26 <attr name="horizontalMargin" format="dimension" /> 27 <!-- Defining margin between two items vertically --> 28 <attr name="verticalMargin" format="dimension" /> 29 <!-- Defining gravity of child view --> 30 <attr name="android:gravity" /> 31 </declare-styleable> 32 33 <declare-styleable name="lbHorizontalGridView"> 34 <!-- Defining height of each row of HorizontalGridView --> 35 <attr name="rowHeight" format="dimension" > 36 <enum name="wrap_content" value="-2" /> 37 </attr> 38 <!-- Defining number of rows --> 39 <attr name="numberOfRows" format="integer" /> 40 </declare-styleable> 41 42 <declare-styleable name="lbVerticalGridView"> 43 <!-- Defining width of each column of VerticalGridView --> 44 <attr name="columnWidth" format="dimension" > 45 <enum name="wrap_content" value="-2" /> 46 </attr> 47 <!-- Defining number of columns --> 48 <attr name="numberOfColumns" format="integer" /> 49 </declare-styleable> 50 51 <declare-styleable name="lbBaseCardView"> 52 <!-- Defines the type of the card layout --> 53 <attr name="cardType" format="enum"> 54 <!-- A simple card layout with a single layout region. --> 55 <enum name="mainOnly" value="0" /> 56 <!-- A card layout with two layout regions: a main area which is 57 always visible, and an info region that appears over the lower 58 area of the main region. --> 59 <enum name="infoOver" value="1" /> 60 <!-- A card layout with two layout regions: a main area which is 61 always visible, and an info region that appears below the main 62 region. --> 63 <enum name="infoUnder" value="2" /> 64 <!-- A card layout with three layout regions: a main area which is 65 always visible, an info region that appears below the main 66 region, and an extra region that appears below the info region 67 after a small delay. --> 68 <enum name="infoUnderWithExtra" value="3" /> 69 </attr> 70 <!-- Defines when the info region of a card layout is displayed. --> 71 <attr name="infoVisibility" format="enum"> 72 <!-- Always display the info region. --> 73 <enum name="always" value="0"/> 74 <!-- Display the info region only when activated. --> 75 <enum name="activated" value="1"/> 76 <!-- Display the info region only when selected. --> 77 <enum name="selected" value="2"/> 78 </attr> 79 <!-- Defines when the extra region of a card layout is displayed. 80 Depends on infoVisibility, meaning the extra region never displays 81 if the info region is not displayed as well. --> 82 <attr name="extraVisibility" format="enum"> 83 <!-- Always display the extra region. --> 84 <enum name="always" value="0"/> 85 <!-- Display the extra region only when activated. --> 86 <enum name="activated" value="1"/> 87 <!-- Display the extra region only when selected. --> 88 <enum name="selected" value="2"/> 89 </attr> 90 <!-- Defines the delay in milliseconds before the selection animation 91 runs for a card layout. --> 92 <attr name="selectedAnimationDelay" format="integer" /> 93 <!-- Defines the duration in milliseconds of the selection animation for 94 a card layout. --> 95 <attr name="selectedAnimationDuration" format="integer" /> 96 <!-- Defines the duration in milliseconds of the activated animation for 97 a card layout. --> 98 <attr name="activatedAnimationDuration" format="integer" /> 99 </declare-styleable> 100 101 <!-- This is the basic set of layout attributes for elements within a card 102 layout. These attributes are specified with the rest of an elements's 103 normal attributes. --> 104 <declare-styleable name="lbBaseCardView_Layout"> 105 <!-- The card layout region defined by this element. At most one of 106 element of each type should be specified as an immediate child of 107 the card layout. --> 108 <attr name="layout_viewType" format="enum"> 109 <!-- The main region of the card. --> 110 <enum name="main" value="0"/> 111 <!-- The info region of the card. --> 112 <enum name="info" value="1"/> 113 <!-- The extra region of the card. --> 114 <enum name="extra" value="2"/> 115 </attr> 116 </declare-styleable> 117 118 <declare-styleable name="lbImageCardView"> 119 <attr name="infoAreaBackground" format="reference|color"/> 120 </declare-styleable> 121 122 <declare-styleable name="lbSearchOrbView"> 123 <!-- Defining icon of the search affordance --> 124 <attr name="searchOrbIcon" format="reference"/> 125 <!-- Defining icon tint color of the search affordance --> 126 <attr name="searchOrbIconColor" format="reference|color"/> 127 <!-- Defining color of the search affordance --> 128 <attr name="searchOrbColor" format="reference|color" /> 129 <!-- Defining pulse color of the search affordance --> 130 <attr name="searchOrbBrightColor" format="reference|color" /> 131 </declare-styleable> 132 133 <declare-styleable name="lbPlaybackControlsActionIcons"> 134 <attr name="play" format="reference"/> 135 <attr name="pause" format="reference"/> 136 <attr name="fast_forward" format="reference"/> 137 <attr name="rewind" format="reference"/> 138 <attr name="skip_next" format="reference"/> 139 <attr name="skip_previous" format="reference"/> 140 <attr name="thumb_up_outline" format="reference"/> 141 <attr name="thumb_up" format="reference"/> 142 <attr name="thumb_down_outline" format="reference"/> 143 <attr name="thumb_down" format="reference"/> 144 <attr name="repeat" format="reference"/> 145 <attr name="repeat_one" format="reference"/> 146 <attr name="shuffle" format="reference"/> 147 <attr name="high_quality" format="reference"/> 148 <attr name="closed_captioning" format="reference"/> 149 </declare-styleable> 150 151 <declare-styleable name="lbSlide"> 152 <!-- A duplication of Slide attribute slideEdge for KitKat --> 153 <attr name="lb_slideEdge"> 154 <!-- Slide to and from the left edge of the Scene. --> 155 <enum name="left" value="0x03" /> 156 <!-- Slide to and from the top edge of the Scene. --> 157 <enum name="top" value="0x30" /> 158 <!-- Slide to and from the right edge of the Scene. --> 159 <enum name="right" value="0x05" /> 160 <!-- Slide to and from the bottom edge of the Scene. --> 161 <enum name="bottom" value="0x50" /> 162 <!-- Slide to and from the x-axis position at the start of the Scene root. --> 163 <enum name="start" value="0x00800003"/> 164 <!-- Slide to and from the x-axis position at the end of the Scene root. --> 165 <enum name="end" value="0x00800005"/> 166 </attr> 167 <attr name="android:duration" /> 168 <attr name="android:startDelay" /> 169 <attr name="android:interpolator" /> 170 </declare-styleable> 171 172 <declare-styleable name="lbResizingTextView"> 173 <!-- Conditions used to trigger text resizing --> 174 <attr name="resizeTrigger"> 175 <!-- Resize text whenever it lays out into the maximum number of lines --> 176 <flag name="maxLines" value="0x01" /> 177 </attr> 178 <!-- Text size for resized text --> 179 <attr name="resizedTextSize" format="dimension" /> 180 <!-- Whether to maintain the same line spacing when text is resized, default is false --> 181 <attr name="maintainLineSpacing" format="boolean" /> 182 <!-- Adjustment to top padding for resized text --> 183 <attr name="resizedPaddingAdjustmentTop" format="dimension" /> 184 <!-- Adjustment to bottom padding for resized text --> 185 <attr name="resizedPaddingAdjustmentBottom" format="dimension" /> 186 </declare-styleable> 187 188 <declare-styleable name="LeanbackTheme"> 189 190 <!-- start padding of BrowseFragment, RowsFragment, DetailsFragment --> 191 <attr name="browsePaddingStart" format="dimension" /> 192 <!-- end padding of BrowseFragment, RowsFragment, DetailsFragment --> 193 <attr name="browsePaddingEnd" format="dimension" /> 194 <!-- top padding of BrowseFragment --> 195 <attr name="browsePaddingTop" format="dimension" /> 196 <!-- bottom padding of BrowseFragment --> 197 <attr name="browsePaddingBottom" format="dimension" /> 198 <!-- start margin of RowsFragment inside BrowseFragment when HeadersFragment is visible --> 199 <attr name="browseRowsMarginStart" format="dimension" /> 200 <!-- top margin of RowsFragment inside BrowseFragment when BrowseFragment title is visible --> 201 <attr name="browseRowsMarginTop" format="dimension" /> 202 <!-- fading edge length of start of browse row when HeadersFragment is visible --> 203 <attr name="browseRowsFadingEdgeLength" format="dimension" /> 204 205 <!-- BrowseFragment Title text style --> 206 <attr name="browseTitleTextStyle" format="reference" /> 207 208 <!-- BrowseFragment Title icon style --> 209 <attr name="browseTitleIconStyle" format="reference" /> 210 211 <!-- BrowseFragment TitleView style --> 212 <attr name="browseTitleViewStyle" format="reference" /> 213 214 <!-- vertical grid style inside HeadersFragment --> 215 <attr name="headersVerticalGridStyle" format="reference" /> 216 <!-- header style inside HeadersFragment --> 217 <attr name="headerStyle" format="reference" /> 218 219 <!-- vertical grid style inside RowsFragment --> 220 <attr name="rowsVerticalGridStyle" format="reference" /> 221 222 <!-- horizontal grid style inside a row --> 223 <attr name="rowHorizontalGridStyle" format="reference" /> 224 <!-- header style inside a row --> 225 <attr name="rowHeaderStyle" format="reference" /> 226 227 <!-- hover card title style --> 228 <attr name="rowHoverCardTitleStyle" format="reference" /> 229 <!-- hover card description style --> 230 <attr name="rowHoverCardDescriptionStyle" format="reference" /> 231 232 <!-- CardView styles --> 233 <attr name="baseCardViewStyle" format="reference" /> 234 <attr name="imageCardViewStyle" format="reference" /> 235 236 <!-- for details overviews --> 237 <attr name="detailsDescriptionTitleStyle" format="reference" /> 238 <attr name="detailsDescriptionSubtitleStyle" format="reference" /> 239 <attr name="detailsDescriptionBodyStyle" format="reference" /> 240 <attr name="detailsActionButtonStyle" format="reference" /> 241 242 <!-- for playback controls --> 243 <attr name="playbackControlsButtonStyle" format="reference" /> 244 <attr name="playbackControlButtonLabelStyle" format="reference" /> 245 <attr name="playbackControlsTimeStyle" format="reference" /> 246 247 <!-- style for a vertical grid of items --> 248 <attr name="itemsVerticalGridStyle" format="reference" /> 249 250 <!-- for messages in the error fragment --> 251 <attr name="errorMessageStyle" format="reference" /> 252 253 <!-- Default brand color used for the background of certain leanback visual elements 254 such as the headers fragment. If your app runs on: 255 a) SDK 21+: set colorPrimary, used by the leanback launcher and elsewhere, and defaultBrandColor will inherit it. 256 b) SDK < 21: set the brand color explicitly via defaultBrandColor, or programatically. 257 --> 258 <attr name="defaultBrandColor" format="reference|color" /> 259 260 <!-- Default colors --> 261 <attr name="defaultSearchColor" format="reference|color" /> 262 <!-- Default color that search orb pulses to. If not set, this color is determined programatically based on the defaultSearchColor --> 263 <attr name="defaultSearchBrightColor" format="reference|color" /> 264 265 <!-- Style for searchOrb --> 266 <attr name="searchOrbViewStyle" format="reference"/> 267 <attr name="defaultSearchIcon" format="reference" /> 268 269 <attr name="playbackProgressPrimaryColor" format="reference|color" /> 270 <attr name="playbackControlsIconHighlightColor" format="reference|color" /> 271 <attr name="playbackControlsActionIcons" format="reference" /> 272 273 <!-- Default color for dimmed views. --> 274 <attr name="overlayDimMaskColor" format="color" /> 275 <!-- Default level of dimming for active views. --> 276 <attr name="overlayDimActiveLevel" format="fraction" /> 277 <!-- Default level of dimming for dimmed views. --> 278 <attr name="overlayDimDimmedLevel" format="fraction" /> 279 280 </declare-styleable> 281 282 283 </resources> 284