2015-10-19 120 views
0

我使用Eclipse Android開發。我在我的應用程序中使用了swipeRefreshLayout。我的問題是,當我滑動戒指(圓形動畫)時,不會顯示動畫,而是顯示線條水平類型,但是我固定的滑動的顏色工作正常,而且我想在滑動時拍攝一些距離和時間。請幫助我如何在滑動時顯示圓形旋轉動畫。刷卡刷新佈局動畫的android

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

,並請參閱下面的圖像

enter image description here

我想說明這樣

在此先感謝

+0

你在使用添加swipeRefreshLayout?你可以粘貼布局文件嗎? –

+0

你會請參考我的編輯帖子剛纔我編輯我的問題與代碼和圖像 – user1784588

+0

什麼是你的targetSdkVersion? –

回答

1

你的問題的答案是,你不能與支持庫一起使用。 Android將根據您的應用程序正在執行的操作系統版本來處理要顯示的動畫。

看看這個answer

SwipeRefreshLayout負責在其頂部,以顯示其預定的動畫你

你可以試試庫,如this,但我建議癥結到Google上,讓動畫自行處理。