2012-11-18 167 views
0

我嘗試自定義ActionBar。這裏是我的嘗試:enter image description here自定義操作欄

我覆蓋了背景,我想覆蓋底部邊框並禁用操作欄下的投影。

<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> 

回答

3

參閱本url,我認爲它有助於你

<?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> 
+0

我檢查了它,但使用了同樣的方式。按照這種方式,我無法覆蓋下邊框。 – misco

+0

嗨編輯我的文章,希望它的作品 – Talha

+0

謝謝,它的作品! – misco