2016-11-17 55 views
2

在我的应用我使用一个工具栏,它似乎有它周围的边框,我想摆脱: example of toolbar border如何删除工具栏周围的边框?

,我创造了它这样的:

<android.support.design.widget.AppBarLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:background="@color/transparent"> 

    <android.support.v7.widget.Toolbar 
     android:id="@+id/toolbar" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:gravity="center" 
     android:layout_gravity="center" 
     android:minHeight="?attr/actionBarSize"/> 

    </android.support.design.widget.AppBarLayout> 

</android.support.design.widget.CoordinatorLayout> 

和我这样使用:

<LinearLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical"> 

    <include 
     layout="@layout/app_bar_main_light" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" /> 
</LinearLayout> 

而且我从来没有找到指定这个边界的属性或样式。

回答

3

我尝试了没有AppBarLayout,它的工作。不要使用AppBarLayout,只需使用工具栏即可。

+0

是的,也适用于我。你知道AppBarLayout中有什么使这个“影子”? – Axl

+0

@Axl对不起,Idk。但是,您可以在Playstore应用程序的搜索栏中看到相同的布局,您可以尝试使它变得非常漂亮。 – joyl

相关问题