【问题标题】:White Strip at Bottom In Recycler view Inside Tab layout回收站视图中底部的白色条带在选项卡布局内
【发布时间】:2018-02-21 08:11:14
【问题描述】:

在this image,底部有一条白条。我无法通过更改滚动标志来摆脱它。我的这个页面的 XML 文件在选项卡布局内有一个视图分页器、框架和回收器视图。它是:

  <?xml version="1.0" encoding="utf-8"?>
  <android.support.design.widget.CoordinatorLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".Activity.MainActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/quora"
        android:fitsSystemWindows="true"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar_main"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/quora"
            app:layout_scrollFlags="scroll"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

        <android.support.design.widget.TabLayout
            android:id="@+id/tab_layout_main"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabIndicatorColor="@color/colorAccent" />
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab_main"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="@dimen/fab_margin"
        android:src="@drawable/ic_launcher_background"
        android:visibility="gone" />

</android.support.design.widget.CoordinatorLayout>

有人知道怎么去掉底部的白条吗?

【问题讨论】:

    标签: android strip


    【解决方案1】:

    这个问题是通过在 mainl.xml 文件中放置工具栏内容的高度来造成的。

    通过删除它,我能够修复错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-17
      • 2021-12-04
      • 2020-12-12
      • 1970-01-01
      • 1970-01-01
      • 2015-10-28
      • 1970-01-01
      相关资源
      最近更新 更多