如何在android中创建具有标题的可反弹滚动视图?

如何在android中创建具有标题的可反弹滚动视图?,android,scrollview,android-scrollview,Android,Scrollview,Android Scrollview,我希望在我的项目中有一个可弹跳的滚动视图(类似iPhone)。我找到一些关于overscroll的文章,并像这样使用它。但我不知道如何将滚动视图设置为其标题 我还尝试在自定义滚动视图之前添加一个视图,但没有成功(最后是代码) 我需要一个附加到scrollview的视图如何才能做到这一点?任何想法都将不胜感激 <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_conten

我希望在我的项目中有一个可弹跳的滚动视图(类似iPhone)。我找到一些关于overscroll的文章,并像这样使用它。但我不知道如何将滚动视图设置为其标题

我还尝试在自定义滚动视图之前添加一个视图,但没有成功(最后是代码)

我需要一个附加到scrollview的视图如何才能做到这一点?任何想法都将不胜感激

<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:background="#FF8080"
    >
    <ImageView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
</LinearLayout>
<com.amix.tstsrc.MyScrollView
    android:id="@+id/my_scrollView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true" 
    >
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="#8585FF">
        <TextView
            android:id="@+id/help_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@android:color/white" />
    </LinearLayout>
</com.amix.tstsrc.MyScrollView>

请过目。我希望这就是你要找的


如果您希望滚动视图的标题保持不变,并且列表滚动和反弹,那么请尝试使用addHeaderView而不是scrollview来选择listview。

谢谢,但我不希望标题保持不变,我希望标题被隐藏,并且每次出现过度滚动时都会显示,而不是boldoverScrollBy methode显示的空白。比如,我甚至可以看一下教程。您必须稍微修改代码,因为本教程是关于为listview提供3d视图的。