android - 在 Android 上跟随动画

标签 android animation view

我有以下布局。

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

enter image description here

我想在有人向下滚动 ScrollView 时增加 ImageView 的大小。在 ImageView 变得足够大可以滚动的特定时间,我想完成 Activity 。任何建议都会非常有帮助。

最佳答案

要实现该效果,您需要使用 CoordinatorLayout,这样您就有了标题并在滚动时将其隐藏。

看看这个:https://guides.codepath.com/android/Handling-Scrolls-with-CoordinatorLayout

关于android - 在 Android 上跟随动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35800208/

相关文章:

android - WebView setDefaultZoom 弃用

android - 如何在 Android 中对齐 GridView 顶部的项目?

javascript - 鼠标悬停时jquery连续动画

c# - WPF:DoubleAnimation "To"属性绑定(bind)计时

ios - 如何在 Objective C 中为 float 的 UIView 设置动画

android - 如何通过android中的布局xml将数组设置为任何 View 的标签

java - 如何在 Firebase 中检索已推送给子级的最新数据?

android - 融合位置提供者 API。 GPS 位置之间的转换

android - 双击自定义 View 打开 2 个 Activity

java - 举个例子, Root View 到底是什么?