简体   繁体   中英

Swipe refresh layout animation android

I am using eclipse for android development. I used swipeRefreshLayout in my app. My problem is, when I swipe the ring (circle animation) animation is not displayed instead the line horizontal type is displaying but the color what I fixed for swipe that's working fine and also I want to take some distance and time while I am swiping. Please help me how to I show the circle rotate animation on swiping.

 <android.support.v4.widget.SwipeRefreshLayout
                android:id="@+id/swipe_refresh"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:focusable="true" >

                <android.support.v4.view.ViewPager
                    android:id="@+id/pager"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="8" />
            </android.support.v4.widget.SwipeRefreshLayout>

and please refer the below image

在此处输入图片说明

i want to show like this

Thanks in advance

The answer for your question is that you can't do it with the support library. Android will handle which animation to show based on the OS version your app is being executed.

Take a look at this answer :

SwipeRefreshLayout takes care to show its predefined animation at its top for you

You can try libraries such as this , but I'd recommend sticking to Google on this one and let the animation be handled by itself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM