2 ooomiao oOOMIAO 于 2012.11.19 11:01 提问

iPhone-自定义动作栏的问题

自定义的ActionBar,效果如下图:

enter image description here

我覆盖了背景,想要覆盖底边框和在actionBar禁用阴影:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item>
        <bitmap
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:src="@drawable/actionbar_bg"
            android:tileMode="repeat" />
    </item>

</layer>

1个回答

loFataMer
loFataMer   2012.11.19 11:34
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Bottom Line -->
    <item>
        <shape android:shape="rectangle">
             // you can change here
            <solid android:color="@color/action_bar_line_color" />
        </shape>
    </item>

    <!-- Color of your action bar -->
    <item android:bottom="2dip">
        <shape android:shape="rectangle">
            <solid android:color="@color/action_bar_color" />
        </shape>
    </item>
</layer-list>

肯定能用~

Csdn user default icon
上传中...
上传图片
插入图片