Ale*_*ora 2 tabs android material-design
我的工具栏和我的标签之间有一条线,我不知道为什么,因为如果我的应用程序是在Android 4的另一部智能手机上执行的,*线条就消失了......
我在工具栏上使用标签,我正在使用来自Google的SlidingTabLayout和SlidingTabStrip ...
我不知道是否有一些重要的信息可以说,但如果您需要了解更多信息,请告诉我......
Thankss
编辑:这里有一张关于这张照片......

这是活动的布局:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="es.alejandrolora.devhub.activitys.VideosCommentsActivity">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<es.alejandrolora.devhub.Util.SlidingTabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:elevation="2dp" />
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
Run Code Online (Sandbox Code Playgroud)
我在摩托罗拉G2的Android 5.0.2中尝试了我的应用程序并且该行不可见但是在Nexus 5上的我的版本(5.1)中,它是,但我解决了问题......
我只需要删除这个属性:
android:elevation="2dp"
Run Code Online (Sandbox Code Playgroud)
谢谢
给同一标高值都Toolbar和SlidingTabLayout.因为如果有一些高程,Toolbar它将再次显示该行.
在Lollipop中,Material设计引入了UI元素的高度,帮助用户理解每个元素的相对重要性,并将注意力集中在手头的任务上,以获取更多细节.阅读:https://developer.android.com/training/material /shadows-clipping.html
在短:提升Toolbar和SlidingTabLayout应相同.
| 归档时间: |
|
| 查看次数: |
1425 次 |
| 最近记录: |