Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/192.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android AppBar布局权重_Android - Fatal编程技术网

Android AppBar布局权重

Android AppBar布局权重,android,Android,我有个问题,我有一个布局。里面有折叠工具栏布局和线性布局。问题是CollasingToolbarLayout内部有一个imageView,如果图像太大,则无法看到LinearLayout。我希望AppBarLayout有权重参数,但不幸的是它没有 <android.support.design.widget.AppBarLayout android:id="@+id/app_bar" android:layout_width="match_parent" andro

我有个问题,我有一个布局。里面有折叠工具栏布局和线性布局。问题是CollasingToolbarLayout内部有一个imageView,如果图像太大,则无法看到LinearLayout。我希望AppBarLayout有权重参数,但不幸的是它没有

<android.support.design.widget.AppBarLayout
    android:id="@+id/app_bar"
    android:layout_width="match_parent"
    android:layout_height="@dimen/app_bar_height"
    android:fitsSystemWindows="true"
    android:theme="@style/AppTheme.AppBarOverlay">

    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/toolbar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true"
        app:contentScrim="?attr/colorPrimary"
        app:layout_scrollFlags="scroll|exitUntilCollapsed">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/index"
            android:scaleType="fitXY"
            app:layout_collapseMode="parallax"/>

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:layout_collapseMode="pin"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="hkdlf,kdg"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="hkdlf,kdg,,,,,,,,,,,,,,,,,,,,,,,,"/>
    </LinearLayout>




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

尝试将折叠工具栏布局中的布局高度从“包裹内容”更改为“匹配父项”。