在我的手机中,CountryActivityInfo.java我有一个折叠式工具栏,宽度和高度都设置为,match-parent因此它可以占据整个手机屏幕。当我向上滚动时,工具栏将达到固定200dp高度。现在,它看起来像这样:我想在折叠工具栏时出现的白色屏幕上显示一个垂直滚动视图,其中包含一个文本视图。我怎样才能做到这一点?我已经尝试过这种方式: <android.support.design.widget.AppBarLayout android:id="@+id/testeparainfo" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/actionBarDivider"> <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/backgroundcollapsedtoolbarinfo" android:layout_width="match_parent" android:layout_height="match_parent" app:expandedTitleMarginEnd="64dp" app:expandedTitleMarginStart="48dp" app:layout_scrollFlags="exitUntilCollapsed|scroll"> <ImageView android:id="@+id/imgCountryInfoFoto" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" /> <ImageView android:id="@+id/imgCountryInfoEscuro" android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:background="@drawable/background_pais_info" android:scaleType="centerInside" /> <android.support.v7.widget.Toolbar android:id="@+id/toolbaridinfo" android:layout_width="match_parent" android:layout_height="200dp" app:layout_collapseMode="pin" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> </android.support.v7.widget.Toolbar> 但是,当我这样做时,文本视图进入折叠的工具栏内,并随工具栏一起折叠。顺便说一下,所有XML都包裹在一个Coordinator Layout!!!中。
添加回答
举报
0/150
提交
取消