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! –