Xml文件  |  117行  |  4.92 KB

<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2018, 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 xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- ================ -->
    <!-- ActionBar Themes -->
    <!-- ================ -->
    <eat-comment />

    <!-- Styles for action buttons -->
    <style name="Widget.ActionButton" parent="android:Widget.DeviceDefault.Button">
        <!-- Force the vector drawables to the right size. -->
        <item name="android:layout_width">@dimen/control_bar_button_size</item>
        <item name="android:layout_height">@dimen/control_bar_button_size</item>
        <!-- This padding is used to force resizing of provided icons. -->
        <item name="android:padding">@dimen/control_bar_button_padding</item>
        <!-- Note: fitCenter makes icons disappear if the view is too small... -->
        <item name="android:scaleType">fitCenter</item>
        <item name="android:layout_gravity">center</item>
        <item name="android:background">@drawable/control_bar_button_background</item>
        <item name="android:tint">@color/icon_tint</item>
    </style>

    <!-- Styles for car tab view -->
    <style name="CarTabItemText">
        <item name="android:textAppearance">@style/TextAppearance.Body3</item>
        <item name="android:textColor">@color/car_tab_item_selector</item>
        <item name="android:layout_width">@dimen/car_tab_width</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:singleLine">true</item>
        <item name="android:gravity">center</item>
    </style>

    <style name="CarTabItemIcon">
        <item name="android:layout_width">@dimen/car_tab_icon_size</item>
        <item name="android:layout_height">@dimen/car_tab_icon_size</item>
        <item name="android:scaleType">fitCenter</item>
        <item name="android:tint">@color/car_tab_item_selector</item>
        <item name="android:tintMode">src_in</item>
    </style>

    <style name="CarTabItemBackground">
        <item name="android:background">?android:attr/selectableItemBackground</item>
    </style>

    <!-- Styles for text. Sub1-3 are not included here as their use should be exceptional -->
    <style name="TextAppearance">
        <item name="android:fontFamily">roboto-regular</item>
        <item name="android:textColor">@color/primary_text_color</item>
    </style>

    <style name="TextAppearance.Display1" parent="TextAppearance">
        <item name="android:textSize">56sp</item>
        <item name="android:letterSpacing">@dimen/letter_spacing_display1</item>
    </style>

    <style name="TextAppearance.Display2" parent="TextAppearance">
        <item name="android:textSize">44sp</item>
        <item name="android:letterSpacing">@dimen/letter_spacing_display2</item>
    </style>

    <style name="TextAppearance.Display3" parent="TextAppearance">
        <item name="android:textSize">36sp</item>
        <item name="android:letterSpacing">@dimen/letter_spacing_display3</item>
    </style>

    <style name="TextAppearance.Body1" parent="TextAppearance">
        <item name="android:textSize">32sp</item>
        <item name="android:letterSpacing">@dimen/letter_spacing_body1</item>
    </style>

    <style name="TextAppearance.Body2" parent="TextAppearance">
        <item name="android:textSize">28sp</item>
        <item name="android:letterSpacing">@dimen/letter_spacing_body2</item>
    </style>

    <style name="TextAppearance.Body3" parent="TextAppearance">
        <item name="android:textSize">24sp</item>
        <item name="android:letterSpacing">@dimen/letter_spacing_body3</item>
    </style>

    <style name="MinimizedControlBarTitle" parent="TextAppearance.Body1"/>
    <style name="MinimizedControlBarSubtitle" parent="TextAppearance.Body3"/>

    <!-- Styles for ControlBar -->
    <style name="ControlBar">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
    </style>

    <style name="MinimizedControlBar">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">@dimen/minimized_control_bar_height</item>
    </style>

    <style name="PagedRecyclerView">
        <item name="gutter">both</item>
        <item name="scrollBarPosition">start</item>
        <item name="scrollBarAboveRecyclerView">true</item>
    </style>
    <style name="PagedRecyclerView.NestedRecyclerView">
    </style>
</resources>