Android上的后续动画

Android上的后续动画,android,animation,views,Android,Animation,Views,我有下面的布局 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:l

我有下面的布局

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="240dp"
            android:background="#123"/>
        <TextView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="Hello world"/>

    </LinearLayout>
</ScrollView>


当有人在ScrollView中向下滚动时,我想增加ImageView的大小。当ImageView变得足够大以至于可以滚动时,我想完成这个活动。任何建议都会非常有用。

要达到这一效果,您需要使用
协调器或布局
,这样您就有了标题,并在滚动时将其隐藏起来


看看这个:

我不想在我的特殊情况下使用CoordinatorLayout。此外,协调器布局不会超出其预定义的宽度,我想它不支持ScrollView。您可以尝试使用其中一个视差库:当然,我可以使用视差获得更好的动画效果。但我想要的只是在ScrollView的下滚动条上增加ImageView。不管怎样,我想协调器布局本身就有视差效果。好的,在这种情况下,你想看看动画,使用scaleX()函数可以增加大小。检查:是的,我想使用ViewPropertyAnimator,但我想知道如何以及在何处为scaleX()设置值。因为我想在向下滚动时增加ImageView的大小,而不是同时。