Browse Source

刷新动画回老版本

FANGLH 8 years ago
parent
commit
6c0954cbd5

+ 3 - 5
pullToRefershLibraryMy/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java

@@ -39,8 +39,6 @@ import android.widget.LinearLayout;
 import com.handmark.pulltorefresh.library.internal.FlipLoadingLayout;
 import com.handmark.pulltorefresh.library.internal.LoadingLayout;
 import com.handmark.pulltorefresh.library.internal.RotateLoadingLayout;
-import com.handmark.pulltorefresh.library.internal.TweenAnimLoadingLayout;
-import com.handmark.pulltorefresh.library.internal.TweenAnimPullLayout;
 import com.handmark.pulltorefresh.library.internal.Utils;
 import com.handmark.pulltorefresh.library.internal.ViewCompat;
 
@@ -1393,12 +1391,12 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
 			switch (this) {
 				case ROTATE:
 				default:
-//					return new RotateLoadingLayout(context, mode, scrollDirection, attrs);  老版本刷新
-					if (mode.showFooterLoadingLayout()){
+					return new RotateLoadingLayout(context, mode, scrollDirection, attrs);  //老版本刷新
+					/*if (mode.showFooterLoadingLayout()){
 						return new TweenAnimLoadingLayout(context, mode, scrollDirection, attrs);
 					}else if (mode.showHeaderLoadingLayout()){
 						return new TweenAnimPullLayout(context, mode, scrollDirection, attrs);
-				}
+				}*/
 				case FLIP:
 					return new FlipLoadingLayout(context, mode, scrollDirection, attrs);
 			}

+ 3 - 3
pullToRefershLibraryMy/src/main/res/layout/pull_to_refresh_header_vertical.xml

@@ -13,7 +13,7 @@
         <FrameLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_gravity="center" >
+            android:layout_gravity="left|center_vertical" >
 
             <ImageView
                 android:id="@+id/pull_to_refresh_image"
@@ -34,8 +34,8 @@
         <LinearLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_gravity="left|center_vertical"
-            android:gravity="center_horizontal"
+            android:layout_gravity="center"
+            android:gravity="center"
             android:orientation="vertical" >
 
             <TextView