admin管理员组文章数量:1400572
I have created BottomNavigationView
with four fragments
in it. also i have added TabLayout
in one of four fragment but while running app i am getting action bar size
space between TabLayout
and Activity
's ActionBar
. below attached screenshot for your reference, how should i remove that space.
here's my fragment code
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=";
xmlns:app=";
android:layout_height="match_parent"
android:layout_width="match_parent">
<com.google.android.material.tabs.TabLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/fragment_fo_rounds_tabs" />
<androidx.viewpager.widget.ViewPager
android:layout_height="match_parent"
android:layout_width="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_below="@id/fragment_fo_rounds_tabs"
android:id="@+id/fragment_fo_rounds_view_pager" />
</RelativeLayout>
screenshot image
I tried adding Toolbar
and TabLayout
inside AppbarLayout
in layout then adding ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar);
in fragments onCreateView
but it doesn't work.
本文标签: androidHow to remove extra space between action bar and tablayoutStack Overflow
版权声明:本文标题:android - How to remove extra space between action bar and tablayout - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744216718a2595672.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论