
嗨,我需要在我的标签布局下添加阴影(如在Skype中).
我的活动xml:
<relativeLayout androID:layout_wIDth="match_parent" androID:layout_height="match_parent"> <androID.support.v7.Widget.Toolbar xmlns:local="http://schemas.androID.com/apk/res-auto" androID:ID="@+ID/toolbar" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:minHeight="?attr/actionbarSize" androID:background="@color/splashGreentop" local:theme="@style/themeOverlay.AppCompat.Dark.Actionbar" local:popuptheme="@style/themeOverlay.AppCompat.light" /> <androID.support.design.Widget.TabLayout androID:ID="@+ID/tab_layout" androID:layout_below="@+ID/toolbar" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:background="?attr/colorPrimary" androID:elevation="0dp" androID:minHeight="?attr/actionbarSize" /> <FrameLayout androID:layout_wIDth="match_parent" androID:layout_below="@+ID/tab_layout" androID:ID="@+ID/tabContainer" androID:layout_height="match_parent" /></relativeLayout>当我向Tablayout添加androID:elevation =“10dp”时,阴影被添加到底部和顶部..我只需要底部.见图片……
我怎样才能做到这一点 ?
提前致谢.
解决方法:
只需向Tablayout添加高程(0dp – 25dp)即可.有关高程的更多信息,请阅读material design指南.
androID:elevation="10dp"编辑:
将它添加到tablayout和工具栏
<androID.support.v7.Widget.Toolbar xmlns:local="http://schemas.androID.com/apk/res-auto" androID:ID="@+ID/toolbar" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:minHeight="?attr/actionbarSize" androID:background="@color/splashGreentop" local:theme="@style/themeOverlay.AppCompat.Dark.Actionbar" local:popuptheme="@style/themeOverlay.AppCompat.light" androID:elevation="10dp" /><androID.support.design.Widget.TabLayout androID:ID="@+ID/tab_layout" androID:layout_below="@+ID/toolbar" androID:layout_wIDth="match_parent" androID:layout_height="wrap_content" androID:background="?attr/colorPrimary" androID:minHeight="?attr/actionbarSize" androID:elevation="10dp"/> 总结 以上是内存溢出为你收集整理的android – 如何将底部阴影添加到选项卡布局全部内容,希望文章能够帮你解决android – 如何将底部阴影添加到选项卡布局所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)