emilsjolander / android-FlipView

A small, easy to use android library for implementing flipping between views as seen in the popular Flipboard application
Apache License 2.0
924 stars 273 forks source link

Pull to refresh #34

Open manhhoangxuan opened 10 years ago

manhhoangxuan commented 10 years ago

Hi emilsjolander, thank you for sharing great lib. I has use this lib in my app. This working fine, however, if you could train for me. How can i implement pull to refresh like flipboard. Thanks in advance!

emilsjolander commented 10 years ago

You must pass a OnOverFlipListener to the FlipView with setOnOverFlipListener(). This callback will tell you when the flipview has "over flipped" and you can choose to refresh your data depending on this.

manhhoangxuan commented 10 years ago

Hi emilsjolander, Thank you for reply my question I can make this refresh, however, i don't know how can i make a screen "release to refresh" at the first of list. could you make a sample for this. Thanks in advance!

emilsjolander commented 10 years ago

you could just have a view behind the flipview :)

manhhoangxuan commented 10 years ago

Hi emilsjolander , I was add an textview for test like this, but it't not working < FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:flipview="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000"> < TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top" android:text="release to refresh" android:textSize="32sp" android:visibility="visible" /> < se.emilsjolander.flipview.FlipView android:id="@+id/flip_view" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff" flipview:orientation="vertical" tools:context=".MainActivity" > < /se.emilsjolander.flipview.FlipView> < TextView android:id="@+id/empty_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top" android:text="hihi my name is Hoang Manh" android:textSize="32sp" android:visibility="visible" /> </ FrameLayout>" And please guide for me, how can i catch "release" action in onOverFlip

Thanks in advance!

manhhoangxuan commented 10 years ago

Any help me please

emilsjolander commented 10 years ago

I know i have done this but i can't remember exactly how i did it. I won't have time to load up the project and play around with it until sometime next week.

padmarajkb commented 8 years ago

Emils, can you please help me here?