如何删除工具栏和tablayout之间的深线,我搜索谷歌有人说,添加一些高度到工具栏和tablayout,我做但但它没有工作,从工具栏中删除高程和tablyout后,它也无法正常工作.请帮帮我:
tablayout_xml:
<relativeLayout androID:ID="@+ID/main_layout" xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:app="http://schemas.androID.com/apk/res-auto" xmlns:tools="http://schemas.androID.com/tools" androID:layout_wIDth="match_parent" androID:layout_height="match_parent"> <androID.support.design.Widget.TabLayout androID:ID="@+ID/tab_layout" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:layout_below="@+ID/toolbar" app:tabGravity="fill" androID:elevation="2dp" app:tabMode="fixed" app:Font="Nexa Bold.otf" androID:minHeight="?attr/actionbarSize" androID:background="@color/appbarcolor" androID:theme="@style/themeOverlay.AppCompat.Dark.Actionbar"/> <androID.support.v4.vIEw.VIEwPager androID:ID="@+ID/pager" androID:layout_wIDth="match_parent" androID:layout_height="fill_parent" androID:layout_below="@ID/tab_layout"/></relativeLayout>
activity_toolbar:
<androID.support.v4.Widget.DrawerLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:app="http://schemas.androID.com/apk/res-auto" androID:ID="@+ID/drawer_layout" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:fitsSystemwindows="true"> <androID.support.design.Widget.CoordinatorLayout androID:ID="@+ID/container_main" androID:layout_wIDth="match_parent" androID:layout_height="match_parent"> <relativeLayout androID:ID="@+ID/rl" androID:layout_wIDth="match_parent" androID:layout_height="match_parent"> <androID.support.design.Widget.AppbarLayout androID:ID="@+ID/app_bar" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:theme="@style/themeOverlay.AppCompat.Dark.Actionbar"> <androID.support.v7.Widget.Toolbar androID:ID="@+ID/toolbar" androID:layout_wIDth="match_parent" androID:layout_height="?attr/actionbarSize" androID:background="@color/appbarcolor" androID:elevation="2dp" app:layout_scrollFlags="scroll|enteralways" app:popuptheme="@style/themeOverlay.AppCompat.light" > <TextVIEw androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textSize="@dimen/_15sdp" androID:textStyle="bold" androID:textcolor="#fff" androID:layout_gravity="center" androID:ID="@+ID/toolbar_Title" /> <linearLayout androID:ID="@+ID/clearllBtn" androID:layout_wIDth="50dp" androID:layout_height="50dp" androID:layout_marginRight="5dp" androID:layout_gravity="right" androID:visibility="gone" androID:background="@drawable/toolbar_ripple" androID:gravity="center_vertical|center_horizontal"> <TextVIEw androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:textSize="@dimen/appbar_txt_size" androID:text="Clear" androID:textcolor="@color/white" androID:gravity="center" androID:textStyle="bold" androID:ID="@+ID/clear_btn"/> </linearLayout> </androID.support.v7.Widget.Toolbar> </androID.support.design.Widget.AppbarLayout> <FrameLayout androID:layout_below="@+ID/app_bar" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:focusable="false" androID:focusableIntouchMode="false" androID:background="@color/faintwhite" androID:ID="@+ID/frame_container"> </FrameLayout> </relativeLayout> </androID.support.design.Widget.CoordinatorLayout> <!-- Navigation Drawer--> <androID.support.v7.Widget.RecyclerVIEw androID:ID="@+ID/recyclerVIEw" androID:layout_wIDth="300dp" androID:layout_height="match_parent" androID:layout_gravity="left" androID:background="@color/white" > </androID.support.v7.Widget.RecyclerVIEw></androID.support.v4.Widget.DrawerLayout>
解决方法:
我有同样的问题,我使用的是androID:elevation =“0dp”,但它没有用.在xml中的AppbarLayout中,设置app:elevation =“0dp”而不是androID:elevation =“0dp”.
总结以上是内存溢出为你收集整理的android – 工具栏和Tabs之间的线全部内容,希望文章能够帮你解决android – 工具栏和Tabs之间的线所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)