0

I want a bouncable scrollview (iPhone like) in my project. I find some articles about overscroll and use it like This class here. But i dont know how to set over scroll view as its header.

I also tried adding a view simply before my custom scroll view but it didn't work (codes at the end).

I need a view attached to scrollview how can i do this? any idea will be grateful.

<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>
Community
  • 1
  • 1
Amin
  • 11
  • 1
  • 3

1 Answers1

0

Please go through https://github.com/Larphoid/android-Overscroll-ListView. I hope this is what you are looking for.

In case you want scrollview with header where header stays and the list scrolls and bounces then try to go for listview by using addHeaderView instead of Scrollview.

MobDev
  • 66
  • 3
  • Thank you, but i dont want header stays, I want the header to be hidden and Every time overscroll happened appears instead of white space that **bold**overScrollBy methode shows. like iOS – Amin Apr 12 '13 at 06:53
  • Even have a look at [this](http://developer.sonymobile.com/2010/05/20/android-tutorial-making-your-own-3d-list-part-1/) tutorial. You would have to modify the code a bit as the tutorial is about giving 3d view to listview. – MobDev Apr 12 '13 at 12:41