我尝试自定义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>
答案 0 :(得分: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>