0
当使用CollapsingToolbarLayout,工具栏和嵌入ImageView时,我正面临一个奇怪的行为。 这里是我的代码:Glide + CollapsingToolbarLayout奇怪的行为
<android.support.design.widget.AppBarLayout
android:id="@+id/bla"
android:layout_width="match_parent"
android:layout_height="256dp">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/md_white_1000"
android:minHeight="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"
app:theme="@style/ThemeOverlay.AppCompat.Light" />
<ImageView
android:id="@+id/fragment_kids_profile_pic"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
而且滑翔建设者:
Glide.with(getActivity())
.load(file)
.fitCenter()
.into(profilePicture);
之前通过滑翔图像设置,工具栏行为确切的工作,因为它应该在我的情况“固定”。设置图像后,工具栏布局丢失,图像发生(滚动后)。 一些照片澄清:
任何帮助,将不胜感激!
这正是我需要的,非常感谢你! – Leonardo
@LeonardoFerrari Np! –