Xml文件  |  90行  |  4.95 KB

<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2015 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>
    <style name="Theme.TV" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
        <item name="android:colorAccent">@color/accent_color</item>
        <item name="android:colorControlActivated">@color/control_activated_color</item>
        <item name="android:colorPrimary">@color/primary_color</item>
        <item name="android:windowBackground">@color/common_tv_background</item>

        <!-- From Theme.Leanback to use Leanback library without applying Theme. -->
        <!-- For SearchFragment -->
        <item name="browsePaddingStart">@dimen/lb_browse_padding_start</item>
        <item name="browsePaddingEnd">@dimen/lb_browse_padding_end</item>
        <item name="browsePaddingBottom">@dimen/lb_browse_padding_bottom</item>
        <item name="rowHorizontalGridStyle">@style/Widget.Leanback.Row.HorizontalGridView</item>
        <item name="rowsVerticalGridStyle">@style/Widget.Leanback.Rows.VerticalGridView</item>

        <!-- For ImageCardView -->
        <item name="imageCardViewStyle">@style/Widget.Leanback.ImageCardViewStyle</item>
    </style>

    <style name="Theme.TV.MainActivity" parent="@style/Theme.TV">
        <item name="setupCommonGuidanceBackground">@color/setup_background</item>
        <item name="doneButtonContainerStyle">@style/TV.DoneButtonContainerStyle</item>
        <item name="guidedStepTheme">@style/Theme.TV.GuidedStep</item>
    </style>

    <style name="Theme.TV.dialog.Fullscreen" parent="@style/Theme.TV">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowAnimationStyle">@null</item>
    </style>

    <style name="Theme.TV.dialog.HalfSizedDialog" parent="@style/Theme.TV">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:backgroundDimEnabled">true</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowAnimationStyle">@style/TV.HalfSizedDialogAnim</item>
    </style>

    <style name="Theme.SelectInputActivity" parent="@android:style/Theme.Material.NoActionBar">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowAnimationStyle">@style/Animation.SelectInputActivity</item>
        <item name="android:backgroundDimEnabled">true</item>
    </style>

    <style name="Theme.TV.GuidedStep" parent="Theme.Setup.GuidedStep">
        <item name="guidedActionsBackground">@color/setup_actions_background</item>
    </style>

    <style name="Theme.TV.Dvr.GuidedStep" parent="Theme.Setup.GuidedStep">
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="guidedStepBackground">@color/common_tv_background</item>
        <item name="guidedActionsBackground">@color/common_tv_background</item>
        <item name="guidanceTitleStyle">@style/TV.Dvr.GuidanceTitleStyle</item>
        <item name="guidanceDescriptionStyle">@style/TV.Dvr.GuidanceDescriptionStyle</item>
        <item name="guidedActionsListStyle">@style/TV.Dvr.GuidedActionsListStyle</item>
        <item name="guidedActionItemContainerStyle">@style/TV.Dvr.GuidedActionItemContainerStyle</item>
        <item name="guidedActionContentWidthWeight">@string/lb_guidedactions_width_weight</item>
    </style>

    <style name="Theme.TV.Onboarding" parent="Theme.LeanbackBase">
        <item name="onboardingHeaderStyle">@style/Widget.Leanback.OnboardingHeaderStyle</item>
        <item name="onboardingTitleStyle">@style/Widget.Leanback.OnboardingTitleStyle</item>
        <item name="onboardingDescriptionStyle">@style/Widget.Leanback.OnboardingDescriptionStyle</item>
        <item name="onboardingNavigatorContainerStyle">@style/Widget.Leanback.OnboardingNavigatorContainerStyle</item>
        <item name="onboardingPageIndicatorStyle">@style/Widget.Leanback.OnboardingPageIndicatorStyle</item>
        <item name="onboardingStartButtonStyle">@style/Widget.Leanback.OnboardingStartButtonStyle</item>
        <item name="onboardingLogoStyle">@style/Widget.Leanback.OnboardingLogoStyle</item>
    </style>
</resources>