Android 如何将垂直滚动条限制为不包括工具栏的布局?

Android 如何将垂直滚动条限制为不包括工具栏的布局?,android,android-layout,android-scrollbar,Android,Android Layout,Android Scrollbar,我已经为UI屏幕设置了一个垂直滚动条,当设备具有横向方向时。滚动条位于屏幕的最右侧,从屏幕顶部到底部运行,包括屏幕顶部的传统工具栏。我希望滚动条只从工具栏下方的布局运行到屏幕底部。我在工具栏代码下面的线性布局上设置了sytle,但它没有按照我的预期工作。请告知 partial themes.xml: ... <style name="scrollbar_shape_style"> <item name="android:scrollbars">vertical&l

我已经为UI屏幕设置了一个垂直滚动条,当设备具有横向方向时。滚动条位于屏幕的最右侧,从屏幕顶部到底部运行,包括屏幕顶部的传统工具栏。我希望滚动条只从工具栏下方的布局运行到屏幕底部。我在工具栏代码下面的线性布局上设置了sytle,但它没有按照我的预期工作。请告知

partial themes.xml:

...
<style name="scrollbar_shape_style">
    <item name="android:scrollbars">vertical</item>
    <item name="android:scrollbarThumbVertical">@drawable/scrollbar_vertical_thumb</item>
    <item name="android:scrollbarSize">@dimen/custom_scroll_width</item>
</style>
...
部分land\layout.xml:

...
<?xml version="1.0" encoding="utf-8"?>

<ScrollView

xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:background="#FFFFFF"
android:focusableInTouchMode="true"
tools:context=".CardViewActivity">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"  >

<include
    android:id="@+id/toolbar"
    layout="@layout/toolbar" >
</include>

<LinearLayout
    android:id="@+id/GridLayout1"
    style="@style/scrollbar_shape_style"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/rounded_corner"
    android:layout_marginLeft="6dp"
    android:layout_marginStart="6dp"
    android:layout_marginRight="6dp"
    android:layout_marginEnd="6dp"
    android:layout_marginTop="6dp"
    android:layout_marginBottom="6dp"
    android:useDefaultMargins="false"
    android:orientation="vertical"
    android:paddingRight="2dp"
    android:paddingEnd="2dp"
    android:paddingLeft="0dp"
    android:paddingStart="0dp"  >
...
</LinearLayout>

</LinearLayout>

</ScrollView>

只需要让你的ScrollView将内线布局包起来,而不是外线布局。是的,应该这样做。谢谢你…显然我需要休息一下,因为你的答案很明显…特别是当我退一步看大局的时候。有时我们都需要一双眼睛。。。干杯