Get Rid Of This Line Separator Between My Action-bar And Pagertabview:
I'm trying to get rid of this line separator between my action-bar and pagertabview: How did Google achieve this?
Solution 1:
That isn't really a line separator, it is a shadow indicating that the Action Bar is at a higher elevation than the tab bar.
Assuming you are using AppCompat, you can use ViewCompat.setElevation()
to set the elevation on your tabs for devices that support it (those running API 21+).
Your code might look something like this:
Viewtabs= findViewById(R.id.the_tabs_id)
ViewCompat.setElevation(tabs, getResources().getDimension(R.dimen.action_bar_elevation));
I am using 4dp as the action_bar_elevation
dimension.
Pre 5.0:
<stylename="AppTheme"parent="@android:style/Theme.Holo.Light"><itemname="android:windowContentOverlay">@null</item></style>
Post a Comment for "Get Rid Of This Line Separator Between My Action-bar And Pagertabview:"