2017-05-26 94 views
0

我想让工具栏在片段透明,制作工具栏TRANSPARANT在Frgament

我这里有附加的图像,在这里我不能看到完整的图像,

是否可以帮助一些之一解决这个问题?

enter image description here

+0

HII,你为什么不把工具栏下面的图像?你究竟想在这里做什么? –

+0

可以减慢一些代码吗? – theLazyFinder

+0

我想将工具栏显示为transparent.Image视图必须在工具栏中开始 – kavie

回答

0

添加新的风格

<style name="CustomActionBar" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> 
    <item name="android:windowActionBarOverlay">true</item> 
    <!-- Support library compatibility --> 
    <item name="windowActionBarOverlay">true</item> 
</style> 

套入栏

<android.support.v7.widget.Toolbar 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/toolbar" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    app:theme="@style/CustomActionBar"/>