zoukankan      html  css  js  c++  java
  • android 5.0 -- 主题

    系统提供默认的三种主题样式

    @android:style/Theme.Material (dark version)        
    @android:style/Theme.Material.Light (light version)     
    @android:style/Theme.Material.Light.DarkActionBar  

    三种样式对应如下图:

    当然你也可以自己去定义主题样式

     <resources>
      <!-- inherit from the material theme -->
      <style name="AppTheme" parent="android:Theme.Material">
        <!-- Main theme colors -->
        <!--   your app branding color for the app bar -->
        <item name="android:colorPrimary">@color/primary</item>
        <!--   darker variant for the status bar and contextual app bars -->
        <item name="android:colorPrimaryDark">@color/primary_dark</item>
        <!--   theme UI controls like checkboxes and text fields -->
        <item name="android:colorAccent">@color/accent</item>
      </style>
    </resources>

    如上图所示,可以对应修改指定位置的颜色来对样式进行自定义。
  • 相关阅读:
    ASP.NET 篇
    .NET Core 篇
    JS-CSS篇
    IIS使用篇
    WebService篇
    电脑使用篇
    数据库使用篇
    正则表达式篇
    Linux学习篇
    Leetcode 198. 打家劫舍 dp
  • 原文地址:https://www.cnblogs.com/androidsuperman/p/4984807.html
Copyright © 2011-2022 走看看