我有以下布局。
<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 变得足够大可以滚动的特定时间,我想完成 Activity 。任何建议都会非常有帮助。
最佳答案
要实现该效果,您需要使用 CoordinatorLayout
,这样您就有了标题并在滚动时将其隐藏。
看看这个:https://guides.codepath.com/android/Handling-Scrolls-with-CoordinatorLayout
关于android - 在 Android 上跟随动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35800208/