Android ShowcaseView的覆盖层不透明

Android ShowcaseView的覆盖层不透明,android,showcaseview,Android,Showcaseview,我将ShowcaseView()与以下代码一起使用: ViewTarget target = new ViewTarget(R.id.targetButton, this); ShowcaseView sv = new ShowcaseView.Builder(this, true) .setTarget(target) .setContentTitle("Hello world") .setCont

我将ShowcaseView()与以下代码一起使用:

ViewTarget target = new ViewTarget(R.id.targetButton, this);
ShowcaseView sv = new ShowcaseView.Builder(this, true)
                .setTarget(target)
                .setContentTitle("Hello world")
                .setContentText("This is the important counter")
                .setStyle(R.style.CustomShowcaseTheme2)
                .setShowcaseEventListener(this)
                .build();
以及styles.xml:

<style name="CustomTitle2" parent="TextAppearance.ShowcaseView.Title">
        <item name="android:textColor">#25467A</item>
    </style>
<style name="CustomShowcaseTheme2" parent="ShowcaseView.Light">
        <item name="sv_backgroundColor">#22B3E5FC</item>
        <item name="sv_showcaseColor">#25467A</item>
        <item name="sv_buttonText">Close</item>
        <item name="sv_titleTextAppearance">@style/CustomTitle2</item>
</style>

#25467A
#22B3E5FC
#25467A
接近
@样式/自定义标题2
这似乎是工作除了覆盖本身不是透明的。这意味着您无法在其下看到任何内容(页面上除了showcase之外的内容)。我试图改变不同的颜色(sv_背景色)以及家长,但没有工作

我使用的是最新版本(5.0)

有什么想法吗

编辑 我的部分主题:

<style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/theme1_primary</item>
        <item name="colorPrimaryDark">@color/theme1_primary_dark</item>
        <item name="colorAccent">@color/theme1_accent</item>
        <item name="android:textColorPrimary">@color/theme1_primary_text</item>
        <item name="android:textColorSecondary">@color/theme1_secondary_text</item>
        <item name="android:textColorPrimaryInverse">@color/theme1_primary_light</item>
        <item name="android:textColorSecondaryInverse">@color/theme1_secondary_text</item>

        <item name="colorDivider">@color/theme1_divider</item>
        <item name="colorIcons">@color/theme1_icons</item>
        <item name="styleToolbar">@style/theme1_toolbar</item>
        <item name="styleToolbarMenu">@style/theme1_toolbar_menu</item>
        <item name="android:background">@color/white</item>
</style>

@颜色/主题1_主要
@颜色/主题1\u主要\u深色
@颜色/主题1_重音
@颜色/主题1\u主\u文本
@颜色/主题1\u次要\u文本
@颜色/主题1\u主灯
@颜色/主题1\u次要\u文本
@颜色/主题1_分隔符
@颜色/主题1_图标
@样式/主题1\u工具栏
@样式/主题1\u工具栏\u菜单
@颜色/白色

我已经编辑了我的答案。这是一个定制示例。这是我的教程的全部配置

<style name="CustomShowcaseTheme" parent="ShowcaseView.Light">
        <item name="sv_backgroundColor">@color/tutorial_background</item>
        <item name="sv_buttonBackgroundColor">#CF3119</item>
        <item name="sv_buttonText">Close</item>
        <item name="sv_titleTextAppearance">@style/CustomTitle</item>
        <item name="sv_detailTextAppearance">@style/CustomDetailText</item>
 </style>

@颜色/背景
#CF3119
接近
@样式/自定义标题
@样式/自定义详细信息文本
别忘了在主题配置中链接它

<style name="AppTheme" parent="@android:style/Theme.Holo.Light">
        <!-- Customize your theme here. -->
        <item name="showcaseViewStyle">@style/CustomShowcaseTheme</item>
</style>

@风格/定制Showcase主题
我可以毫无问题地配置一切

尝试使用不透明度,使用像#11B3E5FC或#EEB3E5FC(相同颜色不同的alpha)这样的颜色


我希望这会对你有所帮助

谢谢。但它无法编译:“无法解析符号‘android:sv_backgroundColor’。对不起,我不适用。您确定您使用的是最新版本(5.0)吗?”版本?是的,我是。我的目标sdk是22,我正在使用Nexus 6进行开发。这个问题显然是由于XML配置以外的原因造成的。检查是否在同一地点/时间显示多个showcase(这可能会使您的透明性消失),重建项目等。如果你给我更多信息,我会帮助你。我已经用更多细节更新了问题。我没有做你的任何建议。:-)我看不到我告诉你的代码的第二部分(将你的样式链接到你的主题。我在XML中设置样式,没有编程方式。因此,我将删除你的“setStyle(…)“从Java方面,添加主题的链接:
@style/CustomShowcaseTheme2
如果您的问题仍然存在,也许今天或明天(繁忙的日子),我将能够上传我制作的github模块,它使showcase management让您变得抽象。