如何删除此行:
我试图移除海拔:
<the.example.com.slidingtab.SlidingTabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="2dp"
android:background="@color/colorPrimary"/>
但我希望在滑动标签下有阴影。
答案 0 :(得分:2)
为Android 5.0 API级别21 LOLLIPOP定义了高程。
我不知道你的目的是什么,但是出于我的目的
我会定位21之前的设备,并在其上绘制阴影的视图(如果没有其他帮助,<FrameLayout...>
可以将其子项绘制在另一个之上)。
例如, horiz_line.xml
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="2dip"
android:layout_width="match_parent"
android:background="#000000"
/>
从<LinearLayout ...>
使用
<include layout="@layout/horiz_line"/>
绘制一条简单的水平线。如果需要阴影,可以使用9补丁图像,在透明背景上绘制阴影。