zoukankan      html  css  js  c++  java
  • 自定义ActionBar背景(分别针对3.0以下和3.0以上的版本)

    官方原文:http://developer.android.com/training/basics/actionbar/styling.html

    针对3.0以上的版本:

    <?xml version="1.0" encoding="utf-8"?>
    <resources xmlns:android="http://schemas.android.com/apk/res/android">
    
        <style name="CustomActionBarTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
            <item name="android:actionBarStyle">@style/CustomBackground</item>
        </style>
    
        <style name="CustomBackground" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
            <item name="android:background">@drawable/actionbar_background</item>
        </style>
        
        <style 
            name="CustomActionBarOverlayTheme"
            parent="@android:style/Theme.Holo"
            >
            <item name="android:windowActionBarOverlay">true</item>
            
        </style>
    
    </resources>

    针对3.0以下版本:要导入v7兼容包。

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        
        <style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
            <item name="actionBarStyle">@style/CustomBackground</item>
        </style>
    
        <style name="CustomBackground" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
            <item name="background">@drawable/actionbar_background</item>
        </style>
        
        <style 
            name="CustomActionBarOverlayTheme"
            parent="@style/Theme.AppCompat"
            >
            <item name="windowActionBarOverlay">true</item>
            
        </style>
        
    </resources>
  • 相关阅读:
    DB9 ------ 接口定义
    以太网 ------ Auto-Negotiation(自动协商)
    Qt ------ 添加某个功能,比如(QSerialPort)注意事项
    Modbus
    Centos7.5 安装JDK1.8 步骤
    Kafka 消息中间件
    使用RabbitMQ实现分布式事务
    RabbitMq的环境安装
    RabbitMQ消息中间件的用法
    基于Docker+Jenkins实现自动化部署
  • 原文地址:https://www.cnblogs.com/rainmer/p/4255555.html
Copyright © 2011-2022 走看看