【发布时间】:2015-05-03 05:41:04
【问题描述】:
我定义了一个 Gradient Drawable:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:endColor="#2F3F59"
android:startColor="#4078A7"
android:type="linear"
android:angle="90" />
</shape>
我将它设置在我的工具栏上:
<style name="AppTheme.Toolbar" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:textColorPrimary">@color/textcolorsecundary</item>
<item name="actionMenuTextColor">@color/textcolorsecundary</item>
<item name="android:textColorSecondary">@color/textcolorsecundary</item>
<item name="android:background">@drawable/custom_background_blue</item>
</style>
这行得通! 但是:
这就是标题所发生的事情。它得到相同的渐变。这看起来真的很难看,所以我必须改变它。如何将该信息文本的背景设置为透明?
【问题讨论】:
-
你好。我不认为这可以帮助我。我怀疑标题是 ImageView,我也不知道如何访问工具栏标题的背景。
标签: android