| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright (C) 2019 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <resources> |
| <!-- Global theme options for CarUi --> |
| <declare-styleable name="CarUi"> |
| <!-- When set to true, the window decor will contain an OEM-customizable layout --> |
| <attr name="carUiBaseLayout" format="boolean"/> |
| <!-- When set to true, a CarUi Toolbar will be provided in the window decor --> |
| <attr name="carUiToolbar" format="boolean"/> |
| </declare-styleable> |
| |
| <declare-styleable name="CarUiToolbar"> |
| <!-- Title of the toolbar, only displayed in certain conditions --> |
| <attr name="title" format="string"/> |
| <!-- Logo drawable for the toolbar. Appears when there's no back/close button shown --> |
| <attr name="logo" format="reference"/> |
| <!-- Hint for the search bar in the toolbar --> |
| <attr name="searchHint" format="string"/> |
| <!-- Whether or not to show the MenuItems while searching. Default false. --> |
| <attr name="showMenuItemsWhileSearching" format="boolean"/> |
| <!-- Initial state of the toolbar. See the Toolbar.State enum for more information --> |
| <attr name="car_ui_state" format="enum"> |
| <enum name="home" value="0"/> |
| <enum name="subpage" value="1"/> |
| <enum name="search" value="2"/> |
| </attr> |
| <!-- Whether or not the toolbar should have a background. Default true. --> |
| <attr name="showBackground" format="boolean"/> |
| <!-- Mode of the navigation button See the Toolbar.NavButtonMode enum for more information --> |
| <attr name="car_ui_navButtonMode" format="enum"> |
| <enum name="back" value="0"/> |
| <enum name="close" value="1"/> |
| <enum name="down" value="2"/> |
| </attr> |
| <!-- XML resource of MenuItems. See Toolbar.setMenuItems(int) for more information. --> |
| <attr name="menuItems" format="reference"/> |
| <!-- Whether or not to show tabs in the SUBPAGE state. Default false --> |
| <attr name="showTabsInSubpage" format="boolean"/> |
| </declare-styleable> |
| |
| <declare-styleable name="CarUiToolbarMenuItem"> |
| <!-- Id of MenuItem, used to differentiate them --> |
| <attr name="id" format="reference"/> |
| <!-- Show/hide the MenuItem --> |
| <attr name="visible" format="boolean"/> |
| <!-- Set this to true to make a search MenuItem. This will override every other property except id, visible, and onclick. --> |
| <attr name="search" format="boolean"/> |
| <!-- Set this to true to make a settings MenuItem. This will override every other property except id, visible, and onclick. --> |
| <attr name="settings" format="boolean"/> |
| <!-- Title --> |
| <attr name="title"/> |
| <!-- Icon --> |
| <attr name="icon" format="reference"/> |
| <!-- True to tint the icon to a consistent color. Default true, all the other booleans default to false --> |
| <attr name="tinted" format="boolean"/> |
| <!-- Show both the icon and title at the same time --> |
| <attr name="showIconAndTitle" format="boolean"/> |
| <!-- True if this MenuItem should be a switch --> |
| <attr name="checkable" format="boolean"/> |
| <!-- Whether the switch should be checked or not. Setting this implies checkable=true --> |
| <attr name="checked" format="boolean"/> |
| <!-- True if this MenuItem should be activatable, in which case it will visually toggle states when clicked --> |
| <attr name="activatable" format="boolean"/> |
| <!-- Whether the MenuItem starts activated. Setting this implies activatable=true --> |
| <attr name="activated" format="boolean"/> |
| <!-- How to display the MenuItem. "always" means always show it on the toolbar, "never" means never show it on the toolbar and instead show it in the overflow menu --> |
| <attr name="displayBehavior" format="enum"> |
| <enum name="always" value="0"/> |
| <enum name="never" value="1"/> |
| </attr> |
| <!-- Ux restrictions required to interact with this MenuItem --> |
| <attr name="uxRestrictions"> |
| <!-- Values are copied from android.car.drivingstate.CarUxRestrictions. Note: |
| UX_RESTRICTIONS_BASELINE is not allowed here because it's useless and confusing. --> |
| <flag name="UX_RESTRICTIONS_NO_DIALPAD" value="1"/> |
| <flag name="UX_RESTRICTIONS_NO_FILTERING" value="2"/> |
| <flag name="UX_RESTRICTIONS_LIMIT_STRING_LENGTH" value="4"/> |
| <flag name="UX_RESTRICTIONS_NO_KEYBOARD" value="8"/> |
| <flag name="UX_RESTRICTIONS_NO_VIDEO" value="16"/> |
| <flag name="UX_RESTRICTIONS_LIMIT_CONTENT" value="32"/> |
| <flag name="UX_RESTRICTIONS_NO_SETUP" value="64"/> |
| <flag name="UX_RESTRICTIONS_NO_TEXT_MESSAGE" value="128"/> |
| <flag name="UX_RESTRICTIONS_NO_VOICE_TRANSCRIPTION" value="256"/> |
| <flag name="UX_RESTRICTIONS_FULLY_RESTRICTED" value="511"/> |
| </attr> |
| <!-- The name of a method that takes a MenuItem as an argument in you'r toolbar's Activity. Will be called when the MenuItem is clicked --> |
| <attr name="onClick" format="string"/> |
| </declare-styleable> |
| |
| <!-- Theme attribute to specifying a default style for all CarUiToolbars --> |
| <attr name="CarUiToolbarStyle" format="reference"/> |
| |
| <declare-styleable name="CarUiRecyclerView"> |
| <!-- Whether to enable the dividers or not. Linear and grid layout uses |
| car_ui_recyclerview_divider.xml and car_ui_divider.xml drawables |
| respectively for styling dividers. --> |
| <attr name="enableDivider" format="boolean" /> |
| <!-- Top offset for car ui recycler view. --> |
| <attr name="topOffset" format="integer" /> |
| <!-- Bottom offset for car ui recycler view for linear layout. --> |
| <attr name="bottomOffset" format="integer" /> |
| |
| <!-- Number of columns in a grid layout. --> |
| <attr name="numOfColumns" format="integer" /> |
| |
| <!-- car ui recycler view layout. --> |
| <attr name="layoutStyle" format="enum"> |
| <!-- linear layout --> |
| <enum name="linear" value="0" /> |
| <!-- grid layout --> |
| <enum name="grid" value="1" /> |
| </attr> |
| </declare-styleable> |
| |
| <declare-styleable name="CarUiPreference"> |
| <!-- Toggle for showing chevron --> |
| <attr name="showChevron" format="boolean" /> |
| <!-- Show ripple when disabled preference is clicked --> |
| <attr name="showRippleOnDisabledPreference" format="boolean" /> |
| </declare-styleable> |
| |
| <declare-styleable name="CarUiTwoActionPreference"> |
| <!-- Determines if the secondary action is initially shown --> |
| <attr name="actionShown" format="boolean"/> |
| </declare-styleable> |
| |
| <!-- Theme attribute to specify a default style for all CarUiPreferences --> |
| <attr name="carUiPreferenceStyle" format="reference" /> |
| |
| <!-- Theme attribute to specify a default style for all CarUiRecyclerViews --> |
| <attr name="carUiRecyclerViewStyle" format="reference" /> |
| |
| <attr name="state_ux_restricted" format="boolean" /> |
| |
| <!-- Attributes for FocusArea. --> |
| <declare-styleable name="FocusArea"> |
| <!-- The ID of a focusable descendant view which should be focused when the user nudges to |
| this FocusArea, if there was no view focused in the FocusArea or |
| car_ui_focus_area_default_focus_overrides_history is true. --> |
| <attr name="defaultFocus" format="reference"/> |
| |
| <!-- The paddings of FocusArea highlight. It does't impact the paddings on its child views, |
| or vice versa. --> |
| <!-- The start padding of the FocusArea highlight. --> |
| <attr name="highlightPaddingStart" format="dimension"/> |
| <!-- The end padding of the FocusArea highlight. --> |
| <attr name="highlightPaddingEnd" format="dimension"/> |
| <!-- The top padding of the FocusArea highlight. --> |
| <attr name="highlightPaddingTop" format="dimension"/> |
| <!-- The bottom padding of the FocusArea highlight. --> |
| <attr name="highlightPaddingBottom" format="dimension"/> |
| <!-- The horizontal padding of the FocusArea highlight. It can be overridden by |
| highlightPaddingStart or highlightPaddingEnd. --> |
| <attr name="highlightPaddingHorizontal" format="dimension"/> |
| <!-- The vertical padding of the FocusArea highlight. It can be overridden by |
| highlightPaddingTop or highlightPaddingBottom. --> |
| <attr name="highlightPaddingVertical" format="dimension"/> |
| |
| <!-- The offset of the FocusArea's bounds. It only affects the perceived bounds for the |
| purposes of finding the nudge target. It doesn't affect the FocusArea's view bounds or |
| highlight bounds. The offset should only be used when FocusAreas are overlapping and |
| nudge interaction is ambiguous. --> |
| <!-- The offset of the FocusArea's start bound. --> |
| <attr name="startBoundOffset" format="dimension"/> |
| <!-- The offset of the FocusArea's end bound. --> |
| <attr name="endBoundOffset" format="dimension"/> |
| <!-- The offset of the FocusArea's top bound. --> |
| <attr name="topBoundOffset" format="dimension"/> |
| <!-- The offset of the FocusArea's bottom bound. --> |
| <attr name="bottomBoundOffset" format="dimension"/> |
| <!-- The offset of the FocusArea's horizontal bounds. It can be overridden by |
| startBoundOffset or endBoundOffset. --> |
| <attr name="horizontalBoundOffset" format="dimension"/> |
| <!-- The offset of the FocusArea's vertical bounds. It can be overridden by topBoundOffset |
| or bottomBoundOffset. --> |
| <attr name="verticalBoundOffset" format="dimension"/> |
| |
| <!-- Attributes for nudge shortcut. Usually nudge is used to navigate to another FocusArea, |
| but when a nudge shortcut is specified, it's used to navigate to the given view within |
| the same FocusArea. The 2 attributes must be specified together. --> |
| <!-- The ID of the nudge shortcut view. --> |
| <attr name="nudgeShortcut" format="reference"/> |
| <!-- The direction of the nudge shortcut. --> |
| <attr name="nudgeShortcutDirection"> |
| <!-- View.FOCUS_LEFT --> |
| <flag name="left" value="0x11" /> |
| <!-- View.FOCUS_RIGHT --> |
| <flag name="right" value="0x42" /> |
| <!-- View.FOCUS_UP --> |
| <flag name="up" value="0x21" /> |
| <!-- View.FOCUS_DOWN --> |
| <flag name="down" value="0x82" /> |
| </attr> |
| |
| <!-- Attributes to specify the target FocusArea for a nudge. --> |
| <!-- The ID of the target FocusArea when nudging to the left. --> |
| <attr name="nudgeLeft" format="reference"/> |
| <!-- The ID of the target FocusArea when nudging to the right. --> |
| <attr name="nudgeRight" format="reference"/> |
| <!-- The ID of the target FocusArea when nudging up. --> |
| <attr name="nudgeUp" format="reference"/> |
| <!-- The ID of the target FocusArea when nudging down. --> |
| <attr name="nudgeDown" format="reference"/> |
| </declare-styleable> |
| </resources> |